Key derivation

Concat-KDF

NIST's single-step hash-based key derivation from a shared secret, per SP 800-56A/56C

standard Safe API

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–2020
  1. Concatenation KDF published

  2. Specified in NIST SP 800-56A rev.3 section 5.8.2.1

  3. Specified in NIST SP 800-56C rev.2 section 4

How it works

  1. Encode OtherInfo from algorithm IDs, party information and supplementary data.
  2. For i = 1, 2, ..., compute K_i = H(i as 32-bit big-endian || Z || OtherInfo).
  3. Concatenate K_1, K_2, ... until enough bytes are produced.
  4. 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

JOSE ECDH-ES key derivation (RFC 7518)Deriving keys after ECDH in NIST-compliant systemsECIES-style encryption schemes

Sizes

FieldBytesMeaning
key1 – 1,048,576Secret key
out1 – 1,048,576Output
salt0Salt
info0 – 65,536Info

Parameters

NameTypeRangeDefaultRequired
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]

Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.

Frequently 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.