Home
last modified time | relevance | path

Searched refs:hkdf (Results 1 – 25 of 52) sorted by relevance

123

/external/python/cryptography/tests/hazmat/primitives/
Dtest_hkdf.py17 from cryptography.hazmat.primitives.kdf.hkdf import HKDF, HKDFExpand
39 hkdf = HKDF(
47 hkdf.derive(b"\x01" * 16)
50 hkdf.derive(b"\x02" * 16)
52 hkdf = HKDF(
60 hkdf.verify(b"\x01" * 16, b"gJ\xfb{\xb1Oi\xc5sMC\xb7\xe4@\xf7u")
63 hkdf.verify(b"\x02" * 16, b"gJ\xfb{\xb1Oi\xc5sMC\xb7\xe4@\xf7u")
65 hkdf = HKDF(
74 hkdf = HKDF(
82 hkdf.verify(b"\x01" * 16, b"gJ\xfb{\xb1Oi\xc5sMC\xb7\xe4@\xf7u")
[all …]
Dutils.py20 from cryptography.hazmat.primitives.kdf.hkdf import HKDF, HKDFExpand
310 hkdf = HKDF(
318 okm = hkdf.derive(binascii.unhexlify(params["ikm"]))
324 hkdf = HKDF(
332 prk = hkdf._extract(binascii.unhexlify(params["ikm"]))
338 hkdf = HKDFExpand(
345 okm = hkdf.derive(binascii.unhexlify(params["prk"]))
/external/rust/crates/ring/tests/
Dhkdf_tests.rs32 use ring::{digest, error, hkdf, test, test_file};
50 hkdf::HKDF_SHA256 in hkdf_tests()
62 let salt = hkdf::Salt::new(alg, &salt); in hkdf_tests()
79 for &alg in &[hkdf::HKDF_SHA256, hkdf::HKDF_SHA384, hkdf::HKDF_SHA512] { in hkdf_output_len_tests()
82 let salt = hkdf::Salt::new(alg, &[]); in hkdf_output_len_tests()
134 impl hkdf::KeyType for My<usize> {
140 impl From<hkdf::Okm<'_, My<usize>>> for My<Vec<u8>> {
141 fn from(okm: hkdf::Okm<My<usize>>) -> Self { in from()
/external/scapy/scapy/layers/tls/
Dsession.py21 from scapy.layers.tls.crypto.hkdf import TLS13_HKDF
110 self.hkdf = TLS13_HKDF(self.hash.name.lower())
247 write_key = self.hkdf.expand_label(key_material, b"key", b"", key_len)
248 write_iv = self.hkdf.expand_label(key_material, b"iv", b"", iv_len)
584 hkdf = self.prcs.hkdf
586 self.tls13_early_secret = hkdf.extract(None,
589 bk = hkdf.derive_secret(self.tls13_early_secret,
599 cets = hkdf.derive_secret(self.tls13_early_secret,
604 ees = hkdf.derive_secret(self.tls13_early_secret,
622 hkdf = self.prcs.hkdf
[all …]
/external/scapy/scapy/layers/tls/crypto/
Dhkdf.py16 from cryptography.hazmat.primitives.kdf.hkdf import HKDF, HKDFExpand
27 hkdf = HKDF(h, h.digest_size, salt, None, default_backend())
30 return hkdf._extract(ikm)
34 hkdf = HKDFExpand(h, L, info, default_backend())
35 return hkdf.derive(prk)
/external/rust/crates/quiche/src/
Dcrypto.rs28 use ring::hkdf;
87 fn get_ring_digest(self) -> hkdf::Algorithm { in get_ring_digest()
89 Algorithm::AES128_GCM => hkdf::HKDF_SHA256, in get_ring_digest()
90 Algorithm::AES256_GCM => hkdf::HKDF_SHA384, in get_ring_digest()
91 Algorithm::ChaCha20_Poly1305 => hkdf::HKDF_SHA256, in get_ring_digest()
337 fn derive_initial_secret(secret: &[u8], version: u32) -> Result<hkdf::Prk> { in derive_initial_secret()
355 let salt = hkdf::Salt::new(hkdf::HKDF_SHA256, salt); in derive_initial_secret()
359 fn derive_client_initial_secret(prk: &hkdf::Prk, out: &mut [u8]) -> Result<()> { in derive_client_initial_secret()
364 fn derive_server_initial_secret(prk: &hkdf::Prk, out: &mut [u8]) -> Result<()> { in derive_server_initial_secret()
380 let secret = hkdf::Prk::new_less_safe(aead.get_ring_digest(), secret); in derive_hdr_key()
[all …]
/external/python/cryptography/docs/development/custom-vectors/
Dhkdf.rst13 .. literalinclude:: /development/custom-vectors/hkdf/generate_hkdf.py
16 </development/custom-vectors/hkdf/generate_hkdf.py>`
24 .. literalinclude:: /development/custom-vectors/hkdf/verify_hkdf.go
28 </development/custom-vectors/hkdf/verify_hkdf.go>`
/external/python/cryptography/docs/development/custom-vectors/hkdf/
Dverify_hkdf.go26 hkdf := hkdf.New(hash, ikm, nil, nil)
28 io.ReadFull(hkdf, okmComputed)
Dgenerate_hkdf.py11 from cryptography.hazmat.primitives.kdf.hkdf import HKDF
/external/ukey2/src/main/javatest/com/google/security/cryptauth/lib/securemessage/
DCryptoOpsTest.java103 byte[] result = CryptoOps.hkdf(inputKey, HKDF_CASE1_SALT, HKDF_CASE1_INFO); in testHkdf()
110 byte[] result = CryptoOps.hkdf(inputKey, HKDF_CASE1_SALT, HKDF_CASE1_INFO, 42); in testHkdfLongOutput()
117 byte[] result = CryptoOps.hkdf(inputKey, HKDF_CASE1_SALT, HKDF_CASE1_INFO, 12); in testHkdfShortOutput()
128 () -> CryptoOps.hkdf(inputKey, HKDF_CASE1_SALT, HKDF_CASE1_INFO, -5)); in testHkdfInvalidLengths()
133 () -> CryptoOps.hkdf(inputKey, HKDF_CASE1_SALT, HKDF_CASE1_INFO, 32 * 256 + 1)); in testHkdfInvalidLengths()
/external/rust/crates/ring/src/aead/
Dquic.rs21 cpu, error, hkdf,
37 impl From<hkdf::Okm<'_, &'static Algorithm>> for HeaderProtectionKey {
38 fn from(okm: hkdf::Okm<&'static Algorithm>) -> Self { in from()
93 impl hkdf::KeyType for &'static Algorithm { impl
/external/rust/crates/ring/src/
Dhmac.rs112 use crate::{constant_time, digest, error, hkdf, rand};
271 impl hkdf::KeyType for Algorithm {
277 impl From<hkdf::Okm<'_, Algorithm>> for Key {
278 fn from(okm: hkdf::Okm<Algorithm>) -> Self { in from()
Daead.rs25 use crate::{constant_time, cpu, error, hkdf, polyfill};
430 impl From<hkdf::Okm<'_, &'static Algorithm>> for UnboundKey {
431 fn from(okm: hkdf::Okm<&'static Algorithm>) -> Self { in from()
440 impl hkdf::KeyType for &'static Algorithm { impl
Dlib.rs119 pub mod hkdf; module
/external/boringssl/src/ssl/test/runner/hpke/
Dkem.go47 return hkdf.Extract(kdfHash.New, labeledIKM, salt)
63 reader := hkdf.Expand(kdfHash.New, prk, labeledInfo)
/external/ukey2/src/main/java/com/google/security/cryptauth/lib/securemessage/
DCryptoOps.java397 return new SecretKeySpec(hkdf(masterKey, SALT, utf8StringToBytes(purpose)), "AES"); in deriveAes256KeyFor()
412 public static byte[] hkdf(SecretKey inputKeyMaterial, byte[] salt, byte[] info) in hkdf() method in CryptoOps
414 return hkdf(inputKeyMaterial, salt, info, /* length= */ 32); in hkdf()
430 public static byte[] hkdf(SecretKey inputKeyMaterial, byte[] salt, byte[] info, int length) in hkdf() method in CryptoOps
/external/python/cryptography/docs/hazmat/primitives/
Dkey-derivation-functions.rst17 :class:`~cryptography.hazmat.primitives.kdf.hkdf.HKDF`.
133 .. currentmodule:: cryptography.hazmat.primitives.kdf.hkdf
150 >>> from cryptography.hazmat.primitives.kdf.hkdf import HKDF
154 >>> info = b"hkdf-example"
155 >>> hkdf = HKDF(
162 >>> key = hkdf.derive(b"input key")
163 >>> hkdf = HKDF(
170 >>> hkdf.verify(b"input key", key)
245 :class:`~cryptography.hazmat.primitives.kdf.hkdf.HKDF` if
252 >>> from cryptography.hazmat.primitives.kdf.hkdf import HKDFExpand
[all …]
/external/boringssl/src/util/
Ddoc.config37 "include/openssl/hkdf.h",
/external/boringssl/src/crypto/
DCMakeLists.txt186 err/hkdf.errordata
307 hkdf/hkdf.c
530 hkdf/hkdf_test.cc
/external/rust/crates/quiche/deps/boringssl/src/crypto/
DCMakeLists.txt180 err/hkdf.errordata
301 hkdf/hkdf.c
521 hkdf/hkdf_test.cc
/external/openscreen/osp/msgs/
Dosp_messages.cddl66 hkdf-of-scrypt-of-psk: 1
/external/boringssl/src/ssl/test/runner/
Dprf.go396 h.secret = hkdf.Extract(h.hash.New, ikm, h.secret)
424 if n, err := hkdf.Expand(hash.New, secret, hkdfLabel).Read(ret); err != nil || n != length {
/external/ukey2/src/main/java/com/google/security/cryptauth/lib/securegcm/
DD2DCryptoOps.java212 return KeyEncoding.parseMasterKey(CryptoOps.hkdf(masterKey, SALT, info)); in deriveNewKeyForPurpose()
DUkey2Handshake.java390 authString = CryptoOps.hkdf(derivedSecretKey, salt, info); in getVerificationString()
525 nextProtocolKey = new SecretKeySpec(CryptoOps.hkdf(derivedSecretKey, salt, info), "AES"); in toConnectionContext()
/external/python/cryptography/docs/hazmat/primitives/asymmetric/
Ddh.rst37 >>> from cryptography.hazmat.primitives.kdf.hkdf import HKDF
81 >>> from cryptography.hazmat.primitives.kdf.hkdf import HKDF

123