/external/python/cryptography/tests/hazmat/primitives/ |
D | test_pbkdf2hmac.py | 14 from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC 22 kdf = PBKDF2HMAC(hashes.SHA1(), 20, b"salt", 10, default_backend()) 23 kdf.derive(b"password") 25 kdf.derive(b"password2") 27 kdf = PBKDF2HMAC(hashes.SHA1(), 20, b"salt", 10, default_backend()) 28 key = kdf.derive(b"password") 30 kdf.verify(b"password", key) 32 kdf = PBKDF2HMAC(hashes.SHA1(), 20, b"salt", 10, default_backend()) 33 kdf.verify(b"password", key) 35 kdf.verify(b"password", key) [all …]
|
D | test_kbkdf.py | 14 from cryptography.hazmat.primitives.kdf.kbkdf import ( 25 kdf = KBKDFHMAC(hashes.SHA256(), Mode.CounterMode, 32, 4, 4, 29 key = kdf.derive(b"material") 31 kdf = KBKDFHMAC(hashes.SHA256(), Mode.CounterMode, 32, 4, 4, 36 kdf.verify(b"material2", key) 39 kdf = KBKDFHMAC(hashes.SHA256(), Mode.CounterMode, 32, 4, 4, 43 kdf.derive(b'material') 46 kdf.derive(b'material2') 48 kdf = KBKDFHMAC(hashes.SHA256(), Mode.CounterMode, 32, 4, 4, 52 key = kdf.derive(b'material') [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/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/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/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/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/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`. 29 .. currentmodule:: cryptography.hazmat.primitives.kdf.pbkdf2 38 :class:`~cryptography.hazmat.primitives.kdf.scrypt.Scrypt` is generally 42 :class:`~cryptography.hazmat.primitives.kdf.KeyDerivationFunction` 49 >>> from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC 55 >>> kdf = PBKDF2HMAC( 62 >>> key = kdf.derive(b"my great password") 64 >>> kdf = PBKDF2HMAC( [all …]
|
/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/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/ |
D | KeyAgreementSpi.java | 76 DerivationFunction kdf) in KeyAgreementSpi() argument 78 super(kaAlgorithm, kdf); in KeyAgreementSpi() 101 DerivationFunction kdf) in KeyAgreementSpi() argument 103 super(kaAlgorithm, kdf); in KeyAgreementSpi() 345 if (kdf == null) in engineInit()
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/ |
D | PBES2AlgorithmParameters.java | 45 private final AlgorithmIdentifier kdf; field in PBES2AlgorithmParameters.BasePBEWithHmacAlgorithmParameters 54 ASN1ObjectIdentifier kdf, in BasePBEWithHmacAlgorithmParameters() argument 59 this.kdf = new AlgorithmIdentifier(kdf, DERNull.INSTANCE); in BasePBEWithHmacAlgorithmParameters() 137 pbeSpec.getSalt(), pbeSpec.getIterationCount(), keySize, kdf)), in engineInit()
|
/external/bouncycastle/repackaged_platform/bcprov/src/main/java/com/android/internal/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()
|
/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()
|
/external/bouncycastle/repackaged_platform/bcprov/src/main/java/com/android/internal/org/bouncycastle/jcajce/provider/asymmetric/dh/ |
D | KeyAgreementSpi.java | 78 DerivationFunction kdf) in KeyAgreementSpi() argument 80 super(kaAlgorithm, kdf); in KeyAgreementSpi() 103 DerivationFunction kdf) in KeyAgreementSpi() argument 105 super(kaAlgorithm, kdf); in KeyAgreementSpi() 347 if (kdf == null) in engineInit()
|
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/jcajce/provider/symmetric/ |
D | PBES2AlgorithmParameters.java | 49 private final AlgorithmIdentifier kdf; field in PBES2AlgorithmParameters.BasePBEWithHmacAlgorithmParameters 58 ASN1ObjectIdentifier kdf, in BasePBEWithHmacAlgorithmParameters() argument 63 this.kdf = new AlgorithmIdentifier(kdf, DERNull.INSTANCE); in BasePBEWithHmacAlgorithmParameters() 141 pbeSpec.getSalt(), pbeSpec.getIterationCount(), keySize, kdf)), in engineInit()
|
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/jcajce/provider/asymmetric/dh/ |
D | KeyAgreementSpi.java | 78 DerivationFunction kdf) in KeyAgreementSpi() argument 80 super(kaAlgorithm, kdf); in KeyAgreementSpi() 103 DerivationFunction kdf) in KeyAgreementSpi() argument 105 super(kaAlgorithm, kdf); in KeyAgreementSpi() 347 if (kdf == null) in engineInit()
|
/external/rust/crates/ring/src/ |
D | agreement.rs | 259 kdf: F, in agree_ephemeral() 268 agree_ephemeral_(my_private_key, peer_public_key, error_value, kdf) in agree_ephemeral() 275 kdf: F, in agree_ephemeral_() 319 kdf(shared_key) in agree_ephemeral_()
|
/external/bouncycastle/repackaged_platform/bcprov/src/main/java/com/android/internal/org/bouncycastle/jcajce/provider/symmetric/ |
D | PBES2AlgorithmParameters.java | 49 private final AlgorithmIdentifier kdf; field in PBES2AlgorithmParameters.BasePBEWithHmacAlgorithmParameters 58 ASN1ObjectIdentifier kdf, in BasePBEWithHmacAlgorithmParameters() argument 63 this.kdf = new AlgorithmIdentifier(kdf, DERNull.INSTANCE); in BasePBEWithHmacAlgorithmParameters() 141 pbeSpec.getSalt(), pbeSpec.getIterationCount(), keySize, kdf)), in engineInit()
|
/external/libsrtp2/srtp/ |
D | srtp.c | 599 static srtp_err_status_t srtp_kdf_init(srtp_kdf_t *kdf, in srtp_kdf_init() argument 604 memset(kdf, 0x0, sizeof(srtp_kdf_t)); in srtp_kdf_init() 615 kdf->evp = EVP_aes_256_ctr(); in srtp_kdf_init() 618 kdf->evp = EVP_aes_192_ctr(); in srtp_kdf_init() 621 kdf->evp = EVP_aes_128_ctr(); in srtp_kdf_init() 627 memcpy(kdf->master_key, key, key_len); in srtp_kdf_init() 628 memcpy(kdf->master_salt, key + key_len, salt_len); in srtp_kdf_init() 632 static srtp_err_status_t srtp_kdf_generate(srtp_kdf_t *kdf, in srtp_kdf_generate() argument 640 if (!kdf->evp) in srtp_kdf_generate() 649 ret = kdf_srtp(kdf->evp, (char *)&kdf->master_key, in srtp_kdf_generate() [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/ |
D | KeyAgreementSpi.java | 74 DerivationFunction kdf) in KeyAgreementSpi() argument 76 super(kaAlgorithm, kdf); in KeyAgreementSpi() 329 if (kdf == null && parameterSpec instanceof UserKeyingMaterialSpec) in initFromKey()
|
/external/wpa_supplicant_8/src/eap_peer/ |
D | eap_aka.c | 56 u16 kdf; member 612 eap_sim_msg_add(msg, EAP_SIM_AT_KDF, attr->kdf[i], in eap_aka_synchronization_failure() 839 u8 id, u16 kdf) in eap_aka_prime_kdf_select() argument 844 data->kdf = kdf; in eap_aka_prime_kdf_select() 850 eap_sim_msg_add(msg, EAP_SIM_AT_KDF, kdf, NULL, 0); in eap_aka_prime_kdf_select() 861 if (attr->kdf[i] == EAP_AKA_PRIME_KDF) { in eap_aka_prime_kdf_neg() 862 os_memcpy(data->last_kdf_attrs, attr->kdf, in eap_aka_prime_kdf_neg() 894 if (attr->kdf[0] != data->kdf) { in eap_aka_prime_kdf_valid() 908 if (attr->kdf[i] != data->last_kdf_attrs[i - 1]) { in eap_aka_prime_kdf_valid() 916 for (i = data->kdf ? 1 : 0; i < attr->kdf_count; i++) { in eap_aka_prime_kdf_valid() [all …]
|
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/jcajce/provider/asymmetric/ec/ |
D | KeyAgreementSpi.java | 76 DerivationFunction kdf) in KeyAgreementSpi() argument 78 super(kaAlgorithm, kdf); in KeyAgreementSpi() 331 if (kdf == null && parameterSpec instanceof UserKeyingMaterialSpec) in initFromKey()
|