diff --git a/wolfcrypt/src/fe_448.c b/wolfcrypt/src/fe_448.c index cbc305d2b..5f3fbc248 100644 --- a/wolfcrypt/src/fe_448.c +++ b/wolfcrypt/src/fe_448.c @@ -167,7 +167,7 @@ void fe448_sub(word8* r, const word8* a, const word8* b) } } -/* Mulitply a field element by 39081. r = (39081 * a) mod (2^448 - 2^224 - 1) +/* Multiply a field element by 39081. r = (39081 * a) mod (2^448 - 2^224 - 1) * * r [in] Field element to hold result. * a [in] Field element to multiply. @@ -192,7 +192,7 @@ void fe448_mul39081(word8* r, const word8* a) } } -/* Mulitply two field elements. r = (a * b) mod (2^448 - 2^224 - 1) +/* Multiply two field elements. r = (a * b) mod (2^448 - 2^224 - 1) * * r [in] Field element to hold result. * a [in] Field element to multiply. @@ -448,7 +448,7 @@ void fe448_neg(word8* r, const word8* a) } /* Raise field element to (p-3) / 4: 2^446 - 2^222 - 1 - * Used for calcualting y-ordinate from x-ordinate for Ed448. + * Used for calculating y-ordinate from x-ordinate for Ed448. * * r [in] Field element to hold result. * a [in] Field element to exponentiate. @@ -788,7 +788,7 @@ void fe448_sub(sword64* r, const sword64* a, const sword64* b) r[7] = a[7] - b[7]; } -/* Mulitply a field element by 39081. r = (39081 * a) mod (2^448 - 2^224 - 1) +/* Multiply a field element by 39081. r = (39081 * a) mod (2^448 - 2^224 - 1) * * r [in] Field element to hold result. * a [in] Field element to multiply. @@ -826,7 +826,7 @@ void fe448_mul39081(sword64* r, const sword64* a) r[7] = (sword64)t7; } -/* Mulitply two field elements. r = (a * b) mod (2^448 - 2^224 - 1) +/* Multiply two field elements. r = (a * b) mod (2^448 - 2^224 - 1) * * r [in] Field element to hold result. * a [in] Field element to multiply. @@ -1172,7 +1172,7 @@ void fe448_neg(sword64* r, const sword64* a) } /* Raise field element to (p-3) / 4: 2^446 - 2^222 - 1 - * Used for calcualting y-ordinate from x-ordinate for Ed448. + * Used for calculating y-ordinate from x-ordinate for Ed448. * * r [in] Field element to hold result. * a [in] Field element to exponentiate. @@ -1699,7 +1699,7 @@ void fe448_reduce(sword32* a) o = a[15] >> 28; a[0] += (sword32)o; a[8] += (sword32)o; a[15] -= (sword32)(o << 28); } -/* Mulitply a field element by 39081. r = (39081 * a) mod (2^448 - 2^224 - 1) +/* Multiply a field element by 39081. r = (39081 * a) mod (2^448 - 2^224 - 1) * * r [in] Field element to hold result. * a [in] Field element to multiply. @@ -1761,7 +1761,7 @@ void fe448_mul39081(sword32* r, const sword32* a) r[15] = (sword32)t15; } -/* Mulitply two field elements. r = a * b +/* Multiply two field elements. r = a * b * * r [in] Field element to hold result. * a [in] Field element to multiply. @@ -1891,7 +1891,7 @@ static WC_INLINE void fe448_mul_8(sword32* r, const sword32* a, const sword32* b r[15] = (sword32)t15; } -/* Mulitply two field elements. r = (a * b) mod (2^448 - 2^224 - 1) +/* Multiply two field elements. r = (a * b) mod (2^448 - 2^224 - 1) * * r [in] Field element to hold result. * a [in] Field element to multiply. @@ -2271,7 +2271,7 @@ void fe448_neg(sword32* r, const sword32* a) } /* Raise field element to (p-3) / 4: 2^446 - 2^222 - 1 - * Used for calcualting y-ordinate from x-ordinate for Ed448. + * Used for calculating y-ordinate from x-ordinate for Ed448. * * r [in] Field element to hold result. * a [in] Field element to exponentiate. diff --git a/wolfcrypt/src/poly1305_asm.S b/wolfcrypt/src/poly1305_asm.S index efe7be5f5..7eb5e02ba 100644 --- a/wolfcrypt/src/poly1305_asm.S +++ b/wolfcrypt/src/poly1305_asm.S @@ -324,7 +324,7 @@ L_poly1305_avx_final_no_more: movq %rcx, %r8 andq $3, %rcx shrq $2, %r8 - # Multily by 5 + # Multiply by 5 leaq 0(%r8,%r8,4), %r8 addq %r8, %rax adcq $0x00, %rdx diff --git a/wolfcrypt/src/port/arm/armv8-sha512-asm.S b/wolfcrypt/src/port/arm/armv8-sha512-asm.S index 8bdd0641b..06ceddcbe 100644 --- a/wolfcrypt/src/port/arm/armv8-sha512-asm.S +++ b/wolfcrypt/src/port/arm/armv8-sha512-asm.S @@ -1217,7 +1217,7 @@ _Transform_Sha512_Len_crypto: adrp x4, L_SHA512_transform_crypto_len_k@PAGE add x4, x4, :lo12:L_SHA512_transform_crypto_len_k@PAGEOFF #endif /* __APPLE__ */ - # Load first 16 64-bit words of K permantly + # Load first 16 64-bit words of K permanently ld1 {v8.2d, v9.2d, v10.2d, v11.2d}, [x4], #0x40 ld1 {v12.2d, v13.2d, v14.2d, v15.2d}, [x4], #0x40 # Load digest into working vars diff --git a/wolfcrypt/src/port/arm/armv8-sha512-asm_c.c b/wolfcrypt/src/port/arm/armv8-sha512-asm_c.c index 62f6696e4..36eee8127 100644 --- a/wolfcrypt/src/port/arm/armv8-sha512-asm_c.c +++ b/wolfcrypt/src/port/arm/armv8-sha512-asm_c.c @@ -1149,7 +1149,7 @@ void Transform_Sha512_Len_crypto(wc_Sha512* sha512, const byte* data, word32 len "adrp x4, %[L_SHA512_transform_crypto_len_k]@PAGE\n\t" "add x4, x4, %[L_SHA512_transform_crypto_len_k]@PAGEOFF\n\t" #endif /* __APPLE__ */ - /* Load first 16 64-bit words of K permantly */ + /* Load first 16 64-bit words of K permanently */ "ld1 {v8.2d, v9.2d, v10.2d, v11.2d}, [x4], #0x40\n\t" "ld1 {v12.2d, v13.2d, v14.2d, v15.2d}, [x4], #0x40\n\t" /* Load digest into working vars */ diff --git a/wolfcrypt/src/sp_arm32.c b/wolfcrypt/src/sp_arm32.c index a1b68dc82..3d6c0585e 100644 --- a/wolfcrypt/src/sp_arm32.c +++ b/wolfcrypt/src/sp_arm32.c @@ -5845,7 +5845,7 @@ static void sp_2048_sqr_32(sp_digit* r_p, const sp_digit* a_p) #endif /* WOLFSSL_SP_SMALL */ #endif /* (WOLFSSL_HAVE_SP_RSA & !WOLFSSL_RSA_PUBLIC_ONLY) | WOLFSSL_HAVE_SP_DH */ -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -9902,7 +9902,7 @@ static SP_NOINLINE void sp_2048_mont_reduce_32(sp_digit* a_p, const sp_digit* m_ * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_mul_32(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -9916,7 +9916,7 @@ SP_NOINLINE static void sp_2048_mont_mul_32(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_sqr_32(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -14891,7 +14891,7 @@ static SP_NOINLINE void sp_2048_mont_reduce_64(sp_digit* a_p, const sp_digit* m_ * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_mul_64(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -14905,7 +14905,7 @@ SP_NOINLINE static void sp_2048_mont_mul_64(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_sqr_64(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -28436,7 +28436,7 @@ static void sp_3072_sqr_48(sp_digit* r_p, const sp_digit* a_p) #endif /* WOLFSSL_SP_SMALL */ #endif /* (WOLFSSL_HAVE_SP_RSA & !WOLFSSL_RSA_PUBLIC_ONLY) | WOLFSSL_HAVE_SP_DH */ -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -34389,7 +34389,7 @@ static SP_NOINLINE void sp_3072_mont_reduce_48(sp_digit* a_p, const sp_digit* m_ * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_mul_48(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -34403,7 +34403,7 @@ SP_NOINLINE static void sp_3072_mont_mul_48(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_sqr_48(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -41426,7 +41426,7 @@ static SP_NOINLINE void sp_3072_mont_reduce_96(sp_digit* a_p, const sp_digit* m_ * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_mul_96(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -41440,7 +41440,7 @@ SP_NOINLINE static void sp_3072_mont_mul_96(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_sqr_96(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -46028,7 +46028,7 @@ static void sp_4096_sqr_128(sp_digit* r_p, const sp_digit* a_p) } #endif /* WOLFSSL_SP_SMALL */ -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -56342,7 +56342,7 @@ static SP_NOINLINE void sp_4096_mont_reduce_128(sp_digit* a_p, const sp_digit* m * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_mul_128(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -56356,7 +56356,7 @@ SP_NOINLINE static void sp_4096_mont_mul_128(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_sqr_128(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -65376,7 +65376,7 @@ static int sp_256_point_to_ecc_point_8(const sp_point_256* p, ecc_point* pm) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static SP_NOINLINE void sp_256_mont_mul_8(sp_digit* r_p, const sp_digit* a_p, const sp_digit* b_p, const sp_digit* m_p, sp_digit mp_p) { @@ -67962,7 +67962,7 @@ static SP_NOINLINE void sp_256_mont_mul_8(sp_digit* r_p, const sp_digit* a_p, co * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static SP_NOINLINE void sp_256_mont_sqr_8(sp_digit* r_p, const sp_digit* a_p, const sp_digit* m_p, sp_digit mp_p) { @@ -69405,7 +69405,7 @@ static SP_NOINLINE void sp_256_mont_sqr_8(sp_digit* r_p, const sp_digit* a_p, co * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_256_mont_sqr_n_8(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -71349,7 +71349,7 @@ static int sp_256_proj_point_add_8_nb(sp_ecc_ctx_t* sp_ctx, sp_point_256* r, /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_256_get_point_16_8(sp_point_256* r, const sp_point_256* table, @@ -71900,7 +71900,7 @@ static int sp_256_gen_stripe_table_8(const sp_point_256* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_256_get_entry_16_8(sp_point_256* r, @@ -72095,7 +72095,7 @@ static THREAD_LS_T int sp_cache_256_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_256(const sp_point_256* g, sp_cache_256_t** cache) @@ -72320,7 +72320,7 @@ static int sp_256_gen_stripe_table_8(const sp_point_256* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_256_get_entry_256_8(sp_point_256* r, @@ -72515,7 +72515,7 @@ static THREAD_LS_T int sp_cache_256_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_256(const sp_point_256* g, sp_cache_256_t** cache) @@ -72704,7 +72704,7 @@ int sp_ecc_mulmod_256(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -74253,7 +74253,7 @@ int sp_ecc_mulmod_base_256(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -76792,7 +76792,7 @@ static void sp_256_add_points_8(sp_point_256* p1, const sp_point_256* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -87604,7 +87604,7 @@ static SP_NOINLINE void sp_384_mont_reduce_12(sp_digit* a_p, const sp_digit* m_p * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_384_mont_mul_12(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -87618,7 +87618,7 @@ SP_NOINLINE static void sp_384_mont_mul_12(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_384_mont_sqr_12(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -87634,7 +87634,7 @@ SP_NOINLINE static void sp_384_mont_sqr_12(sp_digit* r, const sp_digit* a, * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_384_mont_sqr_n_12(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -88741,7 +88741,7 @@ static int sp_384_proj_point_add_12_nb(sp_ecc_ctx_t* sp_ctx, sp_point_384* r, /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_384_get_point_16_12(sp_point_384* r, const sp_point_384* table, @@ -89316,7 +89316,7 @@ static int sp_384_gen_stripe_table_12(const sp_point_384* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_384_get_entry_16_12(sp_point_384* r, @@ -89527,7 +89527,7 @@ static THREAD_LS_T int sp_cache_384_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_384(const sp_point_384* g, sp_cache_384_t** cache) @@ -89752,7 +89752,7 @@ static int sp_384_gen_stripe_table_12(const sp_point_384* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_384_get_entry_256_12(sp_point_384* r, @@ -89963,7 +89963,7 @@ static THREAD_LS_T int sp_cache_384_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_384(const sp_point_384* g, sp_cache_384_t** cache) @@ -90152,7 +90152,7 @@ int sp_ecc_mulmod_384(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -91701,7 +91701,7 @@ int sp_ecc_mulmod_base_384(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -94648,7 +94648,7 @@ static void sp_384_add_points_12(sp_point_384* p1, const sp_point_384* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -114188,7 +114188,7 @@ static SP_NOINLINE void sp_521_mont_reduce_order_17(sp_digit* a_p, const sp_digi * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_521_mont_mul_17(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -114202,7 +114202,7 @@ SP_NOINLINE static void sp_521_mont_mul_17(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_521_mont_sqr_17(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -114218,7 +114218,7 @@ SP_NOINLINE static void sp_521_mont_sqr_17(sp_digit* r, const sp_digit* a, * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_521_mont_sqr_n_17(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -115558,7 +115558,7 @@ static int sp_521_proj_point_add_17_nb(sp_ecc_ctx_t* sp_ctx, sp_point_521* r, /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_521_get_point_16_17(sp_point_521* r, const sp_point_521* table, @@ -116167,7 +116167,7 @@ static int sp_521_gen_stripe_table_17(const sp_point_521* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_521_get_entry_16_17(sp_point_521* r, @@ -116398,7 +116398,7 @@ static THREAD_LS_T int sp_cache_521_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_521(const sp_point_521* g, sp_cache_521_t** cache) @@ -116623,7 +116623,7 @@ static int sp_521_gen_stripe_table_17(const sp_point_521* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_521_get_entry_256_17(sp_point_521* r, @@ -116854,7 +116854,7 @@ static THREAD_LS_T int sp_cache_521_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_521(const sp_point_521* g, sp_cache_521_t** cache) @@ -117043,7 +117043,7 @@ int sp_ecc_mulmod_521(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -119136,7 +119136,7 @@ int sp_ecc_mulmod_base_521(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -123210,7 +123210,7 @@ static void sp_521_add_points_17(sp_point_521* p1, const sp_point_521* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -143539,7 +143539,7 @@ static SP_NOINLINE void sp_1024_mont_reduce_32(sp_digit* a_p, const sp_digit* m_ * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_1024_mont_mul_32(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -143553,7 +143553,7 @@ SP_NOINLINE static void sp_1024_mont_mul_32(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_1024_mont_sqr_32(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -146015,7 +146015,7 @@ static THREAD_LS_T int sp_cache_1024_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_1024(const sp_point_1024* g, sp_cache_1024_t** cache) @@ -146370,7 +146370,7 @@ static THREAD_LS_T int sp_cache_1024_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_1024(const sp_point_1024* g, sp_cache_1024_t** cache) @@ -150196,7 +150196,7 @@ int sp_ecc_mulmod_base_1024(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -150434,7 +150434,7 @@ int sp_ecc_mulmod_table_1024(const mp_int* km, const ecc_point* gm, byte* table, return err; } -/* Multiply p* in projective co-ordinates by q*. +/* Multiply p* in projective coordinates by q*. * * r.x = p.x - (p.y * q.y) * r.y = (p.x * q.y) + p.y @@ -150460,7 +150460,7 @@ static void sp_1024_proj_mul_qx1_32(sp_digit* px, sp_digit* py, sp_1024_mont_add_32(py, t1, py, p1024_mod); } -/* Square p* in projective co-ordinates. +/* Square p* in projective coordinates. * * px' = (p.x + p.y) * (p.x - p.y) = p.x^2 - p.y^2 * py' = 2 * p.x * p.y @@ -152481,7 +152481,7 @@ int sp_ModExp_Fp_star_1024(const mp_int* base, mp_int* exp, mp_int* res) } #endif /* WOLFSSL_SP_SMALL */ -/* Multiply p* by q* in projective co-ordinates. +/* Multiply p* by q* in projective coordinates. * * p.x' = (p.x * q.x) - (p.y * q.y) * p.y' = (p.x * q.y) + (p.y * q.x) diff --git a/wolfcrypt/src/sp_arm64.c b/wolfcrypt/src/sp_arm64.c index ff0beb589..9db1ffca4 100644 --- a/wolfcrypt/src/sp_arm64.c +++ b/wolfcrypt/src/sp_arm64.c @@ -2848,7 +2848,7 @@ static void sp_2048_sqr_16(sp_digit* r, const sp_digit* a) #endif /* WOLFSSL_SP_SMALL */ #endif /* (WOLFSSL_HAVE_SP_RSA & !WOLFSSL_RSA_PUBLIC_ONLY) | WOLFSSL_HAVE_SP_DH */ -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -3414,7 +3414,7 @@ SP_NOINLINE static void sp_2048_mont_reduce_16(sp_digit* a, const sp_digit* m, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_mul_16(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -3428,7 +3428,7 @@ SP_NOINLINE static void sp_2048_mont_mul_16(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_sqr_16(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -4776,7 +4776,7 @@ SP_NOINLINE static void sp_2048_mont_reduce_32(sp_digit* a, const sp_digit* m, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_mul_32(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -4790,7 +4790,7 @@ SP_NOINLINE static void sp_2048_mont_mul_32(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_sqr_32(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -11651,7 +11651,7 @@ static void sp_3072_sqr_24(sp_digit* r, const sp_digit* a) #endif /* WOLFSSL_SP_SMALL */ #endif /* (WOLFSSL_HAVE_SP_RSA & !WOLFSSL_RSA_PUBLIC_ONLY) | WOLFSSL_HAVE_SP_DH */ -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -12460,7 +12460,7 @@ SP_NOINLINE static void sp_3072_mont_reduce_24(sp_digit* a, const sp_digit* m, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_mul_24(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -12474,7 +12474,7 @@ SP_NOINLINE static void sp_3072_mont_mul_24(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_sqr_24(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -14167,7 +14167,7 @@ SP_NOINLINE static void sp_3072_mont_reduce_48(sp_digit* a, const sp_digit* m, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_mul_48(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -14181,7 +14181,7 @@ SP_NOINLINE static void sp_3072_mont_mul_48(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_sqr_48(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -17641,7 +17641,7 @@ static void sp_4096_sqr_64(sp_digit* r, const sp_digit* a) } #endif /* WOLFSSL_SP_SMALL */ -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -19086,7 +19086,7 @@ SP_NOINLINE static void sp_4096_mont_reduce_64(sp_digit* a, const sp_digit* m, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_mul_64(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -19100,7 +19100,7 @@ SP_NOINLINE static void sp_4096_mont_mul_64(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_sqr_64(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -22424,7 +22424,7 @@ static void sp_256_cond_copy_4(sp_digit* r, const sp_digit* a, sp_digit m) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_256_mont_mul_4(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -22609,7 +22609,7 @@ SP_NOINLINE static void sp_256_mont_mul_4(sp_digit* r, const sp_digit* a, const * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_256_mont_sqr_4(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -22759,7 +22759,7 @@ SP_NOINLINE static void sp_256_mont_sqr_4(sp_digit* r, const sp_digit* a, const * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_256_mont_sqr_n_4(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -24345,7 +24345,7 @@ static void sp_256_ecc_recode_6_4(const sp_digit* k, ecc_recode_256* v) /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_256_get_point_33_4(sp_point_256* r, const sp_point_256* table, @@ -24733,7 +24733,7 @@ static int sp_256_gen_stripe_table_4(const sp_point_256* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_256_get_entry_64_4(sp_point_256* r, @@ -24913,7 +24913,7 @@ static THREAD_LS_T int sp_cache_256_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_256(const sp_point_256* g, sp_cache_256_t** cache) @@ -25141,7 +25141,7 @@ static int sp_256_gen_stripe_table_4(const sp_point_256* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_256_get_entry_256_4(sp_point_256* r, @@ -25321,7 +25321,7 @@ static THREAD_LS_T int sp_cache_256_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_256(const sp_point_256* g, sp_cache_256_t** cache) @@ -25510,7 +25510,7 @@ int sp_ecc_mulmod_256(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -27319,7 +27319,7 @@ static void sp_256_ecc_recode_7_4(const sp_digit* k, ecc_recode_256* v) /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_256_get_entry_65_4(sp_point_256* r, @@ -39493,7 +39493,7 @@ int sp_ecc_mulmod_base_256(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -41104,7 +41104,7 @@ static void sp_256_add_points_4(sp_point_256* p1, const sp_point_256* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -43238,7 +43238,7 @@ SP_NOINLINE static void sp_384_mont_reduce_order_6(sp_digit* a, const sp_digit* * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_384_mont_mul_6(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -43252,7 +43252,7 @@ SP_NOINLINE static void sp_384_mont_mul_6(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_384_mont_sqr_6(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -43268,7 +43268,7 @@ SP_NOINLINE static void sp_384_mont_sqr_6(sp_digit* r, const sp_digit* a, * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_384_mont_sqr_n_6(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -44559,7 +44559,7 @@ static void sp_384_ecc_recode_6_6(const sp_digit* k, ecc_recode_384* v) /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_384_get_point_33_6(sp_point_384* r, const sp_point_384* table, @@ -44960,7 +44960,7 @@ static int sp_384_gen_stripe_table_6(const sp_point_384* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_384_get_entry_64_6(sp_point_384* r, @@ -45148,7 +45148,7 @@ static THREAD_LS_T int sp_cache_384_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_384(const sp_point_384* g, sp_cache_384_t** cache) @@ -45376,7 +45376,7 @@ static int sp_384_gen_stripe_table_6(const sp_point_384* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_384_get_entry_256_6(sp_point_384* r, @@ -45564,7 +45564,7 @@ static THREAD_LS_T int sp_cache_384_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_384(const sp_point_384* g, sp_cache_384_t** cache) @@ -45753,7 +45753,7 @@ int sp_ecc_mulmod_384(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -47562,7 +47562,7 @@ static void sp_384_ecc_recode_7_6(const sp_digit* k, ecc_recode_384* v) /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_384_get_entry_65_6(sp_point_384* r, @@ -65558,7 +65558,7 @@ int sp_ecc_mulmod_base_384(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -67111,7 +67111,7 @@ static void sp_384_add_points_6(sp_point_384* p1, const sp_point_384* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -70365,7 +70365,7 @@ static void sp_521_cond_copy_9(sp_digit* r, const sp_digit* a, sp_digit m) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_521_mont_mul_9(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -70948,7 +70948,7 @@ SP_NOINLINE static void sp_521_mont_mul_9(sp_digit* r, const sp_digit* a, const * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_521_mont_sqr_9(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -71385,7 +71385,7 @@ SP_NOINLINE static void sp_521_mont_sqr_9(sp_digit* r, const sp_digit* a, const * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_521_mont_sqr_n_9(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -72857,7 +72857,7 @@ static void sp_521_ecc_recode_6_9(const sp_digit* k, ecc_recode_521* v) /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_521_get_point_33_9(sp_point_521* r, const sp_point_521* table, @@ -73276,7 +73276,7 @@ static int sp_521_gen_stripe_table_9(const sp_point_521* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_521_get_entry_64_9(sp_point_521* r, @@ -73476,7 +73476,7 @@ static THREAD_LS_T int sp_cache_521_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_521(const sp_point_521* g, sp_cache_521_t** cache) @@ -73704,7 +73704,7 @@ static int sp_521_gen_stripe_table_9(const sp_point_521* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_521_get_entry_256_9(sp_point_521* r, @@ -73904,7 +73904,7 @@ static THREAD_LS_T int sp_cache_521_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_521(const sp_point_521* g, sp_cache_521_t** cache) @@ -74093,7 +74093,7 @@ int sp_ecc_mulmod_521(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -76538,7 +76538,7 @@ static void sp_521_ecc_recode_7_9(const sp_digit* k, ecc_recode_521* v) /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_521_get_entry_65_9(sp_point_521* r, @@ -110606,7 +110606,7 @@ int sp_ecc_mulmod_base_521(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -111940,7 +111940,7 @@ static void sp_521_add_points_9(sp_point_521* p1, const sp_point_521* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -115255,7 +115255,7 @@ SP_NOINLINE static void sp_1024_mont_reduce_16(sp_digit* a, const sp_digit* m, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_1024_mont_mul_16(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -115269,7 +115269,7 @@ SP_NOINLINE static void sp_1024_mont_mul_16(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_1024_mont_sqr_16(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -117443,7 +117443,7 @@ static THREAD_LS_T int sp_cache_1024_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_1024(const sp_point_1024* g, sp_cache_1024_t** cache) @@ -121031,7 +121031,7 @@ int sp_ecc_mulmod_base_1024(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -121269,7 +121269,7 @@ int sp_ecc_mulmod_table_1024(const mp_int* km, const ecc_point* gm, byte* table, return err; } -/* Multiply p* in projective co-ordinates by q*. +/* Multiply p* in projective coordinates by q*. * * r.x = p.x - (p.y * q.y) * r.y = (p.x * q.y) + p.y @@ -121295,7 +121295,7 @@ static void sp_1024_proj_mul_qx1_16(sp_digit* px, sp_digit* py, sp_1024_mont_add_16(py, t1, py, p1024_mod); } -/* Square p* in projective co-ordinates. +/* Square p* in projective coordinates. * * px' = (p.x + p.y) * (p.x - p.y) = p.x^2 - p.y^2 * py' = 2 * p.x * p.y @@ -123060,7 +123060,7 @@ int sp_ModExp_Fp_star_1024(const mp_int* base, mp_int* exp, mp_int* res) } #endif /* WOLFSSL_SP_SMALL */ -/* Multiply p* by q* in projective co-ordinates. +/* Multiply p* by q* in projective coordinates. * * p.x' = (p.x * q.x) - (p.y * q.y) * p.y' = (p.x * q.y) + (p.y * q.x) diff --git a/wolfcrypt/src/sp_armthumb.c b/wolfcrypt/src/sp_armthumb.c index 2861ef4c6..8500f4cd9 100644 --- a/wolfcrypt/src/sp_armthumb.c +++ b/wolfcrypt/src/sp_armthumb.c @@ -21629,7 +21629,7 @@ SP_NOINLINE static void sp_2048_sqr_32(sp_digit* r, const sp_digit* a) #endif /* WOLFSSL_SP_SMALL */ #endif /* (WOLFSSL_HAVE_SP_RSA & !WOLFSSL_RSA_PUBLIC_ONLY) | WOLFSSL_HAVE_SP_DH */ -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -22991,7 +22991,7 @@ SP_NOINLINE static void sp_2048_mont_reduce_32(sp_digit* a, const sp_digit* m, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_mul_32(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -23005,7 +23005,7 @@ SP_NOINLINE static void sp_2048_mont_mul_32(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_sqr_32(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -26018,7 +26018,7 @@ SP_NOINLINE static void sp_2048_mont_reduce_64(sp_digit* a, const sp_digit* m, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_mul_64(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -26032,7 +26032,7 @@ SP_NOINLINE static void sp_2048_mont_mul_64(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_sqr_64(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -72817,7 +72817,7 @@ SP_NOINLINE static void sp_3072_sqr_48(sp_digit* r, const sp_digit* a) #endif /* WOLFSSL_SP_SMALL */ #endif /* (WOLFSSL_HAVE_SP_RSA & !WOLFSSL_RSA_PUBLIC_ONLY) | WOLFSSL_HAVE_SP_DH */ -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -74451,7 +74451,7 @@ SP_NOINLINE static void sp_3072_mont_reduce_48(sp_digit* a, const sp_digit* m, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_mul_48(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -74465,7 +74465,7 @@ SP_NOINLINE static void sp_3072_mont_mul_48(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_sqr_48(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -78032,7 +78032,7 @@ SP_NOINLINE static void sp_3072_mont_reduce_96(sp_digit* a, const sp_digit* m, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_mul_96(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -78046,7 +78046,7 @@ SP_NOINLINE static void sp_3072_mont_mul_96(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_sqr_96(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -87287,7 +87287,7 @@ SP_NOINLINE static void sp_4096_sqr_128(sp_digit* r, const sp_digit* a) } #endif /* WOLFSSL_SP_SMALL */ -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -90307,7 +90307,7 @@ SP_NOINLINE static void sp_4096_mont_reduce_128(sp_digit* a, const sp_digit* m, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_mul_128(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -90321,7 +90321,7 @@ SP_NOINLINE static void sp_4096_mont_mul_128(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_sqr_128(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -99038,7 +99038,7 @@ SP_NOINLINE static void sp_256_mont_reduce_order_8(sp_digit* a, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_256_mont_mul_8(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -99052,7 +99052,7 @@ SP_NOINLINE static void sp_256_mont_mul_8(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_256_mont_sqr_8(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -99068,7 +99068,7 @@ SP_NOINLINE static void sp_256_mont_sqr_8(sp_digit* r, const sp_digit* a, * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_256_mont_sqr_n_8(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -100973,7 +100973,7 @@ static int sp_256_proj_point_add_8_nb(sp_ecc_ctx_t* sp_ctx, sp_point_256* r, /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_256_get_point_16_8(sp_point_256* r, const sp_point_256* table, @@ -101524,7 +101524,7 @@ static int sp_256_gen_stripe_table_8(const sp_point_256* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_256_get_entry_16_8(sp_point_256* r, @@ -101719,7 +101719,7 @@ static THREAD_LS_T int sp_cache_256_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_256(const sp_point_256* g, sp_cache_256_t** cache) @@ -101944,7 +101944,7 @@ static int sp_256_gen_stripe_table_8(const sp_point_256* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_256_get_entry_256_8(sp_point_256* r, @@ -102139,7 +102139,7 @@ static THREAD_LS_T int sp_cache_256_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_256(const sp_point_256* g, sp_cache_256_t** cache) @@ -102328,7 +102328,7 @@ int sp_ecc_mulmod_256(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -103877,7 +103877,7 @@ int sp_ecc_mulmod_base_256(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -107321,7 +107321,7 @@ static void sp_256_add_points_8(sp_point_256* p1, const sp_point_256* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -110441,7 +110441,7 @@ SP_NOINLINE static void sp_384_mont_reduce_12(sp_digit* a, const sp_digit* m, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_384_mont_mul_12(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -110455,7 +110455,7 @@ SP_NOINLINE static void sp_384_mont_mul_12(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_384_mont_sqr_12(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -110471,7 +110471,7 @@ SP_NOINLINE static void sp_384_mont_sqr_12(sp_digit* r, const sp_digit* a, * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_384_mont_sqr_n_12(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -111625,7 +111625,7 @@ static int sp_384_proj_point_add_12_nb(sp_ecc_ctx_t* sp_ctx, sp_point_384* r, /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_384_get_point_16_12(sp_point_384* r, const sp_point_384* table, @@ -112200,7 +112200,7 @@ static int sp_384_gen_stripe_table_12(const sp_point_384* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_384_get_entry_16_12(sp_point_384* r, @@ -112411,7 +112411,7 @@ static THREAD_LS_T int sp_cache_384_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_384(const sp_point_384* g, sp_cache_384_t** cache) @@ -112636,7 +112636,7 @@ static int sp_384_gen_stripe_table_12(const sp_point_384* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_384_get_entry_256_12(sp_point_384* r, @@ -112847,7 +112847,7 @@ static THREAD_LS_T int sp_cache_384_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_384(const sp_point_384* g, sp_cache_384_t** cache) @@ -113036,7 +113036,7 @@ int sp_ecc_mulmod_384(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -114585,7 +114585,7 @@ int sp_ecc_mulmod_base_384(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -118505,7 +118505,7 @@ static void sp_384_add_points_12(sp_point_384* p1, const sp_point_384* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -122757,7 +122757,7 @@ SP_NOINLINE static void sp_521_mont_reduce_order_17(sp_digit* a, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_521_mont_mul_17(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -122771,7 +122771,7 @@ SP_NOINLINE static void sp_521_mont_mul_17(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_521_mont_sqr_17(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -122787,7 +122787,7 @@ SP_NOINLINE static void sp_521_mont_sqr_17(sp_digit* r, const sp_digit* a, * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_521_mont_sqr_n_17(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -125440,7 +125440,7 @@ static int sp_521_proj_point_add_17_nb(sp_ecc_ctx_t* sp_ctx, sp_point_521* r, /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_521_get_point_16_17(sp_point_521* r, const sp_point_521* table, @@ -126049,7 +126049,7 @@ static int sp_521_gen_stripe_table_17(const sp_point_521* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_521_get_entry_16_17(sp_point_521* r, @@ -126280,7 +126280,7 @@ static THREAD_LS_T int sp_cache_521_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_521(const sp_point_521* g, sp_cache_521_t** cache) @@ -126505,7 +126505,7 @@ static int sp_521_gen_stripe_table_17(const sp_point_521* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_521_get_entry_256_17(sp_point_521* r, @@ -126736,7 +126736,7 @@ static THREAD_LS_T int sp_cache_521_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_521(const sp_point_521* g, sp_cache_521_t** cache) @@ -126925,7 +126925,7 @@ int sp_ecc_mulmod_521(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -129018,7 +129018,7 @@ int sp_ecc_mulmod_base_521(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -135428,7 +135428,7 @@ static void sp_521_add_points_17(sp_point_521* p1, const sp_point_521* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -203738,7 +203738,7 @@ SP_NOINLINE static void sp_1024_mont_reduce_32(sp_digit* a, const sp_digit* m, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_1024_mont_mul_32(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -203752,7 +203752,7 @@ SP_NOINLINE static void sp_1024_mont_mul_32(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_1024_mont_sqr_32(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -211011,7 +211011,7 @@ static THREAD_LS_T int sp_cache_1024_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_1024(const sp_point_1024* g, sp_cache_1024_t** cache) @@ -211366,7 +211366,7 @@ static THREAD_LS_T int sp_cache_1024_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_1024(const sp_point_1024* g, sp_cache_1024_t** cache) @@ -215192,7 +215192,7 @@ int sp_ecc_mulmod_base_1024(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -215430,7 +215430,7 @@ int sp_ecc_mulmod_table_1024(const mp_int* km, const ecc_point* gm, byte* table, return err; } -/* Multiply p* in projective co-ordinates by q*. +/* Multiply p* in projective coordinates by q*. * * r.x = p.x - (p.y * q.y) * r.y = (p.x * q.y) + p.y @@ -215456,7 +215456,7 @@ static void sp_1024_proj_mul_qx1_32(sp_digit* px, sp_digit* py, sp_1024_mont_add_32(py, t1, py, p1024_mod); } -/* Square p* in projective co-ordinates. +/* Square p* in projective coordinates. * * px' = (p.x + p.y) * (p.x - p.y) = p.x^2 - p.y^2 * py' = 2 * p.x * p.y @@ -217477,7 +217477,7 @@ int sp_ModExp_Fp_star_1024(const mp_int* base, mp_int* exp, mp_int* res) } #endif /* WOLFSSL_SP_SMALL */ -/* Multiply p* by q* in projective co-ordinates. +/* Multiply p* by q* in projective coordinates. * * p.x' = (p.x * q.x) - (p.y * q.y) * p.y' = (p.x * q.y) + (p.y * q.x) diff --git a/wolfcrypt/src/sp_c32.c b/wolfcrypt/src/sp_c32.c index cd226658c..39423695b 100644 --- a/wolfcrypt/src/sp_c32.c +++ b/wolfcrypt/src/sp_c32.c @@ -1389,7 +1389,7 @@ SP_NOINLINE static void sp_2048_sqr_36(sp_digit* r, const sp_digit* a) #endif /* WOLFSSL_SP_SMALL */ #endif /* (WOLFSSL_HAVE_SP_RSA & !WOLFSSL_RSA_PUBLIC_ONLY) | WOLFSSL_HAVE_SP_DH */ -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -1766,7 +1766,7 @@ static void sp_2048_mont_reduce_36(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_mul_36(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -1780,7 +1780,7 @@ SP_NOINLINE static void sp_2048_mont_mul_36(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_sqr_36(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -2795,7 +2795,7 @@ static void sp_2048_mont_reduce_72(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_mul_72(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -2809,7 +2809,7 @@ SP_NOINLINE static void sp_2048_mont_mul_72(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_sqr_72(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -5169,7 +5169,7 @@ SP_NOINLINE static void sp_3072_sqr_106(sp_digit* r, const sp_digit* a) r[0] = (sp_digit)(c >> 29); } -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -5448,7 +5448,7 @@ SP_NOINLINE static void sp_3072_mul_53(sp_digit* r, const sp_digit* a, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_mul_53(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -5526,7 +5526,7 @@ SP_NOINLINE static void sp_3072_sqr_53(sp_digit* r, const sp_digit* a) * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_sqr_53(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -6351,7 +6351,7 @@ static void sp_3072_mont_reduce_106(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_mul_106(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -6365,7 +6365,7 @@ SP_NOINLINE static void sp_3072_mont_mul_106(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_sqr_106(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -9220,7 +9220,7 @@ SP_NOINLINE static void sp_3072_sqr_112(sp_digit* r, const sp_digit* a) } #endif /* !WOLFSSL_SP_SMALL */ -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -9524,7 +9524,7 @@ static void sp_3072_mont_reduce_56(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_mul_56(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -9538,7 +9538,7 @@ SP_NOINLINE static void sp_3072_mont_mul_56(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_sqr_56(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -10442,7 +10442,7 @@ static void sp_3072_mont_reduce_112(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_mul_112(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -10456,7 +10456,7 @@ SP_NOINLINE static void sp_3072_mont_mul_112(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_sqr_112(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -12819,7 +12819,7 @@ SP_NOINLINE static void sp_4096_sqr_142(sp_digit* r, const sp_digit* a) r[0] = (sp_digit)(c >> 29); } -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -13105,7 +13105,7 @@ SP_NOINLINE static void sp_4096_mul_71(sp_digit* r, const sp_digit* a, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_mul_71(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -13183,7 +13183,7 @@ SP_NOINLINE static void sp_4096_sqr_71(sp_digit* r, const sp_digit* a) * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_sqr_71(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -14009,7 +14009,7 @@ static void sp_4096_mont_reduce_142(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_mul_142(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -14023,7 +14023,7 @@ SP_NOINLINE static void sp_4096_mont_mul_142(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_sqr_142(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -16745,7 +16745,7 @@ SP_NOINLINE static void sp_4096_sqr_162(sp_digit* r, const sp_digit* a) } #endif /* !WOLFSSL_SP_SMALL */ -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -17064,7 +17064,7 @@ static void sp_4096_mont_reduce_81(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_mul_81(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -17078,7 +17078,7 @@ SP_NOINLINE static void sp_4096_mont_mul_81(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_sqr_81(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -17969,7 +17969,7 @@ static void sp_4096_mont_reduce_162(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_mul_162(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -17983,7 +17983,7 @@ SP_NOINLINE static void sp_4096_mont_mul_162(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_sqr_162(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -20943,7 +20943,7 @@ static void sp_256_mont_reduce_9(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_256_mont_mul_9(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -20957,7 +20957,7 @@ SP_NOINLINE static void sp_256_mont_mul_9(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_256_mont_sqr_9(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -20973,7 +20973,7 @@ SP_NOINLINE static void sp_256_mont_sqr_9(sp_digit* r, const sp_digit* a, * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_256_mont_sqr_n_9(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -22492,7 +22492,7 @@ static void sp_256_ecc_recode_6_9(const sp_digit* k, ecc_recode_256* v) /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_256_get_point_33_9(sp_point_256* r, const sp_point_256* table, @@ -22903,7 +22903,7 @@ static int sp_256_gen_stripe_table_9(const sp_point_256* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_256_get_entry_256_9(sp_point_256* r, @@ -23102,7 +23102,7 @@ static THREAD_LS_T int sp_cache_256_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_256(const sp_point_256* g, sp_cache_256_t** cache) @@ -23291,7 +23291,7 @@ int sp_ecc_mulmod_256(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -24759,7 +24759,7 @@ int sp_ecc_mulmod_base_256(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -26189,7 +26189,7 @@ static void sp_256_add_points_9(sp_point_256* p1, const sp_point_256* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -28334,7 +28334,7 @@ static void sp_384_mont_reduce_15(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_384_mont_mul_15(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -28348,7 +28348,7 @@ SP_NOINLINE static void sp_384_mont_mul_15(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_384_mont_sqr_15(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -28364,7 +28364,7 @@ SP_NOINLINE static void sp_384_mont_sqr_15(sp_digit* r, const sp_digit* a, * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_384_mont_sqr_n_15(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -29969,7 +29969,7 @@ static void sp_384_ecc_recode_6_15(const sp_digit* k, ecc_recode_384* v) /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_384_get_point_33_15(sp_point_384* r, const sp_point_384* table, @@ -30416,7 +30416,7 @@ static int sp_384_gen_stripe_table_15(const sp_point_384* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_384_get_entry_256_15(sp_point_384* r, @@ -30639,7 +30639,7 @@ static THREAD_LS_T int sp_cache_384_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_384(const sp_point_384* g, sp_cache_384_t** cache) @@ -30828,7 +30828,7 @@ int sp_ecc_mulmod_384(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -32808,7 +32808,7 @@ int sp_ecc_mulmod_base_384(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -34257,7 +34257,7 @@ static void sp_384_add_points_15(sp_point_384* p1, const sp_point_384* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -35994,7 +35994,7 @@ static void sp_521_mont_reduce_order_21(sp_digit* a, const sp_digit* m, sp_digit * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_521_mont_mul_21(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -36008,7 +36008,7 @@ SP_NOINLINE static void sp_521_mont_mul_21(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_521_mont_sqr_21(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -36024,7 +36024,7 @@ SP_NOINLINE static void sp_521_mont_sqr_21(sp_digit* r, const sp_digit* a, * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_521_mont_sqr_n_21(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -37499,7 +37499,7 @@ static void sp_521_ecc_recode_6_21(const sp_digit* k, ecc_recode_521* v) /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_521_get_point_33_21(sp_point_521* r, const sp_point_521* table, @@ -37982,7 +37982,7 @@ static int sp_521_gen_stripe_table_21(const sp_point_521* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_521_get_entry_256_21(sp_point_521* r, @@ -38229,7 +38229,7 @@ static THREAD_LS_T int sp_cache_521_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_521(const sp_point_521* g, sp_cache_521_t** cache) @@ -38418,7 +38418,7 @@ int sp_ecc_mulmod_521(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -40908,7 +40908,7 @@ int sp_ecc_mulmod_base_521(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -42409,7 +42409,7 @@ static void sp_521_add_points_21(sp_point_521* p1, const sp_point_521* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -44860,7 +44860,7 @@ static void sp_1024_mont_reduce_42(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_1024_mont_mul_42(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -44874,7 +44874,7 @@ SP_NOINLINE static void sp_1024_mont_mul_42(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_1024_mont_sqr_42(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -46801,7 +46801,7 @@ static THREAD_LS_T int sp_cache_1024_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_1024(const sp_point_1024* g, sp_cache_1024_t** cache) @@ -50934,7 +50934,7 @@ int sp_ecc_mulmod_base_1024(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -51172,7 +51172,7 @@ int sp_ecc_mulmod_table_1024(const mp_int* km, const ecc_point* gm, byte* table, return err; } -/* Multiply p* in projective co-ordinates by q*. +/* Multiply p* in projective coordinates by q*. * * r.x = p.x - (p.y * q.y) * r.y = (p.x * q.y) + p.y @@ -51198,7 +51198,7 @@ static void sp_1024_proj_mul_qx1_42(sp_digit* px, sp_digit* py, sp_1024_mont_add_42(py, t1, py, p1024_mod); } -/* Square p* in projective co-ordinates. +/* Square p* in projective coordinates. * * px' = (p.x + p.y) * (p.x - p.y) = p.x^2 - p.y^2 * py' = 2 * p.x * p.y @@ -53219,7 +53219,7 @@ int sp_ModExp_Fp_star_1024(const mp_int* base, mp_int* exp, mp_int* res) } #endif /* WOLFSSL_SP_SMALL */ -/* Multiply p* by q* in projective co-ordinates. +/* Multiply p* by q* in projective coordinates. * * p.x' = (p.x * q.x) - (p.y * q.y) * p.y' = (p.x * q.y) + (p.y * q.x) diff --git a/wolfcrypt/src/sp_c64.c b/wolfcrypt/src/sp_c64.c index ebd668f24..060348b64 100644 --- a/wolfcrypt/src/sp_c64.c +++ b/wolfcrypt/src/sp_c64.c @@ -409,7 +409,7 @@ SP_NOINLINE static void sp_2048_sqr_34(sp_digit* r, const sp_digit* a) r[0] = (sp_digit)(c >> 61); } -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -675,7 +675,7 @@ SP_NOINLINE static void sp_2048_mul_17(sp_digit* r, const sp_digit* a, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_mul_17(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -753,7 +753,7 @@ SP_NOINLINE static void sp_2048_sqr_17(sp_digit* r, const sp_digit* a) * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_sqr_17(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -1564,7 +1564,7 @@ static void sp_2048_mont_reduce_34(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_mul_34(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -1578,7 +1578,7 @@ SP_NOINLINE static void sp_2048_mont_mul_34(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_sqr_34(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -4001,7 +4001,7 @@ SP_NOINLINE static void sp_2048_sqr_36(sp_digit* r, const sp_digit* a) } #endif /* !WOLFSSL_SP_SMALL */ -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -4250,7 +4250,7 @@ static void sp_2048_mont_reduce_18(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_mul_18(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -4264,7 +4264,7 @@ SP_NOINLINE static void sp_2048_mont_mul_18(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_sqr_18(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -5138,7 +5138,7 @@ static void sp_2048_mont_reduce_36(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_mul_36(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -5152,7 +5152,7 @@ SP_NOINLINE static void sp_2048_mont_mul_36(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_sqr_36(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -7322,7 +7322,7 @@ SP_NOINLINE static void sp_3072_sqr_52(sp_digit* r, const sp_digit* a) r[0] = (sp_digit)(c >> 60); } -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -7575,7 +7575,7 @@ SP_NOINLINE static void sp_3072_mul_26(sp_digit* r, const sp_digit* a, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_mul_26(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -7630,7 +7630,7 @@ SP_NOINLINE static void sp_3072_sqr_26(sp_digit* r, const sp_digit* a) * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_sqr_26(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -8447,7 +8447,7 @@ static void sp_3072_mont_reduce_52(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_mul_52(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -8461,7 +8461,7 @@ SP_NOINLINE static void sp_3072_mont_mul_52(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_sqr_52(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -10967,7 +10967,7 @@ SP_NOINLINE static void sp_3072_sqr_54(sp_digit* r, const sp_digit* a) } #endif /* !WOLFSSL_SP_SMALL */ -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -11266,7 +11266,7 @@ static void sp_3072_mont_reduce_27(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_mul_27(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -11280,7 +11280,7 @@ SP_NOINLINE static void sp_3072_mont_mul_27(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_sqr_27(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -12166,7 +12166,7 @@ static void sp_3072_mont_reduce_54(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_mul_54(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -12180,7 +12180,7 @@ SP_NOINLINE static void sp_3072_mont_mul_54(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_sqr_54(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -14392,7 +14392,7 @@ SP_NOINLINE static void sp_4096_sqr_70(sp_digit* r, const sp_digit* a) r[0] = (sp_digit)(c >> 59); } -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -14649,7 +14649,7 @@ SP_NOINLINE static void sp_4096_mul_35(sp_digit* r, const sp_digit* a, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_mul_35(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -14704,7 +14704,7 @@ SP_NOINLINE static void sp_4096_sqr_35(sp_digit* r, const sp_digit* a) * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_sqr_35(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -15516,7 +15516,7 @@ static void sp_4096_mont_reduce_70(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_mul_70(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -15530,7 +15530,7 @@ SP_NOINLINE static void sp_4096_mont_mul_70(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_sqr_70(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -18058,7 +18058,7 @@ SP_NOINLINE static void sp_4096_sqr_78(sp_digit* r, const sp_digit* a) } #endif /* !WOLFSSL_SP_SMALL */ -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -18382,7 +18382,7 @@ static void sp_4096_mont_reduce_39(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_mul_39(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -18396,7 +18396,7 @@ SP_NOINLINE static void sp_4096_mont_mul_39(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_sqr_39(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -19291,7 +19291,7 @@ static void sp_4096_mont_reduce_78(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_mul_78(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -19305,7 +19305,7 @@ SP_NOINLINE static void sp_4096_mont_mul_78(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_sqr_78(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -21923,7 +21923,7 @@ static void sp_256_mont_reduce_5(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_256_mont_mul_5(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -21937,7 +21937,7 @@ SP_NOINLINE static void sp_256_mont_mul_5(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_256_mont_sqr_5(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -21953,7 +21953,7 @@ SP_NOINLINE static void sp_256_mont_sqr_5(sp_digit* r, const sp_digit* a, * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_256_mont_sqr_n_5(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -23439,7 +23439,7 @@ static void sp_256_ecc_recode_6_5(const sp_digit* k, ecc_recode_256* v) /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_256_get_point_33_5(sp_point_256* r, const sp_point_256* table, @@ -23826,7 +23826,7 @@ static int sp_256_gen_stripe_table_5(const sp_point_256* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_256_get_entry_256_5(sp_point_256* r, @@ -24009,7 +24009,7 @@ static THREAD_LS_T int sp_cache_256_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_256(const sp_point_256* g, sp_cache_256_t** cache) @@ -24198,7 +24198,7 @@ int sp_ecc_mulmod_256(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -25666,7 +25666,7 @@ int sp_ecc_mulmod_base_256(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -27083,7 +27083,7 @@ static void sp_256_add_points_5(sp_point_256* p1, const sp_point_256* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -28810,7 +28810,7 @@ static void sp_384_mont_reduce_7(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_384_mont_mul_7(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -28824,7 +28824,7 @@ SP_NOINLINE static void sp_384_mont_mul_7(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_384_mont_sqr_7(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -28840,7 +28840,7 @@ SP_NOINLINE static void sp_384_mont_sqr_7(sp_digit* r, const sp_digit* a, * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_384_mont_sqr_n_7(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -30383,7 +30383,7 @@ static void sp_384_ecc_recode_6_7(const sp_digit* k, ecc_recode_384* v) /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_384_get_point_33_7(sp_point_384* r, const sp_point_384* table, @@ -30782,7 +30782,7 @@ static int sp_384_gen_stripe_table_7(const sp_point_384* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_384_get_entry_256_7(sp_point_384* r, @@ -30973,7 +30973,7 @@ static THREAD_LS_T int sp_cache_384_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_384(const sp_point_384* g, sp_cache_384_t** cache) @@ -31162,7 +31162,7 @@ int sp_ecc_mulmod_384(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -33140,7 +33140,7 @@ int sp_ecc_mulmod_base_384(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -34538,7 +34538,7 @@ static void sp_384_add_points_7(sp_point_384* p1, const sp_point_384* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -36335,7 +36335,7 @@ static void sp_521_mont_reduce_order_9(sp_digit* a, const sp_digit* m, sp_digit * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_521_mont_mul_9(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -36349,7 +36349,7 @@ SP_NOINLINE static void sp_521_mont_mul_9(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_521_mont_sqr_9(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -36365,7 +36365,7 @@ SP_NOINLINE static void sp_521_mont_sqr_9(sp_digit* r, const sp_digit* a, * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_521_mont_sqr_n_9(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -37791,7 +37791,7 @@ static void sp_521_ecc_recode_6_9(const sp_digit* k, ecc_recode_521* v) /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_521_get_point_33_9(sp_point_521* r, const sp_point_521* table, @@ -38202,7 +38202,7 @@ static int sp_521_gen_stripe_table_9(const sp_point_521* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_521_get_entry_256_9(sp_point_521* r, @@ -38401,7 +38401,7 @@ static THREAD_LS_T int sp_cache_521_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_521(const sp_point_521* g, sp_cache_521_t** cache) @@ -38590,7 +38590,7 @@ int sp_ecc_mulmod_521(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -40568,7 +40568,7 @@ int sp_ecc_mulmod_base_521(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -42000,7 +42000,7 @@ static void sp_521_add_points_9(sp_point_521* p1, const sp_point_521* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -44297,7 +44297,7 @@ static void sp_1024_mont_reduce_18(sp_digit* a, const sp_digit* m, sp_digit mp) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_1024_mont_mul_18(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -44311,7 +44311,7 @@ SP_NOINLINE static void sp_1024_mont_mul_18(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_1024_mont_sqr_18(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -46155,7 +46155,7 @@ static THREAD_LS_T int sp_cache_1024_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_1024(const sp_point_1024* g, sp_cache_1024_t** cache) @@ -49774,7 +49774,7 @@ int sp_ecc_mulmod_base_1024(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -50012,7 +50012,7 @@ int sp_ecc_mulmod_table_1024(const mp_int* km, const ecc_point* gm, byte* table, return err; } -/* Multiply p* in projective co-ordinates by q*. +/* Multiply p* in projective coordinates by q*. * * r.x = p.x - (p.y * q.y) * r.y = (p.x * q.y) + p.y @@ -50038,7 +50038,7 @@ static void sp_1024_proj_mul_qx1_18(sp_digit* px, sp_digit* py, sp_1024_mont_add_18(py, t1, py, p1024_mod); } -/* Square p* in projective co-ordinates. +/* Square p* in projective coordinates. * * px' = (p.x + p.y) * (p.x - p.y) = p.x^2 - p.y^2 * py' = 2 * p.x * p.y @@ -51803,7 +51803,7 @@ int sp_ModExp_Fp_star_1024(const mp_int* base, mp_int* exp, mp_int* res) } #endif /* WOLFSSL_SP_SMALL */ -/* Multiply p* by q* in projective co-ordinates. +/* Multiply p* by q* in projective coordinates. * * p.x' = (p.x * q.x) - (p.y * q.y) * p.y' = (p.x * q.y) + (p.y * q.x) diff --git a/wolfcrypt/src/sp_cortexm.c b/wolfcrypt/src/sp_cortexm.c index 6f51ba053..51e936dee 100644 --- a/wolfcrypt/src/sp_cortexm.c +++ b/wolfcrypt/src/sp_cortexm.c @@ -2969,7 +2969,7 @@ SP_NOINLINE static void sp_2048_sqr_32(sp_digit* r, const sp_digit* a) #endif /* WOLFSSL_SP_SMALL */ #endif /* (WOLFSSL_HAVE_SP_RSA & !WOLFSSL_RSA_PUBLIC_ONLY) | WOLFSSL_HAVE_SP_DH */ -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -3196,7 +3196,7 @@ SP_NOINLINE static void sp_2048_mont_reduce_32(sp_digit* a, const sp_digit* m, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_mul_32(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -3210,7 +3210,7 @@ SP_NOINLINE static void sp_2048_mont_mul_32(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_sqr_32(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -3907,7 +3907,7 @@ SP_NOINLINE static void sp_2048_mont_reduce_64(sp_digit* a, const sp_digit* m, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_mul_64(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -3921,7 +3921,7 @@ SP_NOINLINE static void sp_2048_mont_mul_64(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_sqr_64(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -8499,7 +8499,7 @@ SP_NOINLINE static void sp_3072_sqr_48(sp_digit* r, const sp_digit* a) #endif /* WOLFSSL_SP_SMALL */ #endif /* (WOLFSSL_HAVE_SP_RSA & !WOLFSSL_RSA_PUBLIC_ONLY) | WOLFSSL_HAVE_SP_DH */ -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -8726,7 +8726,7 @@ SP_NOINLINE static void sp_3072_mont_reduce_48(sp_digit* a, const sp_digit* m, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_mul_48(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -8740,7 +8740,7 @@ SP_NOINLINE static void sp_3072_mont_mul_48(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_sqr_48(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -9438,7 +9438,7 @@ SP_NOINLINE static void sp_3072_mont_reduce_96(sp_digit* a, const sp_digit* m, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_mul_96(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -9452,7 +9452,7 @@ SP_NOINLINE static void sp_3072_mont_mul_96(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_sqr_96(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -12921,7 +12921,7 @@ SP_NOINLINE static void sp_4096_sqr_128(sp_digit* r, const sp_digit* a) } #endif /* WOLFSSL_SP_SMALL */ -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -13150,7 +13150,7 @@ SP_NOINLINE static void sp_4096_mont_reduce_128(sp_digit* a, const sp_digit* m, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_mul_128(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -13164,7 +13164,7 @@ SP_NOINLINE static void sp_4096_mont_mul_128(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_sqr_128(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -17203,7 +17203,7 @@ static int sp_256_point_to_ecc_point_8(const sp_point_256* p, ecc_point* pm) * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_256_mont_mul_8(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -17860,7 +17860,7 @@ SP_NOINLINE static void sp_256_mont_mul_8(sp_digit* r, const sp_digit* a, const * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_256_mont_sqr_8(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -18378,7 +18378,7 @@ SP_NOINLINE static void sp_256_mont_sqr_8(sp_digit* r, const sp_digit* a, const * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_256_mont_sqr_n_8(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -19706,7 +19706,7 @@ static int sp_256_proj_point_add_8_nb(sp_ecc_ctx_t* sp_ctx, sp_point_256* r, /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_256_get_point_16_8(sp_point_256* r, const sp_point_256* table, @@ -20257,7 +20257,7 @@ static int sp_256_gen_stripe_table_8(const sp_point_256* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_256_get_entry_16_8(sp_point_256* r, @@ -20452,7 +20452,7 @@ static THREAD_LS_T int sp_cache_256_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_256(const sp_point_256* g, sp_cache_256_t** cache) @@ -20677,7 +20677,7 @@ static int sp_256_gen_stripe_table_8(const sp_point_256* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_256_get_entry_256_8(sp_point_256* r, @@ -20872,7 +20872,7 @@ static THREAD_LS_T int sp_cache_256_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_256(const sp_point_256* g, sp_cache_256_t** cache) @@ -21061,7 +21061,7 @@ int sp_ecc_mulmod_256(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -22610,7 +22610,7 @@ int sp_ecc_mulmod_base_256(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -24237,7 +24237,7 @@ static void sp_256_add_points_8(sp_point_256* p1, const sp_point_256* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -26047,7 +26047,7 @@ SP_NOINLINE static void sp_384_mont_reduce_12(sp_digit* a, const sp_digit* m, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_384_mont_mul_12(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -26061,7 +26061,7 @@ SP_NOINLINE static void sp_384_mont_mul_12(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_384_mont_sqr_12(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -26077,7 +26077,7 @@ SP_NOINLINE static void sp_384_mont_sqr_12(sp_digit* r, const sp_digit* a, * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_384_mont_sqr_n_12(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -26964,7 +26964,7 @@ static int sp_384_proj_point_add_12_nb(sp_ecc_ctx_t* sp_ctx, sp_point_384* r, /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_384_get_point_16_12(sp_point_384* r, const sp_point_384* table, @@ -27539,7 +27539,7 @@ static int sp_384_gen_stripe_table_12(const sp_point_384* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_384_get_entry_16_12(sp_point_384* r, @@ -27750,7 +27750,7 @@ static THREAD_LS_T int sp_cache_384_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_384(const sp_point_384* g, sp_cache_384_t** cache) @@ -27975,7 +27975,7 @@ static int sp_384_gen_stripe_table_12(const sp_point_384* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_384_get_entry_256_12(sp_point_384* r, @@ -28186,7 +28186,7 @@ static THREAD_LS_T int sp_cache_384_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_384(const sp_point_384* g, sp_cache_384_t** cache) @@ -28375,7 +28375,7 @@ int sp_ecc_mulmod_384(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -29924,7 +29924,7 @@ int sp_ecc_mulmod_base_384(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -31596,7 +31596,7 @@ static void sp_384_add_points_12(sp_point_384* p1, const sp_point_384* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -33571,7 +33571,7 @@ SP_NOINLINE static void sp_521_mont_reduce_order_17(sp_digit* a, const sp_digit* * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_521_mont_mul_17(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -33585,7 +33585,7 @@ SP_NOINLINE static void sp_521_mont_mul_17(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_521_mont_sqr_17(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -33601,7 +33601,7 @@ SP_NOINLINE static void sp_521_mont_sqr_17(sp_digit* r, const sp_digit* a, * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_521_mont_sqr_n_17(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -34810,7 +34810,7 @@ static int sp_521_proj_point_add_17_nb(sp_ecc_ctx_t* sp_ctx, sp_point_521* r, /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_521_get_point_16_17(sp_point_521* r, const sp_point_521* table, @@ -35419,7 +35419,7 @@ static int sp_521_gen_stripe_table_17(const sp_point_521* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_521_get_entry_16_17(sp_point_521* r, @@ -35650,7 +35650,7 @@ static THREAD_LS_T int sp_cache_521_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_521(const sp_point_521* g, sp_cache_521_t** cache) @@ -35875,7 +35875,7 @@ static int sp_521_gen_stripe_table_17(const sp_point_521* a, /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ static void sp_521_get_entry_256_17(sp_point_521* r, @@ -36106,7 +36106,7 @@ static THREAD_LS_T int sp_cache_521_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_521(const sp_point_521* g, sp_cache_521_t** cache) @@ -36295,7 +36295,7 @@ int sp_ecc_mulmod_521(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -38388,7 +38388,7 @@ int sp_ecc_mulmod_base_521(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -40635,7 +40635,7 @@ static void sp_521_add_points_17(sp_point_521* p1, const sp_point_521* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -43196,7 +43196,7 @@ SP_NOINLINE static void sp_1024_mont_reduce_32(sp_digit* a, const sp_digit* m, * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_1024_mont_mul_32(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -43210,7 +43210,7 @@ SP_NOINLINE static void sp_1024_mont_mul_32(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_1024_mont_sqr_32(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -45548,7 +45548,7 @@ static THREAD_LS_T int sp_cache_1024_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_1024(const sp_point_1024* g, sp_cache_1024_t** cache) @@ -45903,7 +45903,7 @@ static THREAD_LS_T int sp_cache_1024_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_1024(const sp_point_1024* g, sp_cache_1024_t** cache) @@ -49729,7 +49729,7 @@ int sp_ecc_mulmod_base_1024(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -49967,7 +49967,7 @@ int sp_ecc_mulmod_table_1024(const mp_int* km, const ecc_point* gm, byte* table, return err; } -/* Multiply p* in projective co-ordinates by q*. +/* Multiply p* in projective coordinates by q*. * * r.x = p.x - (p.y * q.y) * r.y = (p.x * q.y) + p.y @@ -49993,7 +49993,7 @@ static void sp_1024_proj_mul_qx1_32(sp_digit* px, sp_digit* py, sp_1024_mont_add_32(py, t1, py, p1024_mod); } -/* Square p* in projective co-ordinates. +/* Square p* in projective coordinates. * * px' = (p.x + p.y) * (p.x - p.y) = p.x^2 - p.y^2 * py' = 2 * p.x * p.y @@ -52014,7 +52014,7 @@ int sp_ModExp_Fp_star_1024(const mp_int* base, mp_int* exp, mp_int* res) } #endif /* WOLFSSL_SP_SMALL */ -/* Multiply p* by q* in projective co-ordinates. +/* Multiply p* by q* in projective coordinates. * * p.x' = (p.x * q.x) - (p.y * q.y) * p.y' = (p.x * q.y) + (p.y * q.x) diff --git a/wolfcrypt/src/sp_x86_64.c b/wolfcrypt/src/sp_x86_64.c index 862d17316..4b63aa7fc 100644 --- a/wolfcrypt/src/sp_x86_64.c +++ b/wolfcrypt/src/sp_x86_64.c @@ -334,7 +334,7 @@ extern sp_digit sp_2048_sub_in_place_16(sp_digit* a, const sp_digit* b); #endif #endif /* (WOLFSSL_HAVE_SP_RSA & !WOLFSSL_RSA_PUBLIC_ONLY) | WOLFSSL_HAVE_SP_DH */ -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -400,7 +400,7 @@ extern void sp_2048_mont_reduce_16(sp_digit* a, const sp_digit* m, sp_digit mp); * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_mul_16(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -414,7 +414,7 @@ SP_NOINLINE static void sp_2048_mont_mul_16(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_sqr_16(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -823,7 +823,7 @@ extern void sp_2048_mont_reduce_avx2_16(sp_digit* a, const sp_digit* m, sp_digit * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_mul_avx2_16(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -839,7 +839,7 @@ SP_NOINLINE static void sp_2048_mont_mul_avx2_16(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_sqr_avx2_16(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -1091,7 +1091,7 @@ extern void sp_2048_mont_reduce_32(sp_digit* a, const sp_digit* m, sp_digit mp); * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_mul_32(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -1105,7 +1105,7 @@ SP_NOINLINE static void sp_2048_mont_mul_32(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_sqr_32(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -1636,7 +1636,7 @@ extern void sp_2048_mont_reduce_avx2_32(sp_digit* a, const sp_digit* m, sp_digit * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_mul_avx2_32(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -1652,7 +1652,7 @@ SP_NOINLINE static void sp_2048_mont_mul_avx2_32(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_2048_mont_sqr_avx2_32(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -3336,7 +3336,7 @@ extern void sp_3072_sqr_avx2_48(sp_digit* r, const sp_digit* a); #if (defined(WOLFSSL_HAVE_SP_RSA) && !defined(WOLFSSL_RSA_PUBLIC_ONLY)) || defined(WOLFSSL_HAVE_SP_DH) #endif /* (WOLFSSL_HAVE_SP_RSA & !WOLFSSL_RSA_PUBLIC_ONLY) | WOLFSSL_HAVE_SP_DH */ -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -3402,7 +3402,7 @@ extern void sp_3072_mont_reduce_24(sp_digit* a, const sp_digit* m, sp_digit mp); * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_mul_24(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -3416,7 +3416,7 @@ SP_NOINLINE static void sp_3072_mont_mul_24(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_sqr_24(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -3825,7 +3825,7 @@ extern void sp_3072_mont_reduce_avx2_24(sp_digit* a, const sp_digit* m, sp_digit * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_mul_avx2_24(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -3841,7 +3841,7 @@ SP_NOINLINE static void sp_3072_mont_mul_avx2_24(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_sqr_avx2_24(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -4093,7 +4093,7 @@ extern void sp_3072_mont_reduce_48(sp_digit* a, const sp_digit* m, sp_digit mp); * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_mul_48(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -4107,7 +4107,7 @@ SP_NOINLINE static void sp_3072_mont_mul_48(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_sqr_48(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -4586,7 +4586,7 @@ extern void sp_3072_mont_reduce_avx2_48(sp_digit* a, const sp_digit* m, sp_digit * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_mul_avx2_48(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -4602,7 +4602,7 @@ SP_NOINLINE static void sp_3072_mont_mul_avx2_48(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_3072_mont_sqr_avx2_48(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -6150,7 +6150,7 @@ extern void sp_4096_sqr_avx2_64(sp_digit* r, const sp_digit* a); } #endif -/* Caclulate the bottom digit of -1/a mod 2^n. +/* Calculate the bottom digit of -1/a mod 2^n. * * a A single precision number. * rho Bottom word of inverse. @@ -6217,7 +6217,7 @@ extern void sp_4096_mont_reduce_64(sp_digit* a, const sp_digit* m, sp_digit mp); * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_mul_64(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -6231,7 +6231,7 @@ SP_NOINLINE static void sp_4096_mont_mul_64(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_sqr_64(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -6710,7 +6710,7 @@ extern void sp_4096_mont_reduce_avx2_64(sp_digit* a, const sp_digit* m, sp_digit * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_mul_avx2_64(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -6726,7 +6726,7 @@ SP_NOINLINE static void sp_4096_mont_mul_avx2_64(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_4096_mont_sqr_avx2_64(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -8397,7 +8397,7 @@ extern void sp_256_mont_sqr_4(sp_digit* r, const sp_digit* a, const sp_digit* m, * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_256_mont_sqr_n_4(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -9616,7 +9616,7 @@ extern void sp_256_mont_sqr_avx2_4(sp_digit* r, const sp_digit* a, const sp_digi * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_256_mont_sqr_n_avx2_4(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -10994,7 +10994,7 @@ static THREAD_LS_T int sp_cache_256_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_256(const sp_point_256* g, sp_cache_256_t** cache) @@ -11571,7 +11571,7 @@ int sp_ecc_mulmod_256(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -24409,7 +24409,7 @@ int sp_ecc_mulmod_base_256(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -26012,7 +26012,7 @@ static void sp_256_add_points_4(sp_point_256* p1, const sp_point_256* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -27509,7 +27509,7 @@ extern void sp_384_mont_reduce_order_6(sp_digit* a, const sp_digit* m, sp_digit * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_384_mont_mul_6(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -27523,7 +27523,7 @@ SP_NOINLINE static void sp_384_mont_mul_6(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_384_mont_sqr_6(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -27539,7 +27539,7 @@ SP_NOINLINE static void sp_384_mont_sqr_6(sp_digit* r, const sp_digit* a, * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_384_mont_sqr_n_6(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -28751,7 +28751,7 @@ extern void sp_384_mont_reduce_order_avx2_6(sp_digit* a, const sp_digit* m, sp_d * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_384_mont_mul_avx2_6(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -28767,7 +28767,7 @@ SP_NOINLINE static void sp_384_mont_mul_avx2_6(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_384_mont_sqr_avx2_6(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -28784,7 +28784,7 @@ SP_NOINLINE static void sp_384_mont_sqr_avx2_6(sp_digit* r, const sp_digit* a, * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_384_mont_sqr_n_avx2_6(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -30180,7 +30180,7 @@ static THREAD_LS_T int sp_cache_384_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_384(const sp_point_384* g, sp_cache_384_t** cache) @@ -30758,7 +30758,7 @@ int sp_ecc_mulmod_384(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -49410,7 +49410,7 @@ int sp_ecc_mulmod_base_384(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -50962,7 +50962,7 @@ static void sp_384_add_points_6(sp_point_384* p1, const sp_point_384* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -52416,7 +52416,7 @@ extern void sp_521_mont_sqr_9(sp_digit* r, const sp_digit* a, const sp_digit* m, * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_521_mont_sqr_n_9(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -53635,7 +53635,7 @@ extern void sp_521_mont_sqr_avx2_9(sp_digit* r, const sp_digit* a, const sp_digi * a Number to square in Montgomery form. * n Number of times to square. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ static void sp_521_mont_sqr_n_avx2_9(sp_digit* r, const sp_digit* a, int n, const sp_digit* m, sp_digit mp) @@ -55036,7 +55036,7 @@ static THREAD_LS_T int sp_cache_521_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_521(const sp_point_521* g, sp_cache_521_t** cache) @@ -55614,7 +55614,7 @@ int sp_ecc_mulmod_521(const mp_int* km, const ecc_point* gm, ecc_point* r, * * km Scalar to multiply by. * p Point to multiply. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -90452,7 +90452,7 @@ int sp_ecc_mulmod_base_521(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -92071,7 +92071,7 @@ static void sp_521_add_points_9(sp_point_521* p1, const sp_point_521* p2, * p2 Public point and temporary. * s Second part of signature as a number. * u1 Temporary number. - * u2 Temproray number. + * u2 Temporary number. * heap Heap to use for allocation. * returns MEMORY_E when memory allocation fails and MP_OKAY on success. */ @@ -93694,7 +93694,7 @@ extern void sp_1024_mont_reduce_16(sp_digit* a, const sp_digit* m, sp_digit mp); * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_1024_mont_mul_16(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -93708,7 +93708,7 @@ SP_NOINLINE static void sp_1024_mont_mul_16(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_1024_mont_sqr_16(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -94868,7 +94868,7 @@ extern void sp_1024_mont_reduce_avx2_16(sp_digit* a, const sp_digit* m, sp_digit * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_1024_mont_mul_avx2_16(sp_digit* r, const sp_digit* a, const sp_digit* b, const sp_digit* m, sp_digit mp) @@ -94884,7 +94884,7 @@ SP_NOINLINE static void sp_1024_mont_mul_avx2_16(sp_digit* r, const sp_digit* a, * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ SP_NOINLINE static void sp_1024_mont_sqr_avx2_16(sp_digit* r, const sp_digit* a, const sp_digit* m, sp_digit mp) @@ -96221,7 +96221,7 @@ static THREAD_LS_T int sp_cache_1024_inited = 0; /* Get the cache entry for the point. * - * g [in] Point scalar multipling. + * g [in] Point scalar multiplying. * cache [out] Cache table to use. */ static void sp_ecc_get_cache_1024(const sp_point_1024* g, sp_cache_1024_t** cache) @@ -100214,7 +100214,7 @@ int sp_ecc_mulmod_base_1024(const mp_int* km, ecc_point* r, int map, void* heap) * the result. If map is true then convert result to affine coordinates. * * km Scalar to multiply by. - * am Point to add to scalar mulitply result. + * am Point to add to scalar multiply result. * inMont Point to add is in montgomery form. * r Resulting point. * map Indicates whether to convert result to affine. @@ -100488,7 +100488,7 @@ int sp_ecc_mulmod_table_1024(const mp_int* km, const ecc_point* gm, byte* table, return err; } -/* Multiply p* in projective co-ordinates by q*. +/* Multiply p* in projective coordinates by q*. * * r.x = p.x - (p.y * q.y) * r.y = (p.x * q.y) + p.y @@ -100514,7 +100514,7 @@ static void sp_1024_proj_mul_qx1_16(sp_digit* px, sp_digit* py, sp_1024_mont_add_16(py, t1, py, p1024_mod); } -/* Square p* in projective co-ordinates. +/* Square p* in projective coordinates. * * px' = (p.x + p.y) * (p.x - p.y) = p.x^2 - p.y^2 * py' = 2 * p.x * p.y @@ -102280,7 +102280,7 @@ static int sp_ModExp_Fp_star_x64_1024(const mp_int* base, mp_int* exp, mp_int* r #endif /* WOLFSSL_SP_SMALL */ #ifdef HAVE_INTEL_AVX2 -/* Multiply p* in projective co-ordinates by q*. +/* Multiply p* in projective coordinates by q*. * * r.x = p.x - (p.y * q.y) * r.y = (p.x * q.y) + p.y @@ -102306,7 +102306,7 @@ static void sp_1024_proj_mul_qx1_avx2_16(sp_digit* px, sp_digit* py, sp_1024_mont_add_avx2_16(py, t1, py, p1024_mod); } -/* Square p* in projective co-ordinates. +/* Square p* in projective coordinates. * * px' = (p.x + p.y) * (p.x - p.y) = p.x^2 - p.y^2 * py' = 2 * p.x * p.y @@ -102559,7 +102559,7 @@ int sp_ModExp_Fp_star_1024(const mp_int* base, mp_int* exp, mp_int* res) return err; } -/* Multiply p* by q* in projective co-ordinates. +/* Multiply p* by q* in projective coordinates. * * p.x' = (p.x * q.x) - (p.y * q.y) * p.y' = (p.x * q.y) + (p.y * q.x) @@ -103360,7 +103360,7 @@ static int sp_Pairing_x64_1024(const ecc_point* pm, const ecc_point* qm, mp_int* #endif /* WOLFSSL_SP_SMALL */ #ifdef HAVE_INTEL_AVX2 -/* Multiply p* by q* in projective co-ordinates. +/* Multiply p* by q* in projective coordinates. * * p.x' = (p.x * q.x) - (p.y * q.y) * p.y' = (p.x * q.y) + (p.y * q.x) diff --git a/wolfcrypt/src/sp_x86_64_asm.S b/wolfcrypt/src/sp_x86_64_asm.S index 31db01023..18f36fe60 100644 --- a/wolfcrypt/src/sp_x86_64_asm.S +++ b/wolfcrypt/src/sp_x86_64_asm.S @@ -55805,7 +55805,7 @@ _sp_256_cond_copy_4: * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ #ifndef __APPLE__ .text @@ -56009,7 +56009,7 @@ _sp_256_mont_mul_4: * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ #ifndef __APPLE__ .text @@ -57046,7 +57046,7 @@ _sp_256_mont_dbl_sub_4: /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of point to retrieve. */ #ifndef __APPLE__ @@ -57115,7 +57115,7 @@ L_256_get_point_33_4_start_1: /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of point to retrieve. */ #ifndef __APPLE__ @@ -57174,7 +57174,7 @@ L_256_get_point_33_avx2_4_start: * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ #ifndef __APPLE__ .text @@ -57355,7 +57355,7 @@ _sp_256_mont_mul_avx2_4: * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ #ifndef __APPLE__ .text @@ -57785,7 +57785,7 @@ _sp_256_div2_avx2_4: /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ #ifndef __APPLE__ @@ -57845,7 +57845,7 @@ L_256_get_entry_64_4_start_0: /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ #ifndef __APPLE__ @@ -57895,7 +57895,7 @@ L_256_get_entry_64_avx2_4_start: /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ #ifndef __APPLE__ @@ -57955,7 +57955,7 @@ L_256_get_entry_65_4_start_0: /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ #ifndef __APPLE__ @@ -61536,7 +61536,7 @@ _sp_384_mont_tpl_lower_6: /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of point to retrieve. */ #ifndef __APPLE__ @@ -61636,7 +61636,7 @@ L_384_get_point_33_6_start_2: /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of point to retrieve. */ #ifndef __APPLE__ @@ -62171,7 +62171,7 @@ _sp_384_div2_avx2_6: /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ #ifndef __APPLE__ @@ -62241,7 +62241,7 @@ L_384_get_entry_64_6_start_0: /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ #ifndef __APPLE__ @@ -62301,7 +62301,7 @@ L_384_get_entry_64_avx2_6_start: /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ #ifndef __APPLE__ @@ -62371,7 +62371,7 @@ L_384_get_entry_65_6_start_0: /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ #ifndef __APPLE__ @@ -65220,7 +65220,7 @@ _sp_521_cond_copy_9: * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ #ifndef __APPLE__ .text @@ -65817,7 +65817,7 @@ _sp_521_mont_mul_9: * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ #ifndef __APPLE__ .text @@ -67080,7 +67080,7 @@ _sp_521_div2_9: /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of point to retrieve. */ #ifndef __APPLE__ @@ -67225,7 +67225,7 @@ L_521_get_point_33_9_start_2: /* Touch each possible point that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of point to retrieve. */ #ifndef __APPLE__ @@ -67326,7 +67326,7 @@ L_521_get_point_33_avx2_9_start: * a First number to multiply in Montgomery form. * b Second number to multiply in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ #ifndef __APPLE__ .text @@ -67941,7 +67941,7 @@ _sp_521_mont_mul_avx2_9: * r Result of squaring. * a Number to square in Montgomery form. * m Modulus (prime). - * mp Montgomery mulitplier. + * mp Montgomery multiplier. */ #ifndef __APPLE__ .text @@ -68847,7 +68847,7 @@ _sp_521_div2_avx2_9: /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ #ifndef __APPLE__ @@ -68966,7 +68966,7 @@ L_521_get_entry_64_9_start_1: /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ #ifndef __APPLE__ @@ -69044,7 +69044,7 @@ L_521_get_entry_64_avx2_9_start: /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ #ifndef __APPLE__ @@ -69163,7 +69163,7 @@ L_521_get_entry_65_9_start_1: /* Touch each possible entry that could be being copied. * * r Point to copy into. - * table Table - start of the entires to access + * table Table - start of the entries to access * idx Index of entry to retrieve. */ #ifndef __APPLE__ diff --git a/wolfcrypt/src/sp_x86_64_asm.asm b/wolfcrypt/src/sp_x86_64_asm.asm index 66a7f003b..fcf4ce193 100644 --- a/wolfcrypt/src/sp_x86_64_asm.asm +++ b/wolfcrypt/src/sp_x86_64_asm.asm @@ -54716,7 +54716,7 @@ _text ENDS ; * a First number to multiply in Montgomery form. ; * b Second number to multiply in Montgomery form. ; * m Modulus (prime). -; * mp Montgomery mulitplier. +; * mp Montgomery multiplier. ; */ _text SEGMENT READONLY PARA sp_256_mont_mul_4 PROC @@ -54913,7 +54913,7 @@ _text ENDS ; * r Result of squaring. ; * a Number to square in Montgomery form. ; * m Modulus (prime). -; * mp Montgomery mulitplier. +; * mp Montgomery multiplier. ; */ _text SEGMENT READONLY PARA sp_256_mont_sqr_4 PROC @@ -55852,7 +55852,7 @@ IFNDEF WC_NO_CACHE_RESISTANT ; /* Touch each possible point that could be being copied. ; * ; * r Point to copy into. -; * table Table - start of the entires to access +; * table Table - start of the entries to access ; * idx Index of point to retrieve. ; */ _text SEGMENT READONLY PARA @@ -55932,7 +55932,7 @@ IFDEF HAVE_INTEL_AVX2 ; /* Touch each possible point that could be being copied. ; * ; * r Point to copy into. -; * table Table - start of the entires to access +; * table Table - start of the entries to access ; * idx Index of point to retrieve. ; */ _text SEGMENT READONLY PARA @@ -55990,7 +55990,7 @@ IFDEF HAVE_INTEL_AVX2 ; * a First number to multiply in Montgomery form. ; * b Second number to multiply in Montgomery form. ; * m Modulus (prime). -; * mp Montgomery mulitplier. +; * mp Montgomery multiplier. ; */ _text SEGMENT READONLY PARA sp_256_mont_mul_avx2_4 PROC @@ -56165,7 +56165,7 @@ IFDEF HAVE_INTEL_AVX2 ; * r Result of squaring. ; * a Number to square in Montgomery form. ; * m Modulus (prime). -; * mp Montgomery mulitplier. +; * mp Montgomery multiplier. ; */ _text SEGMENT READONLY PARA sp_256_mont_sqr_avx2_4 PROC @@ -56570,7 +56570,7 @@ IFNDEF WC_NO_CACHE_RESISTANT ; /* Touch each possible entry that could be being copied. ; * ; * r Point to copy into. -; * table Table - start of the entires to access +; * table Table - start of the entries to access ; * idx Index of entry to retrieve. ; */ _text SEGMENT READONLY PARA @@ -56633,7 +56633,7 @@ IFDEF HAVE_INTEL_AVX2 ; /* Touch each possible entry that could be being copied. ; * ; * r Point to copy into. -; * table Table - start of the entires to access +; * table Table - start of the entries to access ; * idx Index of entry to retrieve. ; */ _text SEGMENT READONLY PARA @@ -56678,7 +56678,7 @@ IFNDEF WC_NO_CACHE_RESISTANT ; /* Touch each possible entry that could be being copied. ; * ; * r Point to copy into. -; * table Table - start of the entires to access +; * table Table - start of the entries to access ; * idx Index of entry to retrieve. ; */ _text SEGMENT READONLY PARA @@ -56741,7 +56741,7 @@ IFDEF HAVE_INTEL_AVX2 ; /* Touch each possible entry that could be being copied. ; * ; * r Point to copy into. -; * table Table - start of the entires to access +; * table Table - start of the entries to access ; * idx Index of entry to retrieve. ; */ _text SEGMENT READONLY PARA @@ -60059,7 +60059,7 @@ IFNDEF WC_NO_CACHE_RESISTANT ; /* Touch each possible point that could be being copied. ; * ; * r Point to copy into. -; * table Table - start of the entires to access +; * table Table - start of the entries to access ; * idx Index of point to retrieve. ; */ _text SEGMENT READONLY PARA @@ -60170,7 +60170,7 @@ IFDEF HAVE_INTEL_AVX2 ; /* Touch each possible point that could be being copied. ; * ; * r Point to copy into. -; * table Table - start of the entires to access +; * table Table - start of the entries to access ; * idx Index of point to retrieve. ; */ _text SEGMENT READONLY PARA @@ -60693,7 +60693,7 @@ IFNDEF WC_NO_CACHE_RESISTANT ; /* Touch each possible entry that could be being copied. ; * ; * r Point to copy into. -; * table Table - start of the entires to access +; * table Table - start of the entries to access ; * idx Index of entry to retrieve. ; */ _text SEGMENT READONLY PARA @@ -60774,7 +60774,7 @@ IFDEF HAVE_INTEL_AVX2 ; /* Touch each possible entry that could be being copied. ; * ; * r Point to copy into. -; * table Table - start of the entires to access +; * table Table - start of the entries to access ; * idx Index of entry to retrieve. ; */ _text SEGMENT READONLY PARA @@ -60837,7 +60837,7 @@ IFNDEF WC_NO_CACHE_RESISTANT ; /* Touch each possible entry that could be being copied. ; * ; * r Point to copy into. -; * table Table - start of the entires to access +; * table Table - start of the entries to access ; * idx Index of entry to retrieve. ; */ _text SEGMENT READONLY PARA @@ -60918,7 +60918,7 @@ IFDEF HAVE_INTEL_AVX2 ; /* Touch each possible entry that could be being copied. ; * ; * r Point to copy into. -; * table Table - start of the entires to access +; * table Table - start of the entries to access ; * idx Index of entry to retrieve. ; */ _text SEGMENT READONLY PARA @@ -63604,7 +63604,7 @@ _text ENDS ; * a First number to multiply in Montgomery form. ; * b Second number to multiply in Montgomery form. ; * m Modulus (prime). -; * mp Montgomery mulitplier. +; * mp Montgomery multiplier. ; */ _text SEGMENT READONLY PARA sp_521_mont_mul_9 PROC @@ -64194,7 +64194,7 @@ _text ENDS ; * r Result of squaring. ; * a Number to square in Montgomery form. ; * m Modulus (prime). -; * mp Montgomery mulitplier. +; * mp Montgomery multiplier. ; */ _text SEGMENT READONLY PARA sp_521_mont_sqr_9 PROC @@ -65376,7 +65376,7 @@ IFNDEF WC_NO_CACHE_RESISTANT ; /* Touch each possible point that could be being copied. ; * ; * r Point to copy into. -; * table Table - start of the entires to access +; * table Table - start of the entries to access ; * idx Index of point to retrieve. ; */ _text SEGMENT READONLY PARA @@ -65536,7 +65536,7 @@ IFDEF HAVE_INTEL_AVX2 ; /* Touch each possible point that could be being copied. ; * ; * r Point to copy into. -; * table Table - start of the entires to access +; * table Table - start of the entries to access ; * idx Index of point to retrieve. ; */ _text SEGMENT READONLY PARA @@ -65652,7 +65652,7 @@ IFDEF HAVE_INTEL_AVX2 ; * a First number to multiply in Montgomery form. ; * b Second number to multiply in Montgomery form. ; * m Modulus (prime). -; * mp Montgomery mulitplier. +; * mp Montgomery multiplier. ; */ _text SEGMENT READONLY PARA sp_521_mont_mul_avx2_9 PROC @@ -66262,7 +66262,7 @@ IFDEF HAVE_INTEL_AVX2 ; * r Result of squaring. ; * a Number to square in Montgomery form. ; * m Modulus (prime). -; * mp Montgomery mulitplier. +; * mp Montgomery multiplier. ; */ _text SEGMENT READONLY PARA sp_521_mont_sqr_avx2_9 PROC @@ -67141,7 +67141,7 @@ IFNDEF WC_NO_CACHE_RESISTANT ; /* Touch each possible entry that could be being copied. ; * ; * r Point to copy into. -; * table Table - start of the entires to access +; * table Table - start of the entries to access ; * idx Index of entry to retrieve. ; */ _text SEGMENT READONLY PARA @@ -67273,7 +67273,7 @@ IFDEF HAVE_INTEL_AVX2 ; /* Touch each possible entry that could be being copied. ; * ; * r Point to copy into. -; * table Table - start of the entires to access +; * table Table - start of the entries to access ; * idx Index of entry to retrieve. ; */ _text SEGMENT READONLY PARA @@ -67358,7 +67358,7 @@ IFNDEF WC_NO_CACHE_RESISTANT ; /* Touch each possible entry that could be being copied. ; * ; * r Point to copy into. -; * table Table - start of the entires to access +; * table Table - start of the entries to access ; * idx Index of entry to retrieve. ; */ _text SEGMENT READONLY PARA @@ -67490,7 +67490,7 @@ IFDEF HAVE_INTEL_AVX2 ; /* Touch each possible entry that could be being copied. ; * ; * r Point to copy into. -; * table Table - start of the entires to access +; * table Table - start of the entries to access ; * idx Index of entry to retrieve. ; */ _text SEGMENT READONLY PARA