| Crates.io | kychacha_crypto |
| lib.rs | kychacha_crypto |
| version | 6.0.0 |
| created_at | 2025-01-31 22:30:52.217533+00 |
| updated_at | 2025-08-17 16:54:38.392132+00 |
| description | A Post-Quantum Secure Encryption Protocol using chacha20poly1305 and CRYSTALS-kyber |
| homepage | |
| repository | https://github.com/Nichokas/kychacha_crypto |
| max_upload_size | |
| id | 1537881 |
| size | 94,297 |
Hybrid cryptographic implementation using:
The following diagram describes the protocol flow between the "Sender" and the "Recipient":
sequenceDiagram
participant Sender
participant Recipient
Recipient-->>Sender: Recipient public key (ML-KEM pub key 1184 bytes)
Sender->>Sender: Encapsulate secret (ML-KEM)
Note right of Sender: Generates ephemeral keypair and derives shared secret
Sender->>Sender: Derive ChaCha key (HKDF-SHA256)
Note right of Sender: Uses shared secret to derive symmetric key
Sender->>Sender: Encrypt message (ChaCha20-Poly1305)
Sender->>Recipient: Send {ciphertext, nonce, encrypted message}
Recipient->>Recipient: Decapsulate secret (ML-KEM)
Note right of Recipient: Recovers shared secret
Recipient->>Recipient: Derive ChaCha key (HKDF-SHA256)
Note right of Recipient: Derives the same symmetric key
Recipient->>Recipient: Decrypt message
Note: During the encapsulation process on the sender's side, an ephemeral keypair is generated.
https://docs.rs/kychacha_crypto