BT4PT-HSMTraceV1-0

A record to include in the BT4PT barcode header SecurityProviderSignedData to allow for tracing which HSM generated a signature.

Module Info

Reference
BT4PT-HSMTraceV1-0
Numeric OID
1.3.6.1.4.1.17218.1.2.6.1.0

Assignments

HSMTrace

SEQUENCE

This sequence contains the following fields:

hsmId

An opaque random ID. This value SHALL be assigned by a cryptographically secure pseudo-random number generator at the personalisation of the Hardware Security Module.

OCTET STRING

This type is constrained in the following way:

Size

The length of the value must exactly: 8

keySlot

ID of the key slot of the HSM that was used to generate the signature.

INTEGER

This type is constrained in the following way:

Range

The value must be greater than or equal to: 0

The value must be less than or equal to: 255

signatureCounter

Monotonically increasing global counter of signatures performed by the HSM, encoded as a big-endian integer. That is, this counter is for the entire HSM, not merely one key slot. The sequence need not be contiguous; gaps are permitted between values, as long as the counter does not go backwards.

This counter SHALL be maintained by the HSM itself, SHALL be incremented for each signature generated, successful or not.

Wrap-around is not permitted; once the counter reaches its limit, the HSM is considered spent. A HSM whose signature counter has reached its maximum value SHALL NOT generate any further signatures.

OCTET STRING

This type is constrained in the following way:

Size

The length of the value must exactly: 4

HSMTraceConstraints

The constraints placed on the HSM Trace data element by a Security Provider Data Authorisation record. They bind the key pair certified by a certificate to the Hardware Security Module holding it.

As Security Provider Data Authorisation is cumulative, every Certificate Authority in the chain of a HSM-held key has to permit the HSM Trace data element, but only the Issuing Certificate Authority can know which Hardware Security Modules hold the key. permittedHsmId is therefore optional, and an entry without it permits the data element without restricting its hsmId.

When any Security Provider Data Authorisation record in the certificate chain of an envelope contains an entry for the HSM Trace data element which has permittedHsmId, the Security Provider signed data of the envelope SHALL contain exactly one HSM Trace data element, and its hsmId SHALL be equal to the permittedHsmId of every such entry. Otherwise, the envelope SHALL be construed as invalid.

SEQUENCE

This sequence contains the following fields:

permittedHsmId Optional

The hsmId value of the Hardware Security Module which holds the private key, and is thus permitted to sign envelopes under the certificate.

OCTET STRING

This type is constrained in the following way:

Size

The length of the value must exactly: 8

hsmTraceData

When the private key of an End-Entity is held in a Hardware Security Module, the Security Provider SHALL include this HSM Trace data element in the Security Provider signed data of each envelope signed with that key. This allows tracing of the source of an envelope, and the revocation of keys only from a given point in time onward.

The HSM SHALL itself set the hsmId, keySlot, and signatureCounter of the HSM Trace data element in the data it signs, or SHALL verify that they are equal to its own identifier, the key slot used, and the value of its signature counter for that signature, and refuse to sign otherwise. The values of this data element SHALL NOT be alterable by any entity outside the HSM.

When an End-Entity Certificate is issued to a key pair held in a HSM, the Issuing Certificate Authority SHALL include permittedHsmId in the entry for this data element in the Security Provider Data Authorisation of the End-Entity Certificate. When an End-Entity Certificate is not issued to a key pair held in a HSM, the Certificate Authority SHALL NOT permit this data element in the Security Provider Data Authorisation of the certificate.

OBJECT

This is an object of the class: DATA-ELEMENT

This object has the following field values:

&id
HSM1
&Type
HSMTrace
&encoding
cuperEncoding
&Constraints
HSMTraceConstraints

HSMAlgorithmIdentifier

This structure encodes an algorithm identifier, as used by the interface to End-Entity Hardware Security Modules.

This type is a restriction of the AlgorithmIdentifier type of to algorithms whose parameters are either absent or a named curve object identifier. For such algorithms, its encoding per the Distinguished Encoding Rules is identical to that of AlgorithmIdentifier.

SEQUENCE

This sequence contains the following fields:

algorithm

The object identifier of the algorithm.

OBJECT IDENTIFIER
parameters Optional

The parameters of the algorithm. For id-ecPublicKey this SHALL be the object identifier of the named curve, per . For all other algorithms used with this type, this SHALL be absent.

OBJECT IDENTIFIER

HSMPublicKeyInfo

This structure encodes a public key, as used by the interface to End-Entity Hardware Security Modules.

This type has the same encoding per the Distinguished Encoding Rules as the SubjectPublicKeyInfo type of . Elliptic curve public keys SHALL be encoded per , with the point in the uncompressed form, and Ed25519 and Ed448 public keys per .

SEQUENCE

This sequence contains the following fields:

algorithm

The type of the key.

HSMAlgorithmIdentifier
subjectPublicKey

The public key itself.

BIT STRING

AuthorisationGrant

This structure encodes an authorisation grant, issued by a grant authority to a Hardware Security Module. It SHALL be encoded per the Distinguished Encoding Rules.

SEQUENCE

This sequence contains the following fields:

tbsGrant

The content of the grant.

TBSAuthorisationGrant
signatureAlgorithm

The algorithm with which the grant is signed. This SHALL be compatible with the grant authority key of the Hardware Security Module.

HSMAlgorithmIdentifier
signature

The signature of the grant authority over the encoding of tbsGrant per the Distinguished Encoding Rules. For ECDSA, this SHALL contain the Ecdsa-Sig-Value structure, per .

BIT STRING

TBSAuthorisationGrant

This structure encodes the signed content of an authorisation grant.

SEQUENCE

This sequence contains the following fields:

hsmId

The hsmId of the Hardware Security Module to which the grant is issued.

OCTET STRING

This type is constrained in the following way:

Size

The length of the value must exactly: 8

challenge

The challenge most recently generated by the Hardware Security Module.

OCTET STRING

This type is constrained in the following way:

Size

The length of the value must exactly: 16

grantLimit

The highest value the signature counter of the Hardware Security Module is permitted to reach.

INTEGER

This type is constrained in the following way:

Range

The value must be greater than or equal to: 0

The value must be less than or equal to: 4294967295

GrantAuthorityKeyChange

This structure encodes an instruction, from a grant authority to its Hardware Security Module, to replace its grant authority key. It SHALL be encoded per the Distinguished Encoding Rules.

SEQUENCE

This sequence contains the following fields:

tbsKeyChange

The content of the instruction.

TBSGrantAuthorityKeyChange
signatureAlgorithm

The algorithm with which the instruction is signed. This SHALL be compatible with the current grant authority key of the Hardware Security Module.

HSMAlgorithmIdentifier
signature

The signature of the current grant authority over the encoding of tbsKeyChange per the Distinguished Encoding Rules. For ECDSA, this SHALL contain the Ecdsa-Sig-Value structure, per .

BIT STRING

TBSGrantAuthorityKeyChange

The signed content of an instruction to replace the grant authority key.

SEQUENCE

This sequence contains the following fields:

hsmId

The hsmId of the Hardware Security Module whose grant authority key is to be replaced.

OCTET STRING

This type is constrained in the following way:

Size

The length of the value must exactly: 8

challenge

The challenge most recently generated by the Hardware Security Module.

OCTET STRING

This type is constrained in the following way:

Size

The length of the value must exactly: 16

newKey

The new grant authority key.

HSMPublicKeyInfo