Skip to content

Commit

Permalink
Better rst file line wraps (no changes in PDF)
Browse files Browse the repository at this point in the history
  • Loading branch information
FAlbertDev committed Oct 22, 2024
1 parent 99b3e9b commit e5131ed
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions docs/cryptodoc/src/05_09_kyber.rst
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,13 @@ In combination, Botan does the following:

**Notes:**

- Step 1 corresponds to Algorithm 19 of [FIPS-203]_ and is performed in :srcref:`[src/lib/pubkey/kyber]/kyber/kyber_common/kyber.cpp:232|Kyber_PrivateKey::Kyber_PrivateKey`.
- Steps 2-7 correspond to Algorithms 16 and 13 of [FIPS-203]_ and are performed in :srcref:`[src/lib/pubkey/kyber]/kyber/kyber_common/kyber_algos.cpp:321|expand_keypair`.
- Botan only stores the seeds as the secret key. The required values for decapsulation are recomputed on demand. Loading or storing the partially expanded key format specified in [FIPS-203]_ is explicitly not supported.
- Step 1 corresponds to Algorithm 19 of [FIPS-203]_ and is performed in
:srcref:`[src/lib/pubkey/kyber]/kyber/kyber_common/kyber.cpp:232|Kyber_PrivateKey::Kyber_PrivateKey`.
- Steps 2-7 correspond to Algorithms 16 and 13 of [FIPS-203]_ and are
performed in :srcref:`[src/lib/pubkey/kyber]/kyber/kyber_common/kyber_algos.cpp:321|expand_keypair`.
- Botan only stores the seeds as the secret key. The required values for
decapsulation are recomputed on demand. Loading or storing the partially
expanded key format specified in [FIPS-203]_ is explicitly not supported.


.. _pubkey/kyber/encaps:
Expand Down Expand Up @@ -363,9 +367,13 @@ In combination, Botan does the following:

**Notes:**

- Steps 1-3 correspond to Algorithms 20 and 17 of [FIPS-203]_ and are performed in :srcref:`[src/lib/pubkey/kyber]/ml_kem/ml_kem_impl.cpp:25|ML_KEM_Encryptor::encapsulate`.
- Steps 1.1-1.9 correspond to Algorithms 14 of [FIPS-203]_ and are performed in :srcref:`[src/lib/pubkey/kyber]/kyber/kyber_common/kyber_keys.cpp:55|indcpa_encrypt`.
- The transposed matrix ``At`` is precomputed and stored in the public key object. This way, consecutive encapsulations for the same public key do not have to re-generate ``At`` from ``rho``.
- Steps 1-3 correspond to Algorithms 20 and 17 of [FIPS-203]_ and are
performed in :srcref:`[src/lib/pubkey/kyber]/ml_kem/ml_kem_impl.cpp:25|ML_KEM_Encryptor::encapsulate`.
- Steps 1.1-1.9 correspond to Algorithms 14 of [FIPS-203]_ and are performed
in :srcref:`[src/lib/pubkey/kyber]/kyber/kyber_common/kyber_keys.cpp:55|indcpa_encrypt`.
- The transposed matrix ``At`` is precomputed and stored in the public key
object. This way, consecutive encapsulations for the same public key do not
have to re-generate ``At`` from ``rho``.


.. _pubkey/kyber/decaps:
Expand Down Expand Up @@ -411,6 +419,8 @@ In combination, Botan does the following:

**Notes:**

- Steps 1,2 and 6-9 correspond to Algorithm 18 of [FIPS-203]_ and are performed in :srcref:`[src/lib/pubkey/kyber]/ml_kem/ml_kem_impl.cpp:48|ML_KEM_Decryptor::decapsulate`.
- Steps 2.1-2.3 correspond to Algorithm 15 of [FIPS-203]_ and are performed in :srcref:`[src/lib/pubkey/kyber]/kyber/kyber_common/kyber_keys.cpp:84|Kyber_PrivateKeyInternal::indcpa_decrypt`.
- Steps 1,2 and 6-9 correspond to Algorithm 18 of [FIPS-203]_ and are
performed in :srcref:`[src/lib/pubkey/kyber]/ml_kem/ml_kem_impl.cpp:48|ML_KEM_Decryptor::decapsulate`.
- Steps 2.1-2.3 correspond to Algorithm 15 of [FIPS-203]_ and are performed
in :srcref:`[src/lib/pubkey/kyber]/kyber/kyber_common/kyber_keys.cpp:84|Kyber_PrivateKeyInternal::indcpa_decrypt`.
- Step 6 uses a constant time check and memory assignment function.

0 comments on commit e5131ed

Please sign in to comment.