Skip to content

Commit

Permalink
Add docs for hybrid KEM
Browse files Browse the repository at this point in the history
  • Loading branch information
zolagonano committed Dec 16, 2023
1 parent dda3376 commit 30d0b95
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions docs/concepts/hybrid-kem.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,50 @@ layout: default
parent: Concepts
---

The post-quantum algorithms available today are relatively new compared to traditional asymmetric cryptography algorithms like elliptic curves. Because of this, Sare employs a combination of both traditional and post-quantum algorithms. This approach ensures that, in the event our post-quantum algorithms are compromised, we still maintain protection against non-quantum attacks.

To achieve this, Sare utilizes a post-quantum Key Encapsulation Mechanism (KEM) and a Diffie-Hellman key exchange algorithm to derive two separate shared secrets.

## Concatenation of Shared Secrets

To derive an encryption key from these two shared secrets, Sare concatenates them and passes the result as Initial Keying Material (IKM) to an HKDF with an 8-byte salt. The process extracts a Pseudo Random Key (PRK) as the encryption key. This key is then employed in a Stream AEAD cipher to both encrypt and decrypt files.

```
+----------------------+
| Post-Quantum KEM |
| (Shared Secret 1) |
+----------------------+
|
V
+----------------------+
| Diffie-Hellman Key |
| Exchange (Shared |
| Secret 2) |
+----------------------+
|
V
+----------------------------------+
| Concatenation of Shared Secrets |
| (Shared Secret 1 + Shared Secret 2)|
+----------------------------------+
|
V
+----------------------------------+
| HKDF with 8-byte Salt |
| (Initial Keying Material - IKM) |
+----------------------------------+
|
V
+------------------------+
| Pseudo Random Key |
| (PRK - Encryption Key)|
+------------------------+
|
V
+------------------------+
| Stream AEAD Cipher |
| (Encryption/Decryption)|
+------------------------+
```

0 comments on commit 30d0b95

Please sign in to comment.