Repository navigation
Main branch update - #41
Merged
Merged
Conversation
You can now decapsulate with your own custom private key. ```python shared_secret = pykyber.Kyber768.decapsulate(ciphertext, secret_key) ```
In the new versions I added the dataclass to make the usage of the lib more verbose. This broke the usage of lower versions, so I made it such that even if you use it like the older versions it will still work. ```python public_key, secret_key = pykyber.Kyber1024() ciphertext, shared_secret = keypair.encapsulate() ```
This commit introduces significant security and cryptographic robustness improvements to the pykyber library: - Mitigated timing side-channel attacks by replacing value-dependent division operators with constant-time modular arithmetic in polynomial compression and message extraction functions. - Integrated the zeroize crate to ensure that sensitive cryptographic material, including secret keys and intermediate state buffers, is explicitly wiped from memory when dropped. - Achieved full NIST FIPS 203 compliance for Kyber-1024 by correcting the compression parameters (du=11, dv=5) and bit-packing logic, resulting in a standard-compliant 1568-byte ciphertext. - Hardened the Kyber-512 implementation by updating the noise parameter eta1 to 3 and utilizing the correct CBD3 noise distribution as specified in the standard. - Improved arithmetic robustness in the NTT implementation by using 32-bit intermediate types to prevent potential overflows and refactored Keccak squeezing to ensure memory safety for arbitrary output lengths. - Added a full suite of verification tests and updated benchmarks to reflect the new security-first architecture.
…rialization Feature/deterministic keys serialization and security updates
- Public domain (Unlicense) license - Add CHANGELOG.md - Add docs/ with API reference and index - Bump version to 1.0.0 - Add AGENTS.md for OpenCode sessions
…NAME from global env
…erence removed generic clang)
…y is clang-18 not clang18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.