rfc-6030

Portable Symmetric Key Container (PSKC)

P. Hoyer, M. Pei, S. Machani
date2010-10 streamIETF areasec wgkeyprov statusPROPOSED STANDARD pages58 canonicalhttps://www.rfc-editor.org/rfc/rfc6030 doi10.17487/RFC6030 errataview
This document specifies a symmetric key format for the transport and provisioning of symmetric keys to different types of crypto modules. For example, One-Time Password (OTP) shared secrets or symmetric cryptographic keys to strong authentication devices. A standard key transport format enables enterprises to deploy best-of-breed solutions combining components from different vendors into the same infrastructure. [STANDARDS-TRACK]

Extracted elements (31)

design-rationale §1

PSKC was designed as an XML-based standard key container to replace proprietary vendor formats for importing/exporting symmetric keys (OTP shared secrets, encryption keys) to authentication servers and hardware tokens, enabling best-of-breed deployments mixing components from different vendors.

crypto, security

design-rationale §5

The deny-by-default behavior for unrecognized <Policy> child elements (Section 5) was chosen to ensure that future policy extensions cannot be silently ignored, preventing an implementation that does not understand a new restriction from inadvertently permitting key usage that the sender intended to prohibit.

crypto, security

interoperability-note §4.2

Unless an algorithm specification explicitly defines a different encoding, all key OCTET STRING encodings in PSKC MUST follow the AES Key Value Encoding (first octet = MSB index 0). Implementers must verify test vectors from FIPS 197 Appendix A match when decoding the canonical base64 PlainValue.

crypto, security

normative-requirement §3 MUST

A valid <KeyContainer> MUST carry at least one <KeyPackage> entity.

crypto, security

normative-requirement §4.3.1 MUST

Date values in <StartDate> and <ExpiryDate> elements (in both <DeviceInfo> and <Policy>) MUST be expressed as xs:dateTime in canonical representation; implementations SHOULD NOT rely on time resolution finer than milliseconds and MUST NOT generate time instants specifying leap seconds.

crypto, security

normative-requirement §10.1 MUST

For the HOTP algorithm profile, the <Secret> element value MUST contain key material with a length of at least 16 octets (128 bits) if present. The <ResponseFormat> 'Format' attribute MUST be 'DECIMAL' and the 'Length' attribute MUST be between 6 and 9 inclusive.

crypto, security

normative-requirement §5 MUST

If the <Policy> element contains child elements or attribute values not understood by the recipient, the recipient MUST assume that key usage is not permitted. This deny-by-default ensures unknown policy extensions do not silently permit unintended usage.

crypto, security

normative-requirement §4.1 MUST

The <Key> element 'Id' attribute value MUST remain the same across multiple PSKC interactions referencing the same key (e.g., initial provisioning followed by metadata update), to enable stable key identification between parties.

crypto, security

normative-requirement §5 MUST

The recipient of a PSKC document MUST enforce the <KeyUsage> element constraints; e.g., a key with usage 'OTP' MUST only be used for OTP generation.

crypto, security

normative-requirement §4 MUST

The 'Version' attribute MUST be included in the <KeyContainer> element. Version major and minor numbers MUST be treated as separate integers; leading zeros MUST be ignored by recipients and MUST NOT be sent.

crypto, security

normative-requirement §6.1.1 MUST

When algorithms without integrity checks (such as AES-128-CBC) are used, a keyed-MAC value MUST be placed in the <ValueMAC> element, and the MAC algorithm type MUST be set in the <MACMethod> element. The MAC key MUST be randomly generated or pre-agreed, and if randomly generated, MUST be encrypted with the same encryption key.

crypto, security

normative-requirement §6 MUST

When encryption algorithms using CBC mode are employed, a random IV MUST be generated for each encrypted value and MUST be prepended to the resulting encrypted value as specified in XML Encryption.

crypto, security

normative-requirement §6.2 MUST

When using passphrase-based key derivation (PBKDF2), the <DerivedKey> element from XML Encryption 1.1 MUST be used as a child of <EncryptionKey>; the 'Algorithm' attribute of <KeyDerivationMethod> MUST be set to the PBKDF2 URI, and the <PBKDF2-params> child element MUST be included.

crypto, security

protocol-element §4.3.4

The <AlgorithmParameters> element contains <Suite> (algorithm-specific characteristics, e.g., hash strength), <ChallengeFormat> (encoding, min/max size, CheckDigit for CR algorithms), and <ResponseFormat> (encoding, length, CheckDigit for OTP/CR output). Both <ChallengeFormat> and <ResponseFormat> require mandatory 'Encoding', and 'Min'/'Max' or 'Length' attributes.

crypto, security

protocol-element §4.1

The <Data> element carries key-related metadata with child elements <Secret> (key value as base64Binary), <Counter> (event counter for HOTP), <Time> (time intervals for TOTP), <TimeInterval> (interval in seconds), and <TimeDrift> (device clock drift). Each supports plaintext via <PlainValue> or encrypted form via <EncryptedValue>, with optional <ValueMAC> for integrity.

crypto, security

protocol-element §4.3.1

The <DeviceInfo> element uniquely identifies the target device using combinations of <Manufacturer>, <SerialNo>, <Model>, <IssueNo>, <DeviceBinding>, <StartDate>, <ExpiryDate>, and <UserId> child elements. Manufacturer values MUST be prefixed with 'oath.' (from OATH registry) or 'iana.' (from IANA PEN registry).

crypto, security

protocol-element §6

The <EncryptionKey> element, a child of <KeyContainer>, specifies the key protection method for all enclosed <KeyPackage> elements: pre-shared keys (via <ds:KeyName>), passphrase-derived keys (via <xenc11:DerivedKey> with PBKDF2), or asymmetric keys (via <ds:X509Data>). The same encryption algorithm MUST be applied to all encrypted elements.

crypto, security, pkix

protocol-element §4.1

The <Key> element carries keying material and metadata, with mandatory 'Id' (unique alphanumeric key identifier stable across provisioning interactions) and optional 'Algorithm' (PSKC algorithm profile URI) attributes, plus optional child elements including <Issuer>, <FriendlyName>, <AlgorithmParameters>, <Data>, <UserId>, and <Policy>.

crypto, security

protocol-element §4

The <KeyContainer> element is the top-level PSKC document element, carrying one or more <KeyPackage> elements along with optional <EncryptionKey>, <MACMethod>, <Signature>, and <Extensions> child elements. It requires a mandatory 'Version' attribute and an optional 'Id' attribute for unique container identification.

crypto, security

protocol-element §3

The <KeyPackage> element bundles at most one <Key> element together with its associated <DeviceInfo> and <CryptoModuleInfo> elements, representing the provisioning or usage endpoint for a single symmetric key.

crypto, security

protocol-element §6.1.1

The <MACMethod> element specifies the MAC algorithm URI and carries an encrypted <MACKey> (or <MACKeyReference> for pre-shared MAC keys). It is required when encryption algorithms lacking integrity checks (e.g., AES-CBC) are used, and applies container-wide to all encrypted values.

crypto, security

protocol-element §5

The <Policy> element attaches key usage constraints to a <Key>, including <StartDate>/<ExpiryDate> for validity period, <NumberOfTransactions> for maximum use count, <KeyUsage> (OTP, CR, Encrypt, Integrity, Verify, Unlock, Decrypt, KeyWrap, Unwrap, Derive, Generate), and <PINPolicy> for PIN enforcement parameters.

crypto, security

protocol-element §1.3

The PSKC XML namespace for version 1.0 is 'urn:ietf:params:xml:ns:keyprov:pskc', and implementations SHOULD use the prefix 'pskc'. PSKC also relies on XML Signature (ds:), XML Encryption (xenc:), XML Encryption 1.1 (xenc11:), and PKCS#5 (pkcs5:) namespaces.

crypto, security, registry

registry §12.6

This document creates the 'Key Usage Registry' (Section 12.6) with initial values: OTP, CR, Encrypt, Integrity, Verify, Unlock, Decrypt, KeyWrap, Unwrap, Derive, Generate. New key usage values require IETF Review.

registry, crypto, security

registry §12.4

This document creates the 'PSKC Algorithm Profile Registry' (Section 12.4) to record algorithm profiles with their metadata and PSKC transmission profiles. Initial entries are the HOTP profile (urn:ietf:params:xml:ns:keyprov:pskc:hotp) and the PIN profile (urn:ietf:params:xml:ns:keyprov:pskc:pin). New profiles require IETF Review.

registry, crypto, security

registry §12

This document registers the 'application/pskc+xml' MIME media type (Section 12.1) for PSKC documents, and registers the XML schema and URN sub-namespace 'urn:ietf:params:xml:ns:keyprov:pskc' (Sections 12.2, 12.3). A 'PSKC Version Registry' is also created (Section 12.5) with initial entry '1.0'.

registry, crypto, security

security-consideration §13.3

PSKC authenticity is established via an XML digital signature (<Signature> child element of <KeyContainer>) using XML Signature [XMLDSIG]. This enables receivers to verify the origin of a PSKC document and that it has not been tampered with in transit.

crypto, security, pkix

security-consideration §13.1

PSKC confidentiality requires that symmetric keys be protected in transport. PSKC supports three protection methods: pre-shared key encryption (recommended: AES-128-CBC and KW-AES128), passphrase-derived key encryption (PBKDF2), and asymmetric key encryption (recommended: RSA-1.5). Keys SHOULD NOT be transmitted in plaintext in production deployments.

crypto, security

security-consideration §13.2

PSKC integrity is provided by the <ValueMAC> mechanism when encryption algorithms without built-in integrity (e.g., AES-CBC) are used, and by XML digital signatures over the entire <KeyContainer>. Both mechanisms may be combined; the MAC protects individual encrypted values while the signature covers the whole document.

crypto, security

wire-format §4.2.1

Key values in <PlainValue> and <EncryptedValue> are encoded as xs:base64Binary (OCTET STRING). For AES keys, the first octet of the OCTET STRING maps to AES key byte index 0 (MSB-first per FIPS 197 Section 5.2). This encoding is the default for all algorithms unless the algorithm specification states otherwise.

crypto, security

wire-format §4.2.2

Triple-DES key bundles are encoded as a concatenated OCTET STRING of Key1 || Key2 || Key3 (each 64 bits, 8 bytes, MSB first), with two-key Triple-DES using Key2 in place of Key3. The encoding must match SP 800-67 Appendix B test vectors.

crypto, security