Concat-KDF
NIST's single-step hash-based key derivation from a shared secret, per SP 800-56A/56C
About Concat-KDF
Concat-KDF is a key derivation function from the Concatenation KDF (one-step KDF) family. It uses a 1–1,048,576-byte key, a 1–1,048,576-byte output and a 0–65,536-byte info. It takes the parameter hash (default sha256). Its registry entry cites NIST SP 800-56A rev.3 section 5.8.2.1 (Concatenation KDF) and NIST SP 800-56C rev.2 section 4 (one-step KDF, hash option). It is also known as kda-onestep, sskdf, sp800-56c-onestep and sskdf-hash. NextSSL lists it in the standard tier and exposes it through the safe API.
Overview
The Concatenation KDF derives keying material from a shared secret by hashing a counter, the secret and context information. NIST specifies it as the one-step KDF for key-agreement schemes, and it is used by JOSE ECDH-ES and some CMS profiles.
The construction is simple: for counter values 1, 2, 3 and so on, compute H(counter || Z || OtherInfo), where Z is the shared secret from a key agreement and OtherInfo encodes algorithm identifiers, party identities and other context. The outputs are concatenated and truncated to the desired length. SP 800-56C Rev. 2 generalises it as the one-step KDF, permitting a hash function, HMAC or KMAC as the auxiliary function; this family implements the hash option.
Unlike HKDF, it does not separate extraction and expansion, so its security analysis assumes Z already has sufficient entropy in a form the hash can use. It remains approved and widely deployed, particularly in JOSE (the ECDH-ES algorithm in RFC 7518) and in ECIES-style schemes. It is also simple to implement on top of any approved hash function, which has helped its adoption in constrained environments.
History
2006–2020Concatenation KDF published
Specified in NIST SP 800-56A rev.3 section 5.8.2.1
Specified in NIST SP 800-56C rev.2 section 4
How it works
- Encode OtherInfo from algorithm IDs, party information and supplementary data.
- For i = 1, 2, ..., compute K_i = H(i as 32-bit big-endian || Z || OtherInfo).
- Concatenate K_1, K_2, ... until enough bytes are produced.
- Truncate to the requested key length.
Security notes
Sound for its intended use with a full-entropy key-agreement output. Context information should be unambiguous and include identities and algorithm identifiers to prevent key reuse across contexts. For new protocols, HKDF is the more common choice.
Typical uses
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| key | 1 – 1,048,576 | Secret key |
| out | 1 – 1,048,576 | Output |
| salt | 0 | Salt |
| info | 0 – 65,536 | Info |
Parameters
| Name | Type | Range | Default | Required |
|---|---|---|---|---|
| hash | enum | 0 – | sha256 | no |
Parameters are passed as a string, for example nextssl_mac("hmac", "hash=sha512", …). Omitted parameters take their declared default.
Use it
from nextssl_demo import NextSSL
ns = NextSSL() # safe API: safe and standard tiers
okm = ns.call("kdf", "concat-kdf", None, ikm, salt, b"context", 32)[0]
nextssl_kdf("concat-kdf", NULL, ikm, salt, info, 32, out);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let alg = reg::new_kdf_in(reg::all(), Policy::Safe, "concat-kdf", &Params::new())?;
let okm = alg.derive(&ikm, &salt, b"context", 32)?;
Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.
More key derivation
All 10Frequently asked questions
What is Concat-KDF?
Concat-KDF is a KDF in the Concatenation KDF (one-step KDF) family. The Concatenation KDF derives keying material from a shared secret by hashing a counter, the secret and context information. It is also known as kda-onestep, sskdf, sp800-56c-onestep, sskdf-hash.
What are the Concat-KDF sizes?
In NextSSL, Concat-KDF uses: key 1 to 1,048,576 bytes, output 1 to 1,048,576 bytes.
Who designed Concat-KDF and when?
Concat-KDF belongs to the Concatenation KDF (one-step KDF) family, first published in 2006. Its origin: NIST SP 800-56A Rev. 3 section 5.8.2.1; SP 800-56C Rev. 2 section 4.
Which standards define Concat-KDF?
Concat-KDF is referenced by NIST SP 800-56A rev.3 section 5.8.2.1 (Concatenation KDF), NIST SP 800-56C rev.2 section 4 (one-step KDF, hash option).
Is Concat-KDF safe to use?
Concat-KDF is in the standard tier. Standardised and sound. Reachable from the safe API. It can be called from the safe API.
Related families
NIST SP 800-90A deterministic random bit generator built on HMAC
SHA-2The NIST Merkle–Damgård hash family behind most of today's TLS, signatures and software
HKDFHMAC-based extract-and-expand key derivation function (RFC 5869)
ECDH (including X25519 and X448)Elliptic-curve Diffie-Hellman key agreement on NIST curves, Curve25519 and Curve448
HMACThe standard way to build a MAC from a cryptographic hash (RFC 2104, FIPS 198-1)