Home
last modified time | relevance | path

Searched refs:crypto_word_t (Results 1 – 21 of 21) sorted by relevance

/external/boringssl/src/crypto/
Dinternal.h231 typedef uint64_t crypto_word_t; in OPENSSL_MSVC_PRAGMA() typedef
233 typedef uint32_t crypto_word_t; in OPENSSL_MSVC_PRAGMA() typedef
238 #define CONSTTIME_TRUE_W ~((crypto_word_t)0) in OPENSSL_MSVC_PRAGMA()
239 #define CONSTTIME_FALSE_W ((crypto_word_t)0) in OPENSSL_MSVC_PRAGMA()
245 static inline crypto_word_t constant_time_msb_w(crypto_word_t a) { in OPENSSL_MSVC_PRAGMA()
250 static inline crypto_word_t constant_time_lt_w(crypto_word_t a, in OPENSSL_MSVC_PRAGMA()
251 crypto_word_t b) { in OPENSSL_MSVC_PRAGMA()
287 static inline uint8_t constant_time_lt_8(crypto_word_t a, crypto_word_t b) { in OPENSSL_MSVC_PRAGMA()
292 static inline crypto_word_t constant_time_ge_w(crypto_word_t a, in OPENSSL_MSVC_PRAGMA()
293 crypto_word_t b) { in OPENSSL_MSVC_PRAGMA()
[all …]
Dconstant_time_test.cc64 static crypto_word_t FromBoolW(bool b) { in FromBoolW()
70 static crypto_word_t test_values_w[] = {
83 std::numeric_limits<crypto_word_t>::max() / 2 - 1,
84 std::numeric_limits<crypto_word_t>::max() / 2,
85 std::numeric_limits<crypto_word_t>::max() / 2 + 1,
86 std::numeric_limits<crypto_word_t>::max() - 1,
87 std::numeric_limits<crypto_word_t>::max(),
95 for (crypto_word_t a : test_values_w) { in TEST()
101 for (crypto_word_t b : test_values_w) { in TEST()
Dabi_self_test.cc41 crypto_word_t argv[] = { in TEST()
45 reinterpret_cast<crypto_word_t>(TestFunction), &state, argv, 8, in TEST()
112 reinterpret_cast<crypto_word_t>(abi_test_clobber_rbx), in TEST()
216 reinterpret_cast<crypto_word_t>(abi_test_clobber_ebx), in TEST()
288 reinterpret_cast<crypto_word_t>(abi_test_clobber_r4), in TEST()
427 reinterpret_cast<crypto_word_t>(abi_test_clobber_x19), in TEST()
/external/boringssl/src/crypto/test/
Dabi_test.cc90 crypto_word_t RunTrampoline(Result *out, crypto_word_t func, in RunTrampoline()
91 const crypto_word_t *argv, size_t argc, in RunTrampoline()
98 crypto_word_t ret = abi_test_trampoline(func, &state2, argv, argc, unwind); in RunTrampoline()
133 static bool IsAncestorStackFrame(crypto_word_t a_sp, crypto_word_t b_sp) { in IsAncestorStackFrame()
147 static std::array<char, DECIMAL_SIZE(crypto_word_t) + 1> WordToDecimal( in WordToDecimal()
148 crypto_word_t v) { in WordToDecimal()
149 std::array<char, DECIMAL_SIZE(crypto_word_t) + 1> ret; in WordToDecimal()
163 static std::array<char, sizeof(crypto_word_t) * 2 + 1> WordToHex( in WordToHex()
164 crypto_word_t v) { in WordToHex()
166 std::array<char, sizeof(crypto_word_t) * 2 + 1> ret; in WordToHex()
[all …]
Dabi_test.h207 crypto_word_t RunTrampoline(Result *out, crypto_word_t func,
208 const crypto_word_t *argv, size_t argc,
212 inline crypto_word_t ToWord(T t) { in ToWord()
217 static_assert(sizeof(T) <= sizeof(crypto_word_t), in ToWord()
259 crypto_word_t ret; in ToWord()
277 inline crypto_word_t CheckImpl(Result *out, bool unwind, R (*func)(Args...), in CheckImpl()
288 crypto_word_t argv[sizeof...(args) + 1] = { in CheckImpl()
291 return RunTrampoline(out, reinterpret_cast<crypto_word_t>(func), argv, in CheckImpl()
299 inline typename std::enable_if<!std::is_void<R>::value, crypto_word_t>::type
307 inline crypto_word_t CheckImpl(Result *out, bool /* unwind */, in CheckImpl()
[all …]
/external/boringssl/src/crypto/hrss/
Dhrss.c331 OPENSSL_memset(&p->v[0], 0, sizeof(crypto_word_t) * WORDS_PER_POLY); in poly2_zero()
336 crypto_word_t mov) { in poly2_cmov()
360 crypto_word_t carry = in->v[WORDS_PER_POLY - 1]; in poly2_rotr_words()
388 crypto_word_t carry = in->v[WORDS_PER_POLY - 1] << (BITS_PER_WORD - bits); in poly2_rotr_bits()
395 crypto_word_t last_word = carry >> (BITS_PER_WORD - BITS_IN_LAST_WORD) | in poly2_rotr_bits()
430 static void poly2_cswap(struct poly2 *a, struct poly2 *b, crypto_word_t swap) { in poly2_cswap()
432 const crypto_word_t sum = swap & (a->v[i] ^ b->v[i]); in poly2_cswap()
441 crypto_word_t m) { in poly2_fmadd()
449 crypto_word_t carry = 0; in poly2_lshift1()
451 const crypto_word_t next_carry = p->v[i] >> (BITS_PER_WORD - 1); in poly2_lshift1()
[all …]
Dhrss_test.cc28 crypto_word_t *words = out->v; in poly2_from_bits()
30 crypto_word_t word = 0; in poly2_from_bits()
34 word |= (crypto_word_t)(in[i] & 1) << (BITS_PER_WORD - 1); in poly2_from_bits()
91 static void poly3_word_add(crypto_word_t *s1, crypto_word_t *a1, in poly3_word_add()
92 const crypto_word_t s2, const crypto_word_t a2) { in poly3_word_add()
93 const crypto_word_t t = *s1 ^ a2; in poly3_word_add()
Dinternal.h27 #define BITS_PER_WORD (sizeof(crypto_word_t) * 8)
32 crypto_word_t v[WORDS_PER_POLY];
/external/boringssl/src/crypto/fipsmodule/bn/
Dshift.c299 OPENSSL_STATIC_ASSERT(sizeof(BN_ULONG) <= sizeof(crypto_word_t), in bn_count_low_zero_bits_word()
301 OPENSSL_STATIC_ASSERT(sizeof(int) <= sizeof(crypto_word_t), in bn_count_low_zero_bits_word()
309 crypto_word_t mask; in bn_count_low_zero_bits_word()
345 OPENSSL_STATIC_ASSERT(sizeof(BN_ULONG) <= sizeof(crypto_word_t), in BN_count_low_zero_bits()
347 OPENSSL_STATIC_ASSERT(sizeof(int) <= sizeof(crypto_word_t), in BN_count_low_zero_bits()
351 crypto_word_t saw_nonzero = 0; in BN_count_low_zero_bits()
353 crypto_word_t nonzero = ~constant_time_is_zero_w(bn->d[i]); in BN_count_low_zero_bits()
354 crypto_word_t first_nonzero = ~saw_nonzero & nonzero; in BN_count_low_zero_bits()
Dcmp.c68 OPENSSL_STATIC_ASSERT(sizeof(BN_ULONG) <= sizeof(crypto_word_t), in bn_cmp_words_consttime()
74 crypto_word_t eq = constant_time_eq_w(a[i], b[i]); in bn_cmp_words_consttime()
75 crypto_word_t lt = constant_time_lt_w(a[i], b[i]); in bn_cmp_words_consttime()
82 crypto_word_t mask = 0; in bn_cmp_words_consttime()
88 crypto_word_t mask = 0; in bn_cmp_words_consttime()
Drandom.c188 static crypto_word_t bn_less_than_word_mask(const BN_ULONG *a, size_t len, in bn_less_than_word_mask()
198 OPENSSL_STATIC_ASSERT(sizeof(BN_ULONG) <= sizeof(crypto_word_t), in bn_less_than_word_mask()
200 crypto_word_t mask = 0; in bn_less_than_word_mask()
212 crypto_word_t mask = ~bn_less_than_word_mask(a, len, min_inclusive); in bn_in_range_words()
322 crypto_word_t in_range = *out_is_uniform; in bn_rand_secret_range()
Dprime.c710 crypto_word_t uniform_iterations = 0; in BN_primality_test()
726 crypto_word_t loop_done = 0; in BN_primality_test()
730 crypto_word_t next_iteration = 0; in BN_primality_test()
757 crypto_word_t z_is_w1_mont = BN_equal_consttime(z, w1_mont) & ~loop_done; in BN_primality_test()
785 assert(uniform_iterations >= (crypto_word_t)iterations); in BN_primality_test()
Dmul.c412 OPENSSL_STATIC_ASSERT(sizeof(BN_ULONG) <= sizeof(crypto_word_t), in bn_mul_recursive()
526 OPENSSL_STATIC_ASSERT(sizeof(BN_ULONG) <= sizeof(crypto_word_t), in bn_mul_part_recursive()
Dbn.c409 OPENSSL_STATIC_ASSERT(sizeof(BN_ULONG) <= sizeof(crypto_word_t), in bn_select_words()
/external/boringssl/src/crypto/fipsmodule/rsa/
Dpadding.c207 crypto_word_t first_byte_is_zero = constant_time_eq_w(from[0], 0); in RSA_padding_check_PKCS1_type_2()
208 crypto_word_t second_byte_is_two = constant_time_eq_w(from[1], 2); in RSA_padding_check_PKCS1_type_2()
210 crypto_word_t zero_index = 0, looking_for_index = CONSTTIME_TRUE_W; in RSA_padding_check_PKCS1_type_2()
212 crypto_word_t equals0 = constant_time_is_zero_w(from[i]); in RSA_padding_check_PKCS1_type_2()
219 crypto_word_t valid_index = first_byte_is_zero; in RSA_padding_check_PKCS1_type_2()
442 crypto_word_t bad = ~constant_time_is_zero_w(CRYPTO_memcmp(db, phash, mdlen)); in RSA_padding_check_PKCS1_OAEP_mgf1()
445 crypto_word_t looking_for_one_byte = CONSTTIME_TRUE_W; in RSA_padding_check_PKCS1_OAEP_mgf1()
448 crypto_word_t equals1 = constant_time_eq_w(db[i], 1); in RSA_padding_check_PKCS1_OAEP_mgf1()
449 crypto_word_t equals0 = constant_time_eq_w(db[i], 0); in RSA_padding_check_PKCS1_OAEP_mgf1()
/external/boringssl/src/crypto/cipher_extra/
Dtls_cbc.c74 int EVP_tls_cbc_remove_padding(crypto_word_t *out_padding_ok, size_t *out_len, in EVP_tls_cbc_remove_padding()
86 crypto_word_t good = constant_time_ge_w(in_len, overhead + padding_length); in EVP_tls_cbc_remove_padding()
152 crypto_word_t is_mac_start = constant_time_eq_w(i, mac_start); in EVP_tls_cbc_copy_mac()
Dinternal.h79 int EVP_tls_cbc_remove_padding(crypto_word_t *out_padding_ok, size_t *out_len,
De_tls.c307 crypto_word_t padding_ok; in aead_tls_open()
377 crypto_word_t good = in aead_tls_open()
/external/boringssl/src/crypto/base64/
Dbase64.c71 crypto_word_t aw = a; in constant_time_lt_args_8()
72 crypto_word_t bw = b; in constant_time_lt_args_8()
/external/boringssl/src/crypto/fipsmodule/modes/
Dpolyval.c37 const crypto_word_t carry = constant_time_eq_w(hi & 1, 1); in reverse_and_mulX_ghash()
/external/boringssl/src/crypto/curve25519/
Dspake25519.c330 static void scalar_cmov(scalar *dest, const scalar *src, crypto_word_t mask) { in scalar_cmov()