RFC-0021: Quorum (k-of-n) Recipients¶
Status: Proposed; adds a core recipient type next to RFC-0012.
Owner: Format and security leads.
Last updated: 2026-11-29
Context¶
An escrow recipient (RFC-0011) that one person can use is a single point of compromise: whoever holds the recovery key can read everything. Key management standards require “split knowledge and dual control” for exactly this kind of key (for example PCI DSS v4.0 requirement 3.7.6 for manual cleartext key operations), and enterprises run recovery as a ceremony that needs several custodians.
Binding decision¶
cryptography_suite.providers.quorum.QuorumRecipientProvider is a core
KeyProvider:
Shares. The data key is split with Shamir secret sharing over GF(2^8) (AES polynomial
x^8 + x^4 + x^3 + x + 1), one independent random polynomial of degreethreshold - 1per byte, with coefficients from the operating-system CSPRNG. Sharei(1-based) is the polynomial atx = i. Anythresholdshares reconstruct the key by Lagrange interpolation at zero; fewer reveal nothing about it.2 <= threshold <= n <= 16.Custodians. Each share is wrapped with HPKE (RFC-0012) to one custodian’s public key, any classical or post-quantum hybrid KEM (RFC-0017), and custodians may mix KEMs. Custodians must be distinct keys.
Versions. A quorum version is
q<threshold>of<n>-followed by the hex SHA-256 of"cryptography-suite/v4 quorum key" || 0x00 || u8(threshold) || u8(n) ||each custodian fingerprint (RFC-0012) asu16(len) || fingerprint, in share order. Changing the threshold or the custodian set is a new version under the samekey_id; the newest is what an unversionedKeyRefnames, andrewrapmoves envelopes to it.Binding. Share
i’s HPKEbindingis"cryptography-suite/v4 quorum share" || 0x00 ||the length-prefixed (u32) provider id, key id, quorum version,u8(i), andSHA-256(envelope protected bytes). A share cannot be moved to another envelope, quorum version, or share position.Wrapped key.
body || tag, wherebodyisu8(1) || u8(threshold) || u8(n)followed, for each share in order, byu16(len) || HPKE ciphertext, andtagisHMAC-SHA-256(HMAC-SHA-256(dek, "cryptography-suite/v4 quorum integrity" || 0x00), SHA-256(binding) || body). The wrapping algorithm identifier iscs4-quorum-shamir-gf256-hpke. Any structural mismatch or tag mismatch isAUTHENTICATION_FAILED.Recovery.
add_custodian_identity(private_key)makes one custodian’s key available. Unwrap needs at leastthresholdof the quorum’s custodians and otherwise fails withCAPABILITY_UNSUPPORTED; it decrypts exactlythresholdshares, so only those custodians’ shares are exposed in memory, and wipes the shares and the reconstruction buffer. It then checks the tag with the reconstructed key, which authenticates every byte of the wrapped key, including shares it did not read, and detects a wrong reconstruction. (An earlier draft relied on the envelope’s recipient-manifest MAC for unread shares; running the provider conformance kit against a different custodian layout showed that a provider must reject such a change on its own.)
Security consequences¶
No single custodian, and no group smaller than the threshold, can recover the data key from the quorum recipient.
With
add_custodian_identity, the custodians’ private keys meet in the recovering process. RFC-0025 adds a distributed ceremony in which each custodian decrypts only their own share and re-encrypts it to the coordinator, with no format change.GF(2^8) arithmetic uses table lookups over secret values; it runs when sealing and during recovery and is not intended for environments where an attacker can time those operations at fine grain.
Test and validation requirements¶
tests/integration/test_quorum_recipients.py covers a KMS primary with a
2-of-3 quorum escrow end to end, every subset of a 3-of-5 quorum (all
threshold subsets recover, no smaller subset does), the conformance kit,
binding to header, version, and position, every structural rejection, a
change to every byte of the wrapped key, tampering seen through
Protector.open, rotation and rewrap, refusals, validation, and Shamir
properties under Hypothesis.