Skip to content

Commit 46885f3

Browse files
authored
Merge pull request #313 from athoelke/typo-fixes
Fix some typos in maths expressions
2 parents 4405e7c + 83ffe9e commit 46885f3

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

doc/crypto/api/keys/types.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ See :secref:`wpa3-sae-passwords`.
10161016
* :math:`x` encoded as a big-endian :math:`m`-byte string;
10171017
* :math:`y` encoded as a big-endian :math:`m`-byte string.
10181018

1019-
For an elliptic curve over :math:`\mathbb{F}_p`, :math:`m` is the integer for which :math:`2^{8m-1} \leq p < 2^{8m}`.
1019+
For an elliptic curve over :math:`\mathbb{F}_p`, :math:`m` is the integer for which :math:`2^{8(m-1)} \leq p < 2^{8m}`.
10201020

10211021
.. note::
10221022

@@ -1063,7 +1063,7 @@ See :secref:`wpa3-sae-passwords`.
10631063

10641064
The password token is a finite-field group element :math:`y \in [1, p - 1]`, where :math:`p` is the group's prime modulus.
10651065

1066-
The data format for import and export of the password token is :math:`y` encoded as a big-endian :math:`m`-byte string, where :math:`m` is the integer for which :math:`2^{8m-1} \leq p < 2^{8m}`.
1066+
The data format for import and export of the password token is :math:`y` encoded as a big-endian :math:`m`-byte string, where :math:`m` is the integer for which :math:`2^{8(m-1)} \leq p < 2^{8m}`.
10671067

10681068
.. note::
10691069

@@ -1313,7 +1313,7 @@ The curve type affects the key format, the key-derivation procedure, and the alg
13131313
.. param:: curve
13141314
A value of type `psa_ecc_family_t` that identifies the ECC curve family to be used.
13151315

1316-
The size of an elliptic curve key is the bit size associated with the curve, that is, the bit size of :math:`q`` for a curve over a field :math:`\mathbb{F}_q`.
1316+
The size of an elliptic curve key is the bit size associated with the curve, that is, the bit size of :math:`q` for a curve over a field :math:`\mathbb{F}_q`.
13171317
See the documentation of each elliptic curve family for details.
13181318

13191319
.. subsection:: Compatible algorithms
@@ -1408,7 +1408,7 @@ The curve type affects the key format, the key-derivation procedure, and the alg
14081408
Let :math:`m` be the bit size of :math:`N`, such that :math:`2^{m-1} \leq N < 2^m`. This function generates the private key using the following process:
14091409

14101410
1. Draw a byte string of length :math:`\lceil{m/8}\rceil` bytes.
1411-
#. If :math:`m` is not a multiple of 8, set the most significant :math:`8 * \lceil{m/8}\rceil - m`` bits of the first byte in the string to zero.
1411+
#. If :math:`m` is not a multiple of 8, set the most significant :math:`8 * \lceil{m/8}\rceil - m` bits of the first byte in the string to zero.
14121412
#. Convert the string to integer :math:`k` by decoding it as a big-endian byte-string.
14131413
#. If :math:`k > N-2`, discard the result and return to step 1.
14141414
#. Output :math:`d = k + 1` as the private key.
@@ -1592,7 +1592,7 @@ Diffie Hellman keys
15921592
This function generates the private key using the following process:
15931593

15941594
1. Draw a byte string of length :math:`\lceil{m/8}\rceil` bytes.
1595-
#. If :math:`m` is not a multiple of 8, set the most significant :math:`8 * \lceil{m/8}\rceil - m`` bits of the first byte in the string to zero.
1595+
#. If :math:`m` is not a multiple of 8, set the most significant :math:`8 * \lceil{m/8}\rceil - m` bits of the first byte in the string to zero.
15961596
#. Convert the string to integer :math:`k` by decoding it as a big-endian byte-string.
15971597
#. If :math:`k > p-2`, discard the result and return to step 1.
15981598
#. Output :math:`x = k + 1` as the private key.

doc/crypto/api/ops/key-derivation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ Key-derivation algorithms
345345

346346
This KDF is defined in :cite-title:`TLS-ECJPAKE` §8.7. This specifies the use of a KDF to derive the TLS 1.2 session secrets from the output of EC J-PAKE over the secp256r1 Elliptic curve (the 256-bit curve in `PSA_ECC_FAMILY_SECP_R1`). EC J-PAKE operations can be performed using a PAKE operation, see :secref:`pake`.
347347

348-
This KDF takes the shared secret :math:`K`` (an uncompressed EC point in case of EC J-PAKE) and calculates :math:`\text{SHA256}(K.x)`.
348+
This KDF takes the shared secret :math:`K` (an uncompressed EC point in case of EC J-PAKE) and calculates :math:`\text{SHA256}(K.x)`.
349349

350350
This function takes a single input:
351351

doc/crypto/api/ops/pake.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1414,7 +1414,7 @@ The following steps demonstrate the application code for 'User' in :numref:`fig-
14141414
See :secref:`jpake-cipher-suites` and :secref:`jpake-passwords` for details on the requirements for the cipher suite and key.
14151415

14161416
The key material is used as an array of bytes, which is converted to an integer as described in :cite-title:`SEC1` §2.3.8, before reducing it modulo :math:`q`.
1417-
Here, :math:`q`` is the order of the group defined by the cipher-suite primitive.
1417+
Here, :math:`q` is the order of the group defined by the cipher-suite primitive.
14181418
`psa_pake_setup()` will return an error if the result of the conversion and reduction is ``0``.
14191419

14201420
Key exchange

0 commit comments

Comments
 (0)