Expand description
TLS 1.2 PRF API’s for usage in RFC 5246 and RFC 7627.
§Example
use aws_lc_rs::tls_prf::{Secret, P_SHA256};
let pre_master_secret = &[42; 32]; // Value is established during key exchange
let session_hash = &[7; 32]; // Session hash of handshake log
let secret = Secret::new(&P_SHA256, pre_master_secret)?;
let derived_secret = secret.derive(b"extended master secret", session_hash, 48)?;
let derived_secret_bytes = derived_secret.as_ref();
assert_eq!(derived_secret_bytes.len(), 48);
Structs§
- The TLS PRF
P_hash
Algorithm - Encapsulates a PRF algorithm and secret bytes to be used to derive output.
Constants§
- SHA-256
P_hash
algorithm - SHA-384
P_hash
algorithm - SHA-512
P_hash
algorithm