Add and fix comments
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
parent
d1f16b937e
commit
e4710ae9ed
2 changed files with 5 additions and 1 deletions
|
@ -5150,6 +5150,8 @@ int mbedtls_ecp_mod_p256_raw(mbedtls_mpi_uint *X, size_t X_limbs)
|
||||||
|
|
||||||
RESET;
|
RESET;
|
||||||
|
|
||||||
|
/* Use 2^224 * (2^32 - 1) + 2^192 + 2^96 - 1
|
||||||
|
* to modulo reduce the final carry. */
|
||||||
ADD_LAST; NEXT; // A0
|
ADD_LAST; NEXT; // A0
|
||||||
; NEXT; // A1
|
; NEXT; // A1
|
||||||
; NEXT; // A2
|
; NEXT; // A2
|
||||||
|
@ -5161,6 +5163,8 @@ int mbedtls_ecp_mod_p256_raw(mbedtls_mpi_uint *X, size_t X_limbs)
|
||||||
|
|
||||||
RESET;
|
RESET;
|
||||||
|
|
||||||
|
/* Use 2^224 * (2^32 - 1) + 2^192 + 2^96 - 1
|
||||||
|
* to modulo reduce the carry generated by the previous reduction. */
|
||||||
ADD_LAST; NEXT; // A0
|
ADD_LAST; NEXT; // A0
|
||||||
; NEXT; // A1
|
; NEXT; // A1
|
||||||
; NEXT; // A2
|
; NEXT; // A2
|
||||||
|
|
|
@ -147,7 +147,7 @@ class EcpP224R1Raw(bignum_common.ModOperationCommon,
|
||||||
|
|
||||||
class EcpP256R1Raw(bignum_common.ModOperationCommon,
|
class EcpP256R1Raw(bignum_common.ModOperationCommon,
|
||||||
EcpTarget):
|
EcpTarget):
|
||||||
"""Test cases for ecp quasi_reduction()."""
|
"""Test cases for ECP P256 fast reduction."""
|
||||||
symbol = "-"
|
symbol = "-"
|
||||||
test_function = "ecp_mod_p256_raw"
|
test_function = "ecp_mod_p256_raw"
|
||||||
test_name = "ecp_mod_p256_raw"
|
test_name = "ecp_mod_p256_raw"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue