/external/python/cryptography/tests/hazmat/primitives/ |
D | test_pbkdf2hmac.py | 11 from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC 19 kdf = PBKDF2HMAC(hashes.SHA1(), 20, b"salt", 10, backend) 20 kdf.derive(b"password") 22 kdf.derive(b"password2") 24 kdf = PBKDF2HMAC(hashes.SHA1(), 20, b"salt", 10, backend) 25 key = kdf.derive(b"password") 27 kdf.verify(b"password", key) 29 kdf = PBKDF2HMAC(hashes.SHA1(), 20, b"salt", 10, backend) 30 kdf.verify(b"password", key) 32 kdf.verify(b"password", key) [all …]
|
D | test_kbkdf.py | 12 from cryptography.hazmat.primitives.kdf.kbkdf import ( 25 kdf = KBKDFHMAC( 38 key = kdf.derive(b"material") 40 kdf = KBKDFHMAC( 54 kdf.verify(b"material2", key) 57 kdf = KBKDFHMAC( 70 kdf.derive(b"material") 73 kdf.derive(b"material2") 75 kdf = KBKDFHMAC( 88 key = kdf.derive(b"material") [all …]
|
/external/ms-tpm-20-ref/TPMCmd/tpm/src/crypt/ |
D | CryptRand.c | 627 TPM_ALG_ID kdf, // IN: the KDF to use in DRBG_InstantiateSeededKdf() argument 638 state->kdf = kdf; in DRBG_InstantiateSeededKdf() 780 if(state->kdf.magic == KDF_MAGIC) in DRBG_Generate() 782 KDF_STATE *kdf = (KDF_STATE *)state; in DRBG_Generate() local 783 UINT32 counter = (UINT32)kdf->counter; in DRBG_Generate() 788 if((((kdf->counter * kdf->digestSize) + randomSize) * 8) > kdf->limit) in DRBG_Generate() 795 if(kdf->residual.t.size > 0) in DRBG_Generate() 801 size = MIN(kdf->residual.t.size, bytesLeft); in DRBG_Generate() 806 &kdf->residual.t.buffer in DRBG_Generate() 807 [kdf->digestSize - kdf->residual.t.size], size); in DRBG_Generate() [all …]
|
/external/strace/ |
D | fetch_struct_keyctl_kdf_params.c | 13 struct_keyctl_kdf_params kdf; in MPERS_PRINTER_DECL() local 16 if ((ret = umove(tcp, addr, &kdf))) in MPERS_PRINTER_DECL() 23 kdf.hashname; in MPERS_PRINTER_DECL() 28 kdf.otherinfo; in MPERS_PRINTER_DECL() 29 p->otherinfolen = kdf.otherinfolen; in MPERS_PRINTER_DECL() 31 memcpy(p->__spare, kdf.__spare, sizeof(kdf.__spare)); in MPERS_PRINTER_DECL()
|
D | keyctl.c | 248 struct strace_keyctl_kdf_params kdf; in keyctl_dh_compute() local 260 if (fetch_keyctl_kdf_params(tcp, kdf_addr, &kdf)) { in keyctl_dh_compute() 265 PRINT_FIELD_STR("{", kdf, hashname, tcp); in keyctl_dh_compute() 271 if (kdf.otherinfolen) in keyctl_dh_compute() 272 PRINT_FIELD_STRN(", ", kdf, otherinfo, in keyctl_dh_compute() 273 kdf.otherinfolen, tcp); in keyctl_dh_compute() 275 PRINT_FIELD_PTR(", ", kdf, otherinfo); in keyctl_dh_compute() 277 PRINT_FIELD_U(", ", kdf, otherinfolen); in keyctl_dh_compute() 280 for (i = 0; i < ARRAY_SIZE(kdf.__spare); i++) { in keyctl_dh_compute() 281 if (kdf.__spare[i]) in keyctl_dh_compute() [all …]
|
/external/python/pyasn1-modules/tests/ |
D | test_rfc7914.py | 58 kdf = params['keyDerivationFunc'] 59 assert kdf['algorithm'] == rfc7914.id_scrypt 60 assert kdf['algorithm'] in rfc5280.algorithmIdentifierMap.keys() 62 kdfp, rest = der_decode(kdf['parameters'], 63 asn1Spec=rfc5280.algorithmIdentifierMap[kdf['algorithm']]) 66 assert der_encode(kdfp) == kdf['parameters']
|
/external/cronet/third_party/boringssl/src/crypto/pkcs8/ |
D | p5_pbev2.c | 181 CBB algorithm, oid, param, kdf, kdf_oid, kdf_param, salt_cbb, cipher_cbb, in PKCS5_pbe2_encrypt_init() local 187 !CBB_add_asn1(¶m, &kdf, CBS_ASN1_SEQUENCE) || in PKCS5_pbe2_encrypt_init() 188 !CBB_add_asn1(&kdf, &kdf_oid, CBS_ASN1_OBJECT) || in PKCS5_pbe2_encrypt_init() 190 !CBB_add_asn1(&kdf, &kdf_param, CBS_ASN1_SEQUENCE) || in PKCS5_pbe2_encrypt_init() 215 CBS pbe_param, kdf, kdf_obj, enc_scheme, enc_obj; in PKCS5_pbe2_decrypt_init() local 218 !CBS_get_asn1(&pbe_param, &kdf, CBS_ASN1_SEQUENCE) || in PKCS5_pbe2_decrypt_init() 221 !CBS_get_asn1(&kdf, &kdf_obj, CBS_ASN1_OBJECT) || in PKCS5_pbe2_decrypt_init() 243 if (!CBS_get_asn1(&kdf, &pbkdf2_params, CBS_ASN1_SEQUENCE) || in PKCS5_pbe2_decrypt_init() 244 CBS_len(&kdf) != 0 || in PKCS5_pbe2_decrypt_init()
|
/external/boringssl/src/crypto/pkcs8/ |
D | p5_pbev2.c | 181 CBB algorithm, oid, param, kdf, kdf_oid, kdf_param, salt_cbb, cipher_cbb, in PKCS5_pbe2_encrypt_init() local 187 !CBB_add_asn1(¶m, &kdf, CBS_ASN1_SEQUENCE) || in PKCS5_pbe2_encrypt_init() 188 !CBB_add_asn1(&kdf, &kdf_oid, CBS_ASN1_OBJECT) || in PKCS5_pbe2_encrypt_init() 190 !CBB_add_asn1(&kdf, &kdf_param, CBS_ASN1_SEQUENCE) || in PKCS5_pbe2_encrypt_init() 215 CBS pbe_param, kdf, kdf_obj, enc_scheme, enc_obj; in PKCS5_pbe2_decrypt_init() local 218 !CBS_get_asn1(&pbe_param, &kdf, CBS_ASN1_SEQUENCE) || in PKCS5_pbe2_decrypt_init() 221 !CBS_get_asn1(&kdf, &kdf_obj, CBS_ASN1_OBJECT) || in PKCS5_pbe2_decrypt_init() 243 if (!CBS_get_asn1(&kdf, &pbkdf2_params, CBS_ASN1_SEQUENCE) || in PKCS5_pbe2_decrypt_init() 244 CBS_len(&kdf) != 0 || in PKCS5_pbe2_decrypt_init()
|
/external/rust/crates/quiche/deps/boringssl/src/crypto/pkcs8/ |
D | p5_pbev2.c | 181 CBB algorithm, oid, param, kdf, kdf_oid, kdf_param, salt_cbb, cipher_cbb, in PKCS5_pbe2_encrypt_init() local 187 !CBB_add_asn1(¶m, &kdf, CBS_ASN1_SEQUENCE) || in PKCS5_pbe2_encrypt_init() 188 !CBB_add_asn1(&kdf, &kdf_oid, CBS_ASN1_OBJECT) || in PKCS5_pbe2_encrypt_init() 190 !CBB_add_asn1(&kdf, &kdf_param, CBS_ASN1_SEQUENCE) || in PKCS5_pbe2_encrypt_init() 215 CBS pbe_param, kdf, kdf_obj, enc_scheme, enc_obj; in PKCS5_pbe2_decrypt_init() local 218 !CBS_get_asn1(&pbe_param, &kdf, CBS_ASN1_SEQUENCE) || in PKCS5_pbe2_decrypt_init() 221 !CBS_get_asn1(&kdf, &kdf_obj, CBS_ASN1_OBJECT) || in PKCS5_pbe2_decrypt_init() 243 if (!CBS_get_asn1(&kdf, &pbkdf2_params, CBS_ASN1_SEQUENCE) || in PKCS5_pbe2_decrypt_init() 244 CBS_len(&kdf) != 0 || in PKCS5_pbe2_decrypt_init()
|
/external/rust/beto-rust/nearby/presence/ldt_np_adv_ffi_fuzz/src/ |
D | fuzzer_decrypt_correct_mac.c | 55 EVP_KDF *kdf; in LLVMFuzzerTestOneInput() local 61 kdf = EVP_KDF_fetch(NULL, "HKDF", NULL); in LLVMFuzzerTestOneInput() 62 if (kdf == NULL) { in LLVMFuzzerTestOneInput() 67 kctx = EVP_KDF_CTX_new(kdf); in LLVMFuzzerTestOneInput() 68 EVP_KDF_free(kdf); in LLVMFuzzerTestOneInput()
|
/external/cronet/third_party/boringssl/src/crypto/hpke/ |
D | hpke_test.cc | 63 const EVP_HPKE_KDF *kdf = GetKDF(); in Verify() local 64 ASSERT_TRUE(kdf); in Verify() 71 sender_ctx.get(), enc, &enc_len, sizeof(enc), kem, kdf, aead, in Verify() 104 ASSERT_TRUE(EVP_HPKE_CTX_setup_recipient(recipient_ctx.get(), key, kdf, in Verify() 123 for (const auto kdf : kAllKDFs) { in GetKDF() local 124 if (EVP_HPKE_KDF_id(kdf()) == kdf_id_) { in GetKDF() 125 return kdf(); in GetKDF() 293 for (const auto kdf : kAllKDFs) { in TEST() local 294 SCOPED_TRACE(EVP_HPKE_KDF_id(kdf())); in TEST() 307 EVP_hpke_x25519_hkdf_sha256(), kdf(), aead(), public_key_r, in TEST() [all …]
|
D | hpke.c | 327 uint16_t EVP_HPKE_KDF_id(const EVP_HPKE_KDF *kdf) { return kdf->id; } in EVP_HPKE_KDF_id() argument 329 const EVP_MD *EVP_HPKE_KDF_hkdf_md(const EVP_HPKE_KDF *kdf) { in EVP_HPKE_KDF_hkdf_md() argument 330 return kdf->hkdf_md_func(); in EVP_HPKE_KDF_hkdf_md() 371 CBB_add_u16(&cbb, ctx->kdf->id) && // in hpke_build_suite_id() 387 const EVP_MD *hkdf_md = ctx->kdf->hkdf_md_func(); in hpke_key_schedule() 482 const EVP_HPKE_KEM *kem, const EVP_HPKE_KDF *kdf, in EVP_HPKE_CTX_setup_sender() argument 490 ctx, out_enc, out_enc_len, max_enc, kem, kdf, aead, peer_public_key, in EVP_HPKE_CTX_setup_sender() 496 const EVP_HPKE_KEM *kem, const EVP_HPKE_KDF *kdf, const EVP_HPKE_AEAD *aead, in EVP_HPKE_CTX_setup_sender_with_seed_for_testing() argument 503 ctx->kdf = kdf; in EVP_HPKE_CTX_setup_sender_with_seed_for_testing() 519 const EVP_HPKE_KDF *kdf, in EVP_HPKE_CTX_setup_recipient() argument [all …]
|
/external/boringssl/src/crypto/hpke/ |
D | hpke_test.cc | 63 const EVP_HPKE_KDF *kdf = GetKDF(); in Verify() local 64 ASSERT_TRUE(kdf); in Verify() 71 sender_ctx.get(), enc, &enc_len, sizeof(enc), kem, kdf, aead, in Verify() 104 ASSERT_TRUE(EVP_HPKE_CTX_setup_recipient(recipient_ctx.get(), key, kdf, in Verify() 123 for (const auto kdf : kAllKDFs) { in GetKDF() local 124 if (EVP_HPKE_KDF_id(kdf()) == kdf_id_) { in GetKDF() 125 return kdf(); in GetKDF() 293 for (const auto kdf : kAllKDFs) { in TEST() local 294 SCOPED_TRACE(EVP_HPKE_KDF_id(kdf())); in TEST() 307 EVP_hpke_x25519_hkdf_sha256(), kdf(), aead(), public_key_r, in TEST() [all …]
|
D | hpke.c | 327 uint16_t EVP_HPKE_KDF_id(const EVP_HPKE_KDF *kdf) { return kdf->id; } in EVP_HPKE_KDF_id() argument 329 const EVP_MD *EVP_HPKE_KDF_hkdf_md(const EVP_HPKE_KDF *kdf) { in EVP_HPKE_KDF_hkdf_md() argument 330 return kdf->hkdf_md_func(); in EVP_HPKE_KDF_hkdf_md() 371 CBB_add_u16(&cbb, ctx->kdf->id) && // in hpke_build_suite_id() 387 const EVP_MD *hkdf_md = ctx->kdf->hkdf_md_func(); in hpke_key_schedule() 482 const EVP_HPKE_KEM *kem, const EVP_HPKE_KDF *kdf, in EVP_HPKE_CTX_setup_sender() argument 490 ctx, out_enc, out_enc_len, max_enc, kem, kdf, aead, peer_public_key, in EVP_HPKE_CTX_setup_sender() 496 const EVP_HPKE_KEM *kem, const EVP_HPKE_KDF *kdf, const EVP_HPKE_AEAD *aead, in EVP_HPKE_CTX_setup_sender_with_seed_for_testing() argument 503 ctx->kdf = kdf; in EVP_HPKE_CTX_setup_sender_with_seed_for_testing() 519 const EVP_HPKE_KDF *kdf, in EVP_HPKE_CTX_setup_recipient() argument [all …]
|
/external/rust/crates/quiche/deps/boringssl/src/crypto/hpke/ |
D | hpke_test.cc | 63 const EVP_HPKE_KDF *kdf = GetKDF(); in Verify() local 64 ASSERT_TRUE(kdf); in Verify() 71 sender_ctx.get(), enc, &enc_len, sizeof(enc), kem, kdf, aead, in Verify() 104 ASSERT_TRUE(EVP_HPKE_CTX_setup_recipient(recipient_ctx.get(), key, kdf, in Verify() 123 for (const auto kdf : kAllKDFs) { in GetKDF() local 124 if (EVP_HPKE_KDF_id(kdf()) == kdf_id_) { in GetKDF() 125 return kdf(); in GetKDF() 293 for (const auto kdf : kAllKDFs) { in TEST() local 294 SCOPED_TRACE(EVP_HPKE_KDF_id(kdf())); in TEST() 307 EVP_hpke_x25519_hkdf_sha256(), kdf(), aead(), public_key_r, in TEST() [all …]
|
D | hpke.c | 316 uint16_t EVP_HPKE_KDF_id(const EVP_HPKE_KDF *kdf) { return kdf->id; } in EVP_HPKE_KDF_id() argument 356 CBB_add_u16(&cbb, ctx->kdf->id) && in hpke_build_suite_id() 374 const EVP_MD *hkdf_md = ctx->kdf->hkdf_md_func(); in hpke_key_schedule() 470 const EVP_HPKE_KEM *kem, const EVP_HPKE_KDF *kdf, in EVP_HPKE_CTX_setup_sender() argument 478 ctx, out_enc, out_enc_len, max_enc, kem, kdf, aead, peer_public_key, in EVP_HPKE_CTX_setup_sender() 484 const EVP_HPKE_KEM *kem, const EVP_HPKE_KDF *kdf, const EVP_HPKE_AEAD *aead, in EVP_HPKE_CTX_setup_sender_with_seed_for_testing() argument 490 ctx->kdf = kdf; in EVP_HPKE_CTX_setup_sender_with_seed_for_testing() 506 const EVP_HPKE_KDF *kdf, in EVP_HPKE_CTX_setup_recipient() argument 512 ctx->kdf = kdf; in EVP_HPKE_CTX_setup_recipient() 598 const EVP_MD *hkdf_md = ctx->kdf->hkdf_md_func(); in EVP_HPKE_CTX_export() [all …]
|
/external/cronet/third_party/boringssl/src/include/openssl/ |
D | hpke.h | 85 OPENSSL_EXPORT uint16_t EVP_HPKE_KDF_id(const EVP_HPKE_KDF *kdf); 90 OPENSSL_EXPORT const EVP_MD *EVP_HPKE_KDF_hkdf_md(const EVP_HPKE_KDF *kdf); 225 const EVP_HPKE_KEM *kem, const EVP_HPKE_KDF *kdf, const EVP_HPKE_AEAD *aead, 235 const EVP_HPKE_KEM *kem, const EVP_HPKE_KDF *kdf, const EVP_HPKE_AEAD *aead, 248 EVP_HPKE_CTX *ctx, const EVP_HPKE_KEY *key, const EVP_HPKE_KDF *kdf, 336 const EVP_HPKE_KDF *kdf; member
|
/external/boringssl/src/include/openssl/ |
D | hpke.h | 85 OPENSSL_EXPORT uint16_t EVP_HPKE_KDF_id(const EVP_HPKE_KDF *kdf); 90 OPENSSL_EXPORT const EVP_MD *EVP_HPKE_KDF_hkdf_md(const EVP_HPKE_KDF *kdf); 225 const EVP_HPKE_KEM *kem, const EVP_HPKE_KDF *kdf, const EVP_HPKE_AEAD *aead, 235 const EVP_HPKE_KEM *kem, const EVP_HPKE_KDF *kdf, const EVP_HPKE_AEAD *aead, 248 EVP_HPKE_CTX *ctx, const EVP_HPKE_KEY *key, const EVP_HPKE_KDF *kdf, 336 const EVP_HPKE_KDF *kdf; member
|
/external/rust/crates/quiche/deps/boringssl/src/include/openssl/ |
D | hpke.h | 61 OPENSSL_EXPORT uint16_t EVP_HPKE_KDF_id(const EVP_HPKE_KDF *kdf); 205 const EVP_HPKE_KEM *kem, const EVP_HPKE_KDF *kdf, const EVP_HPKE_AEAD *aead, 215 const EVP_HPKE_KEM *kem, const EVP_HPKE_KDF *kdf, const EVP_HPKE_AEAD *aead, 228 EVP_HPKE_CTX *ctx, const EVP_HPKE_KEY *key, const EVP_HPKE_KDF *kdf, 311 const EVP_HPKE_KDF *kdf; member
|
/external/python/cryptography/docs/hazmat/primitives/ |
D | key-derivation-functions.rst | 6 .. module:: cryptography.hazmat.primitives.kdf 16 such as :class:`~cryptography.hazmat.primitives.kdf.pbkdf2.PBKDF2HMAC` or 17 :class:`~cryptography.hazmat.primitives.kdf.hkdf.HKDF`. 37 .. currentmodule:: cryptography.hazmat.primitives.kdf.pbkdf2 46 :class:`~cryptography.hazmat.primitives.kdf.scrypt.Scrypt` is generally 50 :class:`~cryptography.hazmat.primitives.kdf.KeyDerivationFunction` 57 >>> from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC 61 >>> kdf = PBKDF2HMAC( 67 >>> key = kdf.derive(b"my great password") 69 >>> kdf = PBKDF2HMAC( [all …]
|
/external/cronet/third_party/boringssl/src/crypto/ecdh_extra/ |
D | ecdh_extra.c | 82 void *(*kdf)(const void *in, size_t inlen, void *out, in ECDH_compute_key() 105 if (kdf != NULL) { in ECDH_compute_key() 106 if (kdf(buf, buf_len, out, &out_len) == NULL) { in ECDH_compute_key()
|
/external/boringssl/src/crypto/ecdh_extra/ |
D | ecdh_extra.c | 82 void *(*kdf)(const void *in, size_t inlen, void *out, in ECDH_compute_key() 105 if (kdf != NULL) { in ECDH_compute_key() 106 if (kdf(buf, buf_len, out, &out_len) == NULL) { in ECDH_compute_key()
|
/external/rust/crates/quiche/deps/boringssl/src/crypto/ecdh_extra/ |
D | ecdh_extra.c | 82 void *(*kdf)(const void *in, size_t inlen, void *out, in ECDH_compute_key() 105 if (kdf != NULL) { in ECDH_compute_key() 106 if (kdf(buf, buf_len, out, &out_len) == NULL) { in ECDH_compute_key()
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/util/ |
D | BaseAgreementSpi.java | 148 protected final DerivationFunction kdf; field in BaseAgreementSpi 152 public BaseAgreementSpi(String kaAlgorithm, DerivationFunction kdf) in BaseAgreementSpi() argument 155 this.kdf = kdf; in BaseAgreementSpi() 227 if (kdf != null) in engineGenerateSecret() 289 if (kdf != null) in getSharedSecretBytes() 324 kdf.init(params); in getSharedSecretBytes() 327 kdf.generateBytes(keyBytes, 0, keyBytes.length); in getSharedSecretBytes()
|
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/jcajce/provider/asymmetric/util/ |
D | BaseAgreementSpi.java | 152 protected final DerivationFunction kdf; field in BaseAgreementSpi 156 public BaseAgreementSpi(String kaAlgorithm, DerivationFunction kdf) in BaseAgreementSpi() argument 159 this.kdf = kdf; in BaseAgreementSpi() 231 if (kdf != null) in engineGenerateSecret() 293 if (kdf != null) in getSharedSecretBytes() 328 kdf.init(params); in getSharedSecretBytes() 331 kdf.generateBytes(keyBytes, 0, keyBytes.length); in getSharedSecretBytes()
|