/openssl-master/test/ |
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 …]
|
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()
|
A D | danetest.c | 182 uint8_t byte; in hexdecode() 217 uint8_t *result = (uint8_t *)out; in checked_uint8() 229 v != (*(uint8_t *)result = (uint8_t) v)) { in checked_uint8() 245 static uint8_t usage; in tlsa_import_rr() 246 static uint8_t selector; in tlsa_import_rr() 247 static uint8_t mtype; in tlsa_import_rr()
|
A D | sm2_internal_test.c | 34 static uint8_t *fake_rand_bytes = NULL; 147 uint8_t *ctext = NULL; in test_sm2_crypt() 148 uint8_t *recovered = NULL; in test_sm2_crypt() 176 (const uint8_t *)message, msg_len, in test_sm2_crypt() 337 sig = ossl_sm2_do_sign(key, EVP_sm3(), (const uint8_t *)userid, in test_sm2_sign() 338 strlen(userid), (const uint8_t *)message, msg_len); in test_sm2_sign() 353 ok = ossl_sm2_do_verify(key, EVP_sm3(), sig, (const uint8_t *)userid, in test_sm2_sign() 354 strlen(userid), (const uint8_t *)message, msg_len); in test_sm2_sign()
|
/openssl-master/crypto/ec/curve448/ |
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 …]
|
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 …]
|
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,
|
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]);
|
A D | curve448.c | 331 uint8_t enc2[EDDSA_448_PUBLIC_BYTES]; in ossl_curve448_point_decode_like_eddsa_and_mul_by_ratio() 386 ossl_x448_int(uint8_t out[X_PUBLIC_BYTES], in ossl_x448_int() 387 const uint8_t base[X_PUBLIC_BYTES], in ossl_x448_int() 388 const uint8_t scalar[X_PRIVATE_BYTES]) in ossl_x448_int() 402 uint8_t sb = scalar[t / 8]; in ossl_x448_int() 407 sb &= -(uint8_t)COFACTOR; in ossl_x448_int() 466 ossl_curve448_point_mul_by_ratio_and_encode_like_x448(uint8_t in ossl_curve448_point_mul_by_ratio_and_encode_like_x448() 484 uint8_t scalar2[X_PRIVATE_BYTES]; in ossl_x448_derive_public_key() 490 scalar2[0] &= -(uint8_t)COFACTOR; in ossl_x448_derive_public_key() 727 int ossl_x448(uint8_t out_shared_key[56], const uint8_t private_key[56], in ossl_x448() [all …]
|
/openssl-master/providers/implementations/include/prov/ |
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-master/include/crypto/ |
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 …]
|
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);
|
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);
|
A D | aes_platform.h | 108 size_t aes_gcm_enc_128_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphe… 110 size_t aes_gcm_enc_192_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphe… 112 size_t aes_gcm_enc_256_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphe… 114 size_t aes_gcm_dec_128_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plai… 116 size_t aes_gcm_dec_192_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plai… 118 size_t aes_gcm_dec_256_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plai…
|
/openssl-master/providers/implementations/digests/ |
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 …]
|
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 …]
|
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 …]
|
/openssl-master/crypto/sm4/ |
A D | sm4.c | 15 static const uint8_t SM4_S[256] = { 103 b[0] = (uint8_t)(v >> 24); in store_u32_be() 104 b[1] = (uint8_t)(v >> 16); in store_u32_be() 105 b[2] = (uint8_t)(v >> 8); in store_u32_be() 106 b[3] = (uint8_t)(v); in store_u32_be() 116 t |= SM4_S[(uint8_t)X]; in SM4_T_slow() 126 return SM4_SBOX_T[(uint8_t)(X >> 24)] ^ in SM4_T() 129 rotl(SM4_SBOX_T[(uint8_t)X], 8); in SM4_T() 169 t |= SM4_S[(uint8_t)X]; in ossl_sm4_set_key() 187 void ossl_sm4_encrypt(const uint8_t *in, uint8_t *out, const SM4_KEY *ks) in ossl_sm4_encrypt() [all …]
|
/openssl-master/crypto/ec/ |
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() 2068 uint8_t ub = b; in equal() 2069 uint8_t uc = c; in equal() 4212 uint8_t babs = b - ((uint8_t)((-bnegative) & b) << 1); in table_select() 4381 uint8_t e[32]; in x25519_scalar_mult_generic() 4969 static void sc_muladd(uint8_t *s, const uint8_t *a, const uint8_t *b, in sc_muladd() [all …]
|
/openssl-master/include/internal/ |
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-master/crypto/aria/ |
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-master/fuzz/ |
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()
|
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-master/crypto/sm2/ |
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 …]
|
A D | sm2_sign.c | 24 int ossl_sm2_compute_z_digest(uint8_t *out, in ossl_sm2_compute_z_digest() 26 const uint8_t *id, in ossl_sm2_compute_z_digest() 42 uint8_t *buf = NULL; in ossl_sm2_compute_z_digest() 44 uint8_t e_byte = 0; in ossl_sm2_compute_z_digest() 143 const uint8_t *id, in sm2_compute_msg_hash() 145 const uint8_t *msg, size_t msg_len) in sm2_compute_msg_hash() 149 uint8_t *z = NULL; in sm2_compute_msg_hash() 393 const uint8_t *id, in ossl_sm2_do_sign() 395 const uint8_t *msg, size_t msg_len) in ossl_sm2_do_sign() 416 const uint8_t *id, in ossl_sm2_do_verify() [all …]
|