/openssl/test/ |
H A D | curve448_internal_test.c | 22 static const uint8_t in_scalar1[56] = { 30 static const uint8_t in_u1[56] = { 38 static const uint8_t out_u1[56] = { 54 static const uint8_t in_u2[56] = { 62 static const uint8_t out_u2[56] = { 70 static const uint8_t in_u3[56] = { 149 static const uint8_t msg2[1] = { 182 static const uint8_t msg3[1] = { 585 static const uint8_t *dohash(EVP_MD_CTX *hashctx, const uint8_t *msg, in dohash() 588 static uint8_t hashout[64]; in dohash() [all …]
|
H A D | sm4_internal_test.c | 24 static const uint8_t k[SM4_BLOCK_SIZE] = { in test_sm4_ecb() 29 static const uint8_t input[SM4_BLOCK_SIZE] = { in test_sm4_ecb() 38 static const uint8_t expected[SM4_BLOCK_SIZE] = { in test_sm4_ecb() 48 static const uint8_t expected_iter[SM4_BLOCK_SIZE] = { in test_sm4_ecb() 55 uint8_t block[SM4_BLOCK_SIZE]; in test_sm4_ecb()
|
/openssl/crypto/ec/curve448/ |
H A D | ed448.h | 69 const uint8_t *message, size_t message_len, 70 uint8_t prehashed, const uint8_t *context, 95 const uint8_t hash[64], 96 const uint8_t *context, 120 const uint8_t 122 const uint8_t 125 uint8_t prehashed, const uint8_t *context, 126 uint8_t context_len, 151 const uint8_t hash[64], 152 const uint8_t *context, [all …]
|
H A D | eddsa.c | 70 uint8_t dom[2]; in hash_init_with_dom() 164 uint8_t prehashed, const uint8_t *context, in ossl_c448_ed448_sign() 272 const uint8_t hash[64], const uint8_t *context, in ossl_c448_ed448_sign_prehash() 285 uint8_t prehashed, const uint8_t *context, in ossl_c448_ed448_verify() 368 const uint8_t hash[64], const uint8_t *context, in ossl_c448_ed448_verify_prehash() 376 ossl_ed448_sign(OSSL_LIB_CTX *ctx, uint8_t *out_sig, const uint8_t *message, in ossl_ed448_sign() 378 const uint8_t private_key[57], const uint8_t *context, in ossl_ed448_sign() 388 const uint8_t signature[114], const uint8_t public_key[57], in ossl_ed448_verify() 397 ossl_ed448ph_sign(OSSL_LIB_CTX *ctx, uint8_t *out_sig, const uint8_t hash[64], in ossl_ed448ph_sign() 398 const uint8_t public_key[57], const uint8_t private_key[57], in ossl_ed448ph_sign() [all …]
|
H A D | curve448_local.h | 14 ossl_ed448ph_sign(OSSL_LIB_CTX *ctx, uint8_t *out_sig, const uint8_t hash[64], 15 const uint8_t public_key[57], const uint8_t private_key[57], 16 const uint8_t *context, size_t context_len, const char *propq); 19 ossl_ed448ph_verify(OSSL_LIB_CTX *ctx, const uint8_t hash[64], 20 const uint8_t signature[114], const uint8_t public_key[57], 21 const uint8_t *context, size_t context_len,
|
H A D | point_448.h | 226 ossl_x448_int(uint8_t out[X448_PUBLIC_BYTES], 227 const uint8_t base[X448_PUBLIC_BYTES], 228 const uint8_t scalar[X448_PRIVATE_BYTES]); 251 uint8_t out[X448_PUBLIC_BYTES], 262 ossl_x448_derive_public_key(uint8_t out[X448_PUBLIC_BYTES], 263 const uint8_t scalar[X448_PRIVATE_BYTES]);
|
/openssl/providers/implementations/include/prov/ |
H A D | blake2.h | 31 uint8_t digest_length; /* 1 */ 32 uint8_t key_length; /* 2 */ 33 uint8_t fanout; /* 3 */ 34 uint8_t depth; /* 4 */ 35 uint8_t leaf_length[4];/* 8 */ 36 uint8_t node_offset[6];/* 14 */ 37 uint8_t node_depth; /* 15 */ 55 uint8_t digest_length; /* 1 */ 56 uint8_t key_length; /* 2 */ 57 uint8_t fanout; /* 3 */ [all …]
|
/openssl/include/crypto/ |
H A D | ecx.h | 87 int ossl_x25519(uint8_t out_shared_key[32], const uint8_t private_key[32], 88 const uint8_t peer_public_value[32]); 97 ossl_ed25519_sign(uint8_t *out_sig, const uint8_t *message, size_t message_len, 98 const uint8_t public_key[32], const uint8_t private_key[32], 102 const uint8_t signature[64], const uint8_t public_key[32], 109 ossl_ed448_sign(OSSL_LIB_CTX *ctx, uint8_t *out_sig, const uint8_t *message, 111 const uint8_t private_key[57], const uint8_t *context, 116 const uint8_t signature[114], const uint8_t public_key[57], 120 ossl_x448(uint8_t out_shared_key[56], const uint8_t private_key[56], 121 const uint8_t peer_public_value[56]); [all …]
|
H A D | sm2.h | 28 int ossl_sm2_compute_z_digest(uint8_t *out, 30 const uint8_t *id, 39 const uint8_t *id, 41 const uint8_t *msg, size_t msg_len); 46 const uint8_t *id, 48 const uint8_t *msg, size_t msg_len); 75 const uint8_t *msg, size_t msg_len, 76 uint8_t *ciphertext_buf, size_t *ciphertext_len); 80 const uint8_t *ciphertext, size_t ciphertext_len, 81 uint8_t *ptext_buf, size_t *ptext_len);
|
H A D | sm4.h | 32 int ossl_sm4_set_key(const uint8_t *key, SM4_KEY *ks); 34 void ossl_sm4_encrypt(const uint8_t *in, uint8_t *out, const SM4_KEY *ks); 36 void ossl_sm4_decrypt(const uint8_t *in, uint8_t *out, const SM4_KEY *ks);
|
H A D | aes_platform.h | 128 size_t aes_gcm_enc_128_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphe… 130 size_t aes_gcm_enc_192_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphe… 132 size_t aes_gcm_enc_256_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphe… 134 size_t aes_gcm_dec_128_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plai… 136 size_t aes_gcm_dec_192_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plai… 138 size_t aes_gcm_dec_256_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plai… 140 size_t unroll8_eor3_aes_gcm_enc_128_kernel(const uint8_t * plaintext, uint64_t plaintext_length, ui… 142 size_t unroll8_eor3_aes_gcm_enc_192_kernel(const uint8_t * plaintext, uint64_t plaintext_length, ui… 144 size_t unroll8_eor3_aes_gcm_enc_256_kernel(const uint8_t * plaintext, uint64_t plaintext_length, ui… 146 …ize_t unroll8_eor3_aes_gcm_dec_128_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, u… [all …]
|
/openssl/crypto/ |
H A D | quic_vlint.c | 7 buf[0] = (uint8_t)v; in ossl_quic_vlint_encode_n() 10 buf[1] = (uint8_t)v; in ossl_quic_vlint_encode_n() 13 buf[1] = (uint8_t)(v >> 16); in ossl_quic_vlint_encode_n() 14 buf[2] = (uint8_t)(v >> 8); in ossl_quic_vlint_encode_n() 15 buf[3] = (uint8_t)v; in ossl_quic_vlint_encode_n() 18 buf[1] = (uint8_t)(v >> 48); in ossl_quic_vlint_encode_n() 19 buf[2] = (uint8_t)(v >> 40); in ossl_quic_vlint_encode_n() 20 buf[3] = (uint8_t)(v >> 32); in ossl_quic_vlint_encode_n() 21 buf[4] = (uint8_t)(v >> 24); in ossl_quic_vlint_encode_n() 24 buf[7] = (uint8_t)v; in ossl_quic_vlint_encode_n() [all …]
|
/openssl/providers/implementations/digests/ |
H A D | blake2_impl.h | 65 uint8_t *p = (uint8_t *)dst; in store32() 69 p[i] = (uint8_t)(w >> (8 * i)); in store32() 80 uint8_t *p = (uint8_t *)dst; in store64() 84 p[i] = (uint8_t)(w >> (8 * i)); in store64() 101 uint8_t *p = (uint8_t *)dst; in store48() 102 p[0] = (uint8_t)w; in store48() 103 p[1] = (uint8_t)(w>>8); in store48() 104 p[2] = (uint8_t)(w>>16); in store48() 105 p[3] = (uint8_t)(w>>24); in store48() 106 p[4] = (uint8_t)(w>>32); in store48() [all …]
|
H A D | blake2s_prov.c | 29 static const uint8_t blake2s_sigma[10][16] = 64 const uint8_t *p = (const uint8_t *)(P); in blake2s_init_param() 92 void ossl_blake2s_param_set_digest_length(BLAKE2S_PARAM *P, uint8_t outlen) in ossl_blake2s_param_set_digest_length() 97 void ossl_blake2s_param_set_key_length(BLAKE2S_PARAM *P, uint8_t keylen) in ossl_blake2s_param_set_key_length() 102 void ossl_blake2s_param_set_personal(BLAKE2S_PARAM *P, const uint8_t *personal, in ossl_blake2s_param_set_personal() 109 void ossl_blake2s_param_set_salt(BLAKE2S_PARAM *P, const uint8_t *salt, in ossl_blake2s_param_set_salt() 136 uint8_t block[BLAKE2S_BLOCKBYTES] = {0}; in ossl_blake2s_init_key() 148 const uint8_t *blocks, in blake2s_compress() 251 const uint8_t *in = data; in ossl_blake2s_update() 299 uint8_t outbuffer[BLAKE2S_OUTBYTES] = {0}; in ossl_blake2s_final() [all …]
|
H A D | blake2b_prov.c | 31 static const uint8_t blake2b_sigma[12][16] = 68 const uint8_t *p = (const uint8_t *)(P); in blake2b_init_param() 98 void ossl_blake2b_param_set_digest_length(BLAKE2B_PARAM *P, uint8_t outlen) in ossl_blake2b_param_set_digest_length() 103 void ossl_blake2b_param_set_key_length(BLAKE2B_PARAM *P, uint8_t keylen) in ossl_blake2b_param_set_key_length() 108 void ossl_blake2b_param_set_personal(BLAKE2B_PARAM *P, const uint8_t *personal, in ossl_blake2b_param_set_personal() 115 void ossl_blake2b_param_set_salt(BLAKE2B_PARAM *P, const uint8_t *salt, in ossl_blake2b_param_set_salt() 143 uint8_t block[BLAKE2B_BLOCKBYTES] = {0}; in ossl_blake2b_init_key() 155 const uint8_t *blocks, in blake2b_compress() 260 const uint8_t *in = data; in ossl_blake2b_update() 308 uint8_t outbuffer[BLAKE2B_OUTBYTES] = {0}; in ossl_blake2b_final() [all …]
|
/openssl/crypto/sm4/ |
H A D | sm4.c | 15 static const uint8_t SM4_S[256] = { 238 b[0] = (uint8_t)(v >> 24); in store_u32_be() 239 b[1] = (uint8_t)(v >> 16); in store_u32_be() 240 b[2] = (uint8_t)(v >> 8); in store_u32_be() 241 b[3] = (uint8_t)(v); in store_u32_be() 251 t |= SM4_S[(uint8_t)X]; in SM4_T_slow() 263 SM4_SBOX_T2[(uint8_t)(X >> 8)] ^ in SM4_T() 264 SM4_SBOX_T3[(uint8_t)X]; in SM4_T() 304 t |= SM4_S[(uint8_t)X]; in ossl_sm4_set_key() 322 void ossl_sm4_encrypt(const uint8_t *in, uint8_t *out, const SM4_KEY *ks) in ossl_sm4_encrypt() [all …]
|
/openssl/providers/implementations/ciphers/ |
H A D | cipher_aes_gcm_siv_polyval.c | 47 static ossl_inline void byte_reverse16(uint8_t *out, const uint8_t *in) in byte_reverse16() 66 byte_reverse16((uint8_t *)tmp, (const uint8_t *)H); in ossl_polyval_ghash_init() 78 void ossl_polyval_ghash_hash(const u128 Htable[16], uint8_t *tag, const uint8_t *inp, size_t len) in ossl_polyval_ghash_hash() 84 byte_reverse16((uint8_t *)out, (uint8_t *)tag); in ossl_polyval_ghash_hash() 91 byte_reverse16((uint8_t *)tmp, &inp[i]); in ossl_polyval_ghash_hash() 92 ossl_gcm_ghash_4bit((u64*)out, Htable, (uint8_t *)tmp, 16); in ossl_polyval_ghash_hash() 94 byte_reverse16(tag, (uint8_t *)out); in ossl_polyval_ghash_hash()
|
H A D | cipher_aes_gcm_siv.h | 36 uint8_t *aad; /* Allocated, rounded up to 16 bytes, from user */ 41 uint8_t key_gen_key[32]; /* from user */ 42 uint8_t msg_enc_key[32]; /* depends on key size */ 43 uint8_t msg_auth_key[BLOCK_SIZE]; 44 uint8_t tag[TAG_SIZE]; /* generated tag, given to user or compared to user */ 45 uint8_t user_tag[TAG_SIZE]; /* from user */ 46 uint8_t nonce[NONCE_SIZE]; /* from user */ 59 void ossl_polyval_ghash_hash(const u128 Htable[16], uint8_t *tag, const uint8_t *inp, size_t len);
|
H A D | cipher_aes_gcm_siv_hw.c | 28 uint8_t output[BLOCK_SIZE]; in aes_gcm_siv_initkey() 33 uint8_t block[BLOCK_SIZE]; in aes_gcm_siv_initkey() 111 uint8_t *ptr; in aes_gcm_siv_aad() 152 uint8_t S_s[TAG_SIZE]; in aes_gcm_siv_encrypt() 153 uint8_t counter_block[TAG_SIZE]; in aes_gcm_siv_encrypt() 154 uint8_t padding[BLOCK_SIZE]; in aes_gcm_siv_encrypt() 212 uint8_t counter_block[TAG_SIZE]; in aes_gcm_siv_decrypt() 214 uint8_t S_s[TAG_SIZE]; in aes_gcm_siv_decrypt() 255 ossl_polyval_ghash_hash(ctx->Htable, S_s, (uint8_t *)len_blk, TAG_SIZE); in aes_gcm_siv_decrypt() 338 uint8_t keystream[BLOCK_SIZE]; in aes_gcm_siv_ctr32() [all …]
|
/openssl/crypto/ec/ |
H A D | curve25519.c | 211 static void x25519_scalar_mulx(uint8_t out[32], const uint8_t scalar[32], in x25519_scalar_mulx() 215 uint8_t e[32]; in x25519_scalar_mulx() 700 uint8_t e[32]; in x25519_scalar_mult() 1548 uint8_t s[32]; in fe_isnonzero() 1565 uint8_t s[32]; in fe_isnegative() 2063 uint8_t ub = b; in equal() 2064 uint8_t uc = c; in equal() 4207 uint8_t babs = b - ((uint8_t)((-bnegative) & b) << 1); in table_select() 4376 uint8_t e[32]; in x25519_scalar_mult_generic() 4964 static void sc_muladd(uint8_t *s, const uint8_t *a, const uint8_t *b, in sc_muladd() [all …]
|
/openssl/include/internal/ |
H A D | dane.h | 44 uint8_t usage; 45 uint8_t selector; 46 uint8_t mtype; 59 uint8_t *mdord; /* mtype -> preference */ 60 uint8_t mdmax; /* highest supported mtype */
|
/openssl/crypto/aria/ |
H A D | aria.c | 55 ((uint32_t)((uint8_t)(V0)) << 24) | \ 56 ((uint32_t)((uint8_t)(V1)) << 16) | \ 57 ((uint32_t)((uint8_t)(V2)) << 8) | \ 58 ((uint32_t)((uint8_t)(V3)) ) ) 512 (uint8_t)(X1[GET_U8_BE(reg0, 0)] ), in ossl_aria_encrypt() 513 (uint8_t)(X2[GET_U8_BE(reg0, 1)] >> 8), in ossl_aria_encrypt() 514 (uint8_t)(S1[GET_U8_BE(reg0, 2)] ), in ossl_aria_encrypt() 517 (uint8_t)(X1[GET_U8_BE(reg1, 0)] ), in ossl_aria_encrypt() 518 (uint8_t)(X2[GET_U8_BE(reg1, 1)] >> 8), in ossl_aria_encrypt() 519 (uint8_t)(S1[GET_U8_BE(reg1, 2)] ), in ossl_aria_encrypt() [all …]
|
/openssl/fuzz/ |
H A D | server.c | 28 static const uint8_t kCertificateDER[] = { 97 static const uint8_t kRSAPrivateKeyDER[] = { 509 int FuzzerTestOneInput(const uint8_t *buf, size_t len) in FuzzerTestOneInput() 523 const uint8_t *bufp; in FuzzerTestOneInput() 536 uint8_t opt; in FuzzerTestOneInput() 623 opt = (uint8_t)buf[len-1]; in FuzzerTestOneInput() 642 uint8_t tmp[1024]; in FuzzerTestOneInput()
|
H A D | driver.c | 19 int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len); 26 int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len) in LLVMFuzzerTestOneInput() 40 uint8_t *buf = malloc(BUF_SIZE); in main()
|
/openssl/crypto/sm2/ |
H A D | sm2_crypt.c | 110 const uint8_t *msg, size_t msg_len, in ossl_sm2_encrypt() 111 uint8_t *ciphertext_buf, size_t *ciphertext_len) in ossl_sm2_encrypt() 128 uint8_t *msg_mask = NULL; in ossl_sm2_encrypt() 129 uint8_t *x2y2 = NULL; in ossl_sm2_encrypt() 130 uint8_t *C3 = NULL; in ossl_sm2_encrypt() 273 uint8_t *ptext_buf, size_t *ptext_len) in ossl_sm2_decrypt() 283 uint8_t *x2y2 = NULL; in ossl_sm2_decrypt() 284 uint8_t *computed_C3 = NULL; in ossl_sm2_decrypt() 287 uint8_t *msg_mask = NULL; in ossl_sm2_decrypt() 288 const uint8_t *C2 = NULL; in ossl_sm2_decrypt() [all …]
|