/external/rust/crates/quiche/deps/boringssl/src/crypto/fipsmodule/ec/ |
D | p256-x86_64.h | 44 #define P256_LIMBS (256 / BN_BITS2) macro 47 void ecp_nistz256_neg(BN_ULONG res[P256_LIMBS], const BN_ULONG a[P256_LIMBS]); 50 void ecp_nistz256_mul_mont(BN_ULONG res[P256_LIMBS], 51 const BN_ULONG a[P256_LIMBS], 52 const BN_ULONG b[P256_LIMBS]); 55 void ecp_nistz256_sqr_mont(BN_ULONG res[P256_LIMBS], 56 const BN_ULONG a[P256_LIMBS]); 60 static inline void ecp_nistz256_from_mont(BN_ULONG res[P256_LIMBS], in ecp_nistz256_from_mont() argument 61 const BN_ULONG in[P256_LIMBS]) { in ecp_nistz256_from_mont() argument 62 static const BN_ULONG ONE[P256_LIMBS] = { 1 }; in ecp_nistz256_from_mont() [all …]
|
D | p256-x86_64.c | 43 static const BN_ULONG ONE[P256_LIMBS] = { 80 static void copy_conditional(BN_ULONG dst[P256_LIMBS], in copy_conditional() argument 81 const BN_ULONG src[P256_LIMBS], BN_ULONG move) { in copy_conditional() argument 89 if (P256_LIMBS == 8) { in copy_conditional() 123 static void ecp_nistz256_mod_inverse_sqr_mont(BN_ULONG r[P256_LIMBS], in ecp_nistz256_mod_inverse_sqr_mont() argument 124 const BN_ULONG in[P256_LIMBS]) { in ecp_nistz256_mod_inverse_sqr_mont() argument 127 BN_ULONG x2[P256_LIMBS], x3[P256_LIMBS], x6[P256_LIMBS], x12[P256_LIMBS], in ecp_nistz256_mod_inverse_sqr_mont() 128 x15[P256_LIMBS], x30[P256_LIMBS], x32[P256_LIMBS]; in ecp_nistz256_mod_inverse_sqr_mont() 163 BN_ULONG ret[P256_LIMBS]; in ecp_nistz256_mod_inverse_sqr_mont() 195 assert(group->field.width == P256_LIMBS); in ecp_nistz256_windowed_mul() [all …]
|
D | p256-x86_64_test.cc | 111 BN_ULONG order_words[P256_LIMBS]; in TEST() 113 bn_copy_words(order_words, P256_LIMBS, EC_GROUP_get0_order(group.get()))); in TEST() 115 BN_ULONG in[P256_LIMBS], out[P256_LIMBS]; in TEST() 126 static const BN_ULONG kOneMont[P256_LIMBS] = { in TEST() 145 EXPECT_TRUE(bn_less_than_words(in, order_words, P256_LIMBS)); in TEST() 147 EXPECT_TRUE(bn_less_than_words(out, order_words, P256_LIMBS)); in TEST() 168 static bool GetFieldElement(FileTest *t, BN_ULONG out[P256_LIMBS], in GetFieldElement() argument 175 if (bytes.size() != BN_BYTES * P256_LIMBS) { in GetFieldElement() 182 OPENSSL_memset(out, 0, P256_LIMBS * sizeof(BN_ULONG)); in GetFieldElement() 184 out[P256_LIMBS - 1 - (i / BN_BYTES)] <<= 8; in GetFieldElement() [all …]
|
/external/boringssl/src/crypto/fipsmodule/ec/ |
D | p256-x86_64.h | 44 #define P256_LIMBS (256 / BN_BITS2) macro 47 void ecp_nistz256_neg(BN_ULONG res[P256_LIMBS], const BN_ULONG a[P256_LIMBS]); 50 void ecp_nistz256_mul_mont(BN_ULONG res[P256_LIMBS], 51 const BN_ULONG a[P256_LIMBS], 52 const BN_ULONG b[P256_LIMBS]); 55 void ecp_nistz256_sqr_mont(BN_ULONG res[P256_LIMBS], 56 const BN_ULONG a[P256_LIMBS]); 60 static inline void ecp_nistz256_from_mont(BN_ULONG res[P256_LIMBS], in ecp_nistz256_from_mont() argument 61 const BN_ULONG in[P256_LIMBS]) { in ecp_nistz256_from_mont() argument 62 static const BN_ULONG ONE[P256_LIMBS] = { 1 }; in ecp_nistz256_from_mont() [all …]
|
D | p256-x86_64.c | 43 static const BN_ULONG ONE[P256_LIMBS] = { 80 static void copy_conditional(BN_ULONG dst[P256_LIMBS], in copy_conditional() argument 81 const BN_ULONG src[P256_LIMBS], BN_ULONG move) { in copy_conditional() argument 89 if (P256_LIMBS == 8) { in copy_conditional() 123 static void ecp_nistz256_mod_inverse_sqr_mont(BN_ULONG r[P256_LIMBS], in ecp_nistz256_mod_inverse_sqr_mont() argument 124 const BN_ULONG in[P256_LIMBS]) { in ecp_nistz256_mod_inverse_sqr_mont() argument 127 BN_ULONG x2[P256_LIMBS], x3[P256_LIMBS], x6[P256_LIMBS], x12[P256_LIMBS], in ecp_nistz256_mod_inverse_sqr_mont() 128 x15[P256_LIMBS], x30[P256_LIMBS], x32[P256_LIMBS]; in ecp_nistz256_mod_inverse_sqr_mont() 163 BN_ULONG ret[P256_LIMBS]; in ecp_nistz256_mod_inverse_sqr_mont() 195 assert(group->field.width == P256_LIMBS); in ecp_nistz256_windowed_mul() [all …]
|
D | p256-x86_64_test.cc | 111 BN_ULONG order_words[P256_LIMBS]; in TEST() 113 bn_copy_words(order_words, P256_LIMBS, EC_GROUP_get0_order(group.get()))); in TEST() 115 BN_ULONG in[P256_LIMBS], out[P256_LIMBS]; in TEST() 126 static const BN_ULONG kOneMont[P256_LIMBS] = { in TEST() 145 EXPECT_TRUE(bn_less_than_words(in, order_words, P256_LIMBS)); in TEST() 147 EXPECT_TRUE(bn_less_than_words(out, order_words, P256_LIMBS)); in TEST() 168 static bool GetFieldElement(FileTest *t, BN_ULONG out[P256_LIMBS], in GetFieldElement() argument 175 if (bytes.size() != BN_BYTES * P256_LIMBS) { in GetFieldElement() 182 OPENSSL_memset(out, 0, P256_LIMBS * sizeof(BN_ULONG)); in GetFieldElement() 184 out[P256_LIMBS - 1 - (i / BN_BYTES)] <<= 8; in GetFieldElement() [all …]
|
/external/rust/crates/ring/crypto/fipsmodule/ec/ |
D | ecp_nistz256.c | 36 void GFp_nistz256_neg(Limb res[P256_LIMBS], const Limb a[P256_LIMBS]); 40 static const Limb ONE[P256_LIMBS] = { 45 static void copy_conditional(Limb dst[P256_LIMBS], in copy_conditional() argument 46 const Limb src[P256_LIMBS], Limb move) { in copy_conditional() argument 54 if (P256_LIMBS == 8) { in copy_conditional() 75 static const BN_ULONG Q[P256_LIMBS] = { 82 static inline Limb is_equal(const Limb a[P256_LIMBS], const Limb b[P256_LIMBS]) { in is_equal() argument 83 return LIMBS_equal(a, b, P256_LIMBS); in is_equal() 86 static inline Limb is_zero(const BN_ULONG a[P256_LIMBS]) { in is_zero() argument 87 return LIMBS_are_zero(a, P256_LIMBS); in is_zero() [all …]
|
D | ecp_nistz256.h | 25 #define P256_LIMBS (256u / LIMB_BITS) macro 28 Limb X[P256_LIMBS]; 29 Limb Y[P256_LIMBS]; 30 Limb Z[P256_LIMBS]; 35 Limb X[P256_LIMBS]; 36 Limb Y[P256_LIMBS]; 40 typedef Limb PRECOMP256_ROW[64 * 2 * P256_LIMBS]; // 64 (x, y) entries. 42 void GFp_nistz256_mul_mont(Limb res[P256_LIMBS], const Limb a[P256_LIMBS], 43 const Limb b[P256_LIMBS]); 44 void GFp_nistz256_sqr_mont(Limb res[P256_LIMBS], const Limb a[P256_LIMBS]);
|
D | gfp_p256.c | 22 typedef Limb Elem[P256_LIMBS]; 23 typedef Limb ScalarMont[P256_LIMBS]; 24 typedef Limb Scalar[P256_LIMBS]; 48 GFp_bn_mul_mont(r, a, b, N, N_N0, P256_LIMBS); in GFp_p256_scalar_mul_mont() 79 alignas(32) Elem x; limbs_zero(x, P256_LIMBS); in GFp_nistz256_select_w5() 80 alignas(32) Elem y; limbs_zero(y, P256_LIMBS); in GFp_nistz256_select_w5() 81 alignas(32) Elem z; limbs_zero(z, P256_LIMBS); in GFp_nistz256_select_w5() 86 for (size_t j = 0; j < P256_LIMBS; ++j) { in GFp_nistz256_select_w5() 93 limbs_copy(out->X, x, P256_LIMBS); in GFp_nistz256_select_w5() 94 limbs_copy(out->Y, y, P256_LIMBS); in GFp_nistz256_select_w5() [all …]
|