Sensitive Credential Elements
Data that is declared sensitive must be protected by being wrapped.
Wrapped Sensitive Data
All wrapped sensitive data is transported from the Credential Provider to ActivID CMS using the standard PKCS#1 v1.5 RSAES-PKCS1- v1_5 scheme using 3DES in Cipher-Block Chaining (CBC) encryption mode. All data is double-wrapped for uniformity and to facilitate encryption of large amounts of data (larger than the public key). Double-wrapped data is data to which the following functions have been applied:
-
Generated a symmetric session key
-
Encrypted the data using the symmetric session key
-
Wrapped the symmetric session key with a public transport key
Each CredentialProviderContext that requires secure transport of data should use the transport encryption certificate that is provided in the CredentialProviderConfiguration by ActivID CMS as an information attribute.
Sensitive data should be transported from the Credential Provider to ActivID CMS as a CRMF.EncryptedValue ASN.1 DER- encoded (Distinguished Encoding Rules) value that has been converted to Base64 representation. The structure of these encoded values are described in the following sections.
Level 1: DER-Encoded CRMF.EncryptedValue
The ASN.1 definition of the CRMF.EncryptedValue required by ActivID CMS is:
EncryptedValue ::= SEQUENCE {
intendedAlg [0] AlgorithmIdentifier OPTIONAL,
-
The intended algorithm for which the value will be used
symmAlg [1] AlgorithmIdentifier OPTIONAL,
-
The symmetric algorithm used to encrypt the value
encSymmKey [2] BIT STRING OPTIONAL,
-
The (encrypted) symmetric key used to encrypt the value
keyAlg [3] AlgorithmIdentifier OPTIONAL,
-
A brief description or identifier of the encValue content
valueHint [4] OCTET STRING OPTIONAL,
-
This may be meaningful only to the sending entity, and only if the EncryptedValue might be re-examined by sending the entity in the future
encValue BIT STRING
-
The encrypted value itself
}
where
-
symmAlg indicates DESede/CBC/PKCS5Padding (OID 1.2.840.113549.3.7).
-
encSymmKey contains a DESede key that has been encrypted with RSA/ECB/PKCS1Padding (OID 1.2.840.113549.1.1.1) using the ActivID CMS RSA transport certificate.
-
encValue contains the sensitive data value encrypted with the DESede key according to the symmAlg algorithm; when the sensitive data value is a private key, this should be a PKCS#8 PrivateKeyInfo DER-encoded value.
-
Other parts of the EncryptedValue structure are not required.
Level 2: DER-Encoded PKCS#8 PrivateKeyInfo (for RSA Private Keys)
Once encValue has been decrypted with the DESede key, the ASN.1 definition of the PrivateKeyInfo is:
PrivateKeyInfo ::= SEQUENCE {
version Version,
privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
privateKey PrivateKey
attributes [0] IMPLICIT Attributes OPTIONAL
}
where:
-
version is the syntax version number.
-
PrivateKeyAlgorithmIdentifier indicates the RSA/ECB/PKCS1Padding (OID 1.2.840.113549.1.1.1).
-
PrivateKey is a PKCS#1 RSAPrivateKey DER-encoded value.
-
attributes is not required.
Level 3: DER-Encoded PKCS#1 RSAPrivateKey (for RSA Private Keys)
The ASN.1 definition of the PrivateKey attribute of the PKCS#8 object is:
RSAPrivateKey ::= SEQUENCE {
version Version,
-
an INTEGER version number; 0 for this standard
modulus INTEGER,
-
n
publicExponent INTEGER,
-
e
privateExponent INTEGER,
-
d
prime1 INTEGER,
-
primeP (p) (first prime factor of n)
prime2 INTEGER,
-
primeQ (q) (second prime factor of n)
exponent1 INTEGER,
-
primeExponentP: d mod (p - 1)
exponent2 INTEGER,
-
primeExponentQ: d mod (q - 1)
crtCoefficient INTEGER
-
Chinese Remainder Theorem ((inverse of q) mod p)
}