module
JOSE::JWA::ConcatKDF
Overview
Concat KDF (single-pass SHA-256) per RFC 7518 §4.6.2. Supports optional apu/apv (PartyUInfo / PartyVInfo) parameters.
Defined in:
jose/jwa/concat_kdf.crClass Method Summary
-
.derive(z : Bytes, algorithm : String, key_bits : Int32, apu : Bytes = Bytes.empty, apv : Bytes = Bytes.empty) : Bytes
Derives a symmetric key from shared secret z using Concat KDF (SHA-256, single-pass, RFC 7518 §4.6.2).
Class Method Detail
def self.derive(z : Bytes, algorithm : String, key_bits : Int32, apu : Bytes = Bytes.empty, apv : Bytes = Bytes.empty) : Bytes
#
Derives a symmetric key from shared secret z using Concat KDF (SHA-256, single-pass, RFC 7518 §4.6.2).
Returns the first key_bits/8 bytes of the SHA-256 digest.
algorithm is the JWE "alg" string bound into the key derivation.
apu and apv are optional PartyUInfo / PartyVInfo byte strings.