TLS PRF (Pseudo-Random Function)
The TLS PRF is used in TLS 1.0, 1.1, and 1.2 to generate key material from a secret.Platform Support
| Platform | Default Enabled | Notes |
|---|---|---|
| QAT 1.7 | Yes | TLS 1.2 PRF |
| QAT 1.8 | Yes | TLS 1.2 PRF |
| QAT 2.0 | Yes | TLS 1.2 PRF |
| qatlib | Yes | TLS 1.2 PRF |
Supported Hash Algorithms
The PRF supports the following hash functions:- SHA-256 (TLS 1.2 default)
- SHA-384
- SHA-512
- MD5+SHA-1 (TLS 1.0/1.1, legacy)
Configuration
The TLS PRF is automatically used by OpenSSL when:- The QAT engine is loaded and initialized
- A TLS connection is established
- Key material needs to be derived
Usage with OpenSSL EVP API
TLS Integration
When using OpenSSL’s TLS implementation with the QAT engine:HKDF (HMAC-based Key Derivation Function)
HKDF is a modern KDF specified in RFC 5869, providing extract-and-expand functionality.Platform Support
| Platform | Default Enabled | Notes |
|---|---|---|
| QAT 1.7 | No (experimental) | Disabled by default |
| QAT 1.8 | No (experimental) | Disabled by default |
| QAT 2.0 | No (experimental) | Disabled by default |
| qatlib | No (experimental) | Disabled by default |
Supported Hash Algorithms
HKDF supports all standard HMAC-compatible hash functions:- SHA-224
- SHA-256
- SHA-384
- SHA-512
Modes of Operation
HKDF operates in two modes:-
Extract-and-Expand (full HKDF)
- Extract: Derive a pseudorandom key from input key material
- Expand: Expand the PRK into multiple output keys
-
Expand-Only
- Skip extraction phase when input is already a strong key
Configuration
HKDF is experimental and disabled by default. Check the configuration guide for platform-specific enable flags.Usage with OpenSSL EVP API
Extract-and-Expand Mode
Expand-Only Mode
Limitations
The QAT HKDF implementation has the following constraints:- Maximum info length: 1024 bytes (QAT_HKDF_INFO_MAXBUF)
- Maximum output length: Limited by hash function (255 × hash_len)
Performance Considerations
TLS PRF
- Hardware acceleration provides the most benefit during TLS handshakes
- Performance gains increase with:
- Larger derived key material sizes
- Multiple concurrent TLS sessions
- High-throughput scenarios
HKDF
- Extract-and-expand mode benefits from hardware acceleration of both HMAC operations
- Expand-only mode is faster but requires a strong PRK
- Larger output key sizes see better hardware acceleration benefits
Software Fallback
Both PRF and HKDF automatically fall back to OpenSSL software implementation when:- QAT hardware is unavailable
- Operation parameters exceed hardware limits
- Request queue is full
- Algorithm is disabled or unsupported on the platform
Error Handling
Always check return values and handle errors appropriately:Use Cases
TLS PRF
- TLS/SSL session key derivation
- Master secret derivation
- Finished message verification
- Exporters for additional key material
HKDF
- Protocol key derivation (e.g., QUIC, Noise Protocol)
- Password-based key derivation (with strong salt)
- Key separation and expansion
- Deriving multiple keys from a single master secret