/crypto/fipsmodule/ec/ |
A D | ec_key.cc.inc | 155 return key->ecdsa_meth && (key->ecdsa_meth->flags & ECDSA_FLAG_OPAQUE); 158 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key) { return key->group; } 179 return key->priv_key != NULL ? &key->priv_key->bignum : NULL; 207 return key->pub_key; 222 key->pub_key = EC_POINT_dup(pub_key, key->group); 318 if (!key || !key->group || !x || !y) { 349 if (key == NULL || key->pub_key == NULL || key->group == NULL) { 354 return EC_POINT_point2buf(key->group, key->pub_key, form, out_buf, ctx); 376 if (key->group == NULL || key->priv_key == NULL) { 420 if (key == NULL || key->group == NULL) { [all …]
|
A D | ec_test.cc | 175 ASSERT_TRUE(key); in TEST() 208 ASSERT_TRUE(key); in TEST() 236 ASSERT_TRUE(key); in TEST() 242 ASSERT_TRUE(key); in TEST() 252 ASSERT_TRUE(key); in TEST() 265 ASSERT_TRUE(key); in TEST() 280 ASSERT_TRUE(key); in TEST() 432 ASSERT_TRUE(key); in TEST() 444 ASSERT_TRUE(key); in TEST() 458 ASSERT_TRUE(key); in TEST() [all …]
|
/crypto/fipsmodule/aes/ |
A D | aes_test.cc | 46 ASSERT_EQ(0, AES_set_encrypt_key(key.data(), 8 * key.size(), &aes_key)); in TestRaw() 58 ASSERT_EQ(0, AES_set_decrypt_key(key.data(), 8 * key.size(), &aes_key)); in TestRaw() 89 ASSERT_EQ(0, AES_set_encrypt_key(key.data(), 8 * key.size(), &aes_key)); in TestKeyWrap() 106 ASSERT_EQ(0, AES_set_decrypt_key(key.data(), 8 * key.size(), &aes_key)); in TestKeyWrap() 135 ASSERT_EQ(0, AES_set_encrypt_key(key.data(), 8 * key.size(), &aes_key)); in TestKeyWrapWithPadding() 269 AES_KEY key; in TEST() local 279 AES_KEY key; in TEST() local 293 CHECK_ABI(vpaes_encrypt_key_to_bsaes, &key, &key); in TEST() 302 CHECK_ABI(vpaes_decrypt_key_to_bsaes, &key, &key); in TEST() 379 return Bytes(reinterpret_cast<const uint8_t *>(key), sizeof(*key)); in AESKeyToBytes() [all …]
|
A D | internal.h | 36 const AES_KEY *key); 103 void aes_hw_encrypt_key_to_decrypt_key(AES_KEY *key); 122 AES_KEY *key); 133 AES_KEY *key) { in aes_hw_set_encrypt_key() argument 138 AES_KEY *key) { in aes_hw_set_decrypt_key() argument 143 const AES_KEY *key) { in aes_hw_encrypt() argument 148 const AES_KEY *key) { in aes_hw_decrypt() argument 168 const AES_KEY *key, int enc); 233 AES_KEY *key) { in vpaes_set_encrypt_key() argument 237 AES_KEY *key) { in vpaes_set_decrypt_key() argument [all …]
|
A D | aes.cc.inc | 27 const AES_KEY *key) { 29 aes_hw_encrypt(in, out, key); 31 vpaes_encrypt(in, out, key); 33 aes_nohw_encrypt(in, out, key); 41 aes_hw_decrypt(in, out, key); 43 vpaes_decrypt(in, out, key); 45 aes_nohw_decrypt(in, out, key); 56 ret = vpaes_set_encrypt_key(key, bits, aeskey); 91 aes_hw_encrypt_key_to_decrypt_key(key); 115 vpaes_encrypt(iv_buf, enc, key); [all …]
|
A D | gcm.cc.inc | 31 #define GCM_MUL(key, ctx, Xi) gcm_gmult_nohw((ctx)->Xi, (key)->Htable) 95 #define GCM_MUL(key, ctx, Xi) (*gcm_gmult_p)((ctx)->Xi, (key)->Htable) 325 GCM_MUL(key, ctx, Yi); 329 key->block(ctx->Yi, ctx->EK0, &key->aes); 405 GCM_MUL(key, ctx, Xi); 430 key->Htable, key->impl); 462 key->block(ctx->Yi, ctx->EKi, &key->aes); 492 GCM_MUL(key, ctx, Xi); 519 key->Htable, key->impl); 551 key->block(ctx->Yi, ctx->EKi, &key->aes); [all …]
|
A D | mode_wrappers.cc.inc | 23 void aes_encrypt(const uint8_t *in, uint8_t *out, const AES_KEY *key) { 24 BCM_aes_encrypt(in, out, key); 27 void aes_decrypt(const uint8_t *in, uint8_t *out, const AES_KEY *key) { 28 BCM_aes_decrypt(in, out, key); 53 assert(in && out && key); 57 BCM_aes_encrypt(in, out, key); 59 BCM_aes_decrypt(in, out, key); 68 aes_hw_cbc_encrypt(in, out, len, key, ivec, enc); 70 aes_nohw_cbc_encrypt(in, out, len, key, ivec, enc); 72 CRYPTO_cbc128_encrypt(in, out, len, key, ivec, aes_encrypt); [all …]
|
/crypto/evp/ |
A D | pbkdf_test.cc | 30 uint8_t key[sizeof(kKey)]; in TEST() local 34 EXPECT_EQ(Bytes(kKey), Bytes(key)); in TEST() 38 EXPECT_EQ(Bytes(kKey), Bytes(key)); in TEST() 48 uint8_t key[sizeof(kKey)]; in TEST() local 52 EXPECT_EQ(Bytes(kKey), Bytes(key)); in TEST() 56 EXPECT_EQ(Bytes(kKey), Bytes(key)); in TEST() 70 uint8_t key[sizeof(kKey1)]; in TEST() local 106 uint8_t key[sizeof(kKey2)]; in TEST() local 132 uint8_t key[10] = {0}; in TEST() local 133 const size_t key_len = sizeof(key); in TEST() [all …]
|
A D | p_ed25519_asn1.cc | 37 ED25519_KEY *key = in ed25519_set_priv_raw() local 39 if (key == NULL) { in ed25519_set_priv_raw() 46 ED25519_keypair_from_seed(pubkey_unused, key->key, in); in ed25519_set_priv_raw() 50 pkey->pkey = key; in ed25519_set_priv_raw() 60 ED25519_KEY *key = in ed25519_set_pub_raw() local 66 OPENSSL_memcpy(key->key + ED25519_PUBLIC_KEY_OFFSET, in, 32); in ed25519_set_pub_raw() 70 pkey->pkey = key; in ed25519_set_pub_raw() 93 OPENSSL_memcpy(out, key->key, 32); in ed25519_get_priv_raw() 111 OPENSSL_memcpy(out, key->key + ED25519_PUBLIC_KEY_OFFSET, 32); in ed25519_get_pub_raw() 125 return ed25519_set_pub_raw(out, CBS_data(key), CBS_len(key)); in ed25519_pub_decode() [all …]
|
A D | scrypt_test.cc | 67 uint8_t key[64]; in TEST() local 71 1 /* p */, 0 /* max_mem */, key, sizeof(key))); in TEST() 77 uint8_t key[64]; in TEST() local 81 1 /* p */, 0 /* max_mem */, key, sizeof(key))); in TEST() 83 0 /* p */, 0 /* max_mem */, key, sizeof(key))); in TEST() 87 1 /* p */, 0 /* max_mem */, key, sizeof(key))); in TEST() 89 1 /* p */, 0 /* max_mem */, key, sizeof(key))); in TEST() 91 1 /* p */, 0 /* max_mem */, key, sizeof(key))); in TEST() 93 1 /* p */, 0 /* max_mem */, key, sizeof(key))); in TEST() 95 1 /* p */, 0 /* max_mem */, key, sizeof(key))); in TEST() [all …]
|
A D | p_x25519_asn1.cc | 37 X25519_KEY *key = in x25519_set_priv_raw() local 39 if (key == NULL) { in x25519_set_priv_raw() 44 X25519_public_from_private(key->pub, key->priv); in x25519_set_priv_raw() 45 key->has_private = 1; in x25519_set_priv_raw() 48 pkey->pkey = key; in x25519_set_priv_raw() 58 X25519_KEY *key = in x25519_set_pub_raw() local 60 if (key == NULL) { in x25519_set_pub_raw() 65 key->has_private = 0; in x25519_set_pub_raw() 68 pkey->pkey = key; in x25519_set_pub_raw() 121 if (key == NULL) { in x25519_get1_tls_encodedpoint() [all …]
|
/crypto/hpke/ |
A D | hpke.cc | 165 X25519_keypair(key->public_key, key->private_key); in x25519_generate_key() 409 !p256_public_from_private(key->public_key, key->private_key)) { in p256_generate_key() 745 if (key == NULL) { in EVP_HPKE_KEY_new() 749 return key; in EVP_HPKE_KEY_new() 753 if (key != NULL) { in EVP_HPKE_KEY_free() 777 key->kem = kem; in EVP_HPKE_KEY_init() 779 key->kem = NULL; in EVP_HPKE_KEY_init() 787 key->kem = kem; in EVP_HPKE_KEY_generate() 796 return key->kem; in EVP_HPKE_KEY_kem() 805 OPENSSL_memcpy(out, key->public_key, key->kem->public_key_len); in EVP_HPKE_KEY_public_key() [all …]
|
/crypto/test/ |
A D | file_test.cc | 73 std::string key, value; in ParseKeyValue() local 75 key = StripSpace(str, len); in ParseKeyValue() 80 return {key, value}; in ParseKeyValue() 205 std::string key, value; in ReadNext() local 253 OnKeyUsed(key); in HasAttribute() 258 OnKeyUsed(key); in GetAttribute() 269 if (!HasAttribute(key)) { in GetAttributeOrDie() 272 return attributes_[key]; in GetAttributeOrDie() 276 OnInstructionUsed(key); in HasInstruction() 281 OnInstructionUsed(key); in GetInstruction() [all …]
|
/crypto/fipsmodule/aes/asm/ |
A D | aesni-x86_64.pl | 255 lea 32($key),$key 259 lea 32($key),$key 267 lea 16($key),$key 349 lea 32($key,$rounds),$key 1492 lea -0x80($key),$key 1497 lea 16($key),$key 1552 lea 16($key),$key 1581 lea 16($key),$key 2944 lea -0x70($key),$key 3200 lea 16($key),$key [all …]
|
A D | aesv8-armx.pl | 141 aese $key,$zero 148 veor $key,$key,$rcon 159 aese $key,$zero 165 veor $key,$key,$rcon 173 aese $key,$zero 179 veor $key,$key,$rcon 191 vmov.i8 $key,#8 // borrow $key 199 aese $key,$zero 210 veor $key,$key,$rcon 234 aese $key,$zero [all …]
|
A D | aesni-x86.pl | 142 &lea ($key,&DWP(32,$key)); 149 &lea ($key,&DWP(16,$key)); 162 &lea ($key,&DWP(0x30,$key)); 165 &lea ($key,&DWP(0x20,$key)); 167 &lea ($key,&DWP(0x20,$key)); 2134 &lea ($key,&DWP(16,$key)); 2172 &lea ($key,&DWP(16,$key)); 2210 &lea ($key,&DWP(16,$key)); 2233 &lea ($key,&DWP(32,$key)); 2238 &lea ($key,&DWP(16,$key)); [all …]
|
/crypto/ecdsa/ |
A D | ecdsa_p1363_test.cc | 41 bssl::UniquePtr<EC_KEY> key(EC_KEY_new()); in RunWycheproofTest() local 42 ASSERT_TRUE(key); in RunWycheproofTest() 63 key.get()); in RunWycheproofTest() 110 bssl::UniquePtr<EC_KEY> key(EC_KEY_new()); in RunSignTest() local 111 ASSERT_TRUE(key); in RunSignTest() 125 key.get())); in RunSignTest() 149 bssl::UniquePtr<EC_KEY> key(EC_KEY_new()); in TEST() local 150 ASSERT_TRUE(key); in TEST() 168 bssl::UniquePtr<EC_KEY> key(EC_KEY_new()); in TEST() local 169 ASSERT_TRUE(key); in TEST() [all …]
|
/crypto/chacha/ |
A D | chacha.cc | 45 OPENSSL_memcpy(&x[4], key, 32); in CRYPTO_hchacha20() 113 if ((((uintptr_t)key) & 3) != 0) { in CRYPTO_chacha_20() 114 key_u32[0] = CRYPTO_load_u32_le(key + 0); in CRYPTO_chacha_20() 190 input[4] = CRYPTO_load_u32_le(key + 0); in CRYPTO_chacha_20() 191 input[5] = CRYPTO_load_u32_le(key + 4); in CRYPTO_chacha_20() 192 input[6] = CRYPTO_load_u32_le(key + 8); in CRYPTO_chacha_20() 193 input[7] = CRYPTO_load_u32_le(key + 12); in CRYPTO_chacha_20() 195 input[8] = CRYPTO_load_u32_le(key + 16); in CRYPTO_chacha_20() 196 input[9] = CRYPTO_load_u32_le(key + 20); in CRYPTO_chacha_20() 197 input[10] = CRYPTO_load_u32_le(key + 24); in CRYPTO_chacha_20() [all …]
|
/crypto/trust_token/ |
A D | internal.h | 112 const TRUST_TOKEN_CLIENT_KEY *key, 144 const TRUST_TOKEN_CLIENT_KEY *key, 176 const TRUST_TOKEN_CLIENT_KEY *key, 217 const TRUST_TOKEN_CLIENT_KEY *key, 220 int voprf_exp2_read(const TRUST_TOKEN_ISSUER_KEY *key, 247 const TRUST_TOKEN_CLIENT_KEY *key, 250 int voprf_pst1_read(const TRUST_TOKEN_ISSUER_KEY *key, 314 const TRUST_TOKEN_CLIENT_KEY *key, 324 int (*read)(const TRUST_TOKEN_ISSUER_KEY *key, 343 TRUST_TOKEN_CLIENT_KEY key; member [all …]
|
/crypto/mlkem/ |
A D | mlkem1024_decap_tests.txt | 1201 # Private key too short 1321 # Private key too long 1327 # Private key too long 1333 # Private key too long 1339 # Private key too long 1345 # Private key too long 1351 # Private key too long 1357 # Private key too long 1363 # Private key too long 1369 # Private key too long [all …]
|
A D | mlkem1024_encap_tests.txt | 701 # Public key not reduced 708 # Public key not reduced 715 # Public key not reduced 722 # Public key not reduced 729 # Public key not reduced 736 # Public key not reduced 743 # Public key not reduced 750 # Public key not reduced 757 # Public key not reduced 764 # Public key not reduced [all …]
|
A D | mlkem768_decap_tests.txt | 1201 # Private key too short 1321 # Private key too long 1327 # Private key too long 1333 # Private key too long 1339 # Private key too long 1345 # Private key too long 1351 # Private key too long 1357 # Private key too long 1363 # Private key too long 1369 # Private key too long [all …]
|
A D | mlkem768_encap_tests.txt | 701 # Public key not reduced 708 # Public key not reduced 715 # Public key not reduced 722 # Public key not reduced 729 # Public key not reduced 736 # Public key not reduced 743 # Public key not reduced 750 # Public key not reduced 757 # Public key not reduced 764 # Public key not reduced [all …]
|
/crypto/lhash/ |
A D | lhash_test.cc | 56 auto iter = dummy_lh->find(key); in Lookup() 109 std::unique_ptr<char[]> key = RandString(); in TEST() local 111 EXPECT_EQ(Lookup(&dummy_lh, key.get()), value); in TEST() 115 lh.get(), &key, OPENSSL_strhash(key.get()), in TEST() 122 EXPECT_EQ(Lookup(&dummy_lh, key.get()), value); in TEST() 127 std::unique_ptr<char[]> key = RandString(); in TEST() local 130 EXPECT_EQ(Lookup(&dummy_lh, key.get()), previous); in TEST() 131 dummy_lh[key.get()] = std::move(key); in TEST() 136 std::unique_ptr<char[]> key = RandString(); in TEST() local 138 EXPECT_EQ(Lookup(&dummy_lh, key.get()), value); in TEST() [all …]
|
/crypto/pem/ |
A D | pem_all.cc | 26 static RSA *pkey_get_rsa(EVP_PKEY *key, RSA **rsa); 27 static DSA *pkey_get_dsa(EVP_PKEY *key, DSA **dsa); 42 if (!key) { in IMPLEMENT_PEM_rw() 45 rtmp = EVP_PKEY_get1_RSA(key); in IMPLEMENT_PEM_rw() 46 EVP_PKEY_free(key); in IMPLEMENT_PEM_rw() 78 if (!key) { in IMPLEMENT_PEM_write_cb_const() 81 dtmp = EVP_PKEY_get1_DSA(key); in IMPLEMENT_PEM_write_cb_const() 82 EVP_PKEY_free(key); in IMPLEMENT_PEM_write_cb_const() 113 if (!key) { in IMPLEMENT_PEM_rw_const() 116 dtmp = EVP_PKEY_get1_EC_KEY(key); in IMPLEMENT_PEM_rw_const() [all …]
|