Skip to content

Main branch update - #41

Merged
Zikithezikit merged 48 commits into
mainfrom
dev
Oct 30, 2026
Merged

Zikithezikit merged 48 commits into
mainfrom
dev

Conversation

@Zikithezikit

Copy link
Copy Markdown
Owner

No description provided.

Zikithezikit and others added 30 commits February 20, 2026 10:04
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
@Zikithezikit Zikithezikit self-assigned this Oct 30, 2026
@Zikithezikit
Zikithezikit merged commit e3f95e3 into main Oct 30, 2026
77 of 78 checks passed
@Zikithezikit
Zikithezikit deleted the dev branch October 30, 2026 16:56
@Zikithezikit
Zikithezikit restored the dev branch October 30, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant