Module Info
- Reference
BT4PT-EnvelopeV1-0- Numeric OID
1.3.6.1.4.1.17218.1.2.2.1.0
BT4PT Envelope - DRAFT.
The envelope SHALL be encoded with the Canonical Aligned Packed Encoding Rules, as this makes it easier to work with in constrained environments, such as HSMs. Data elements within the header SHOULD be encoded with the Canonical Unaligned Packed Encoding Rules, for space savings.
BT4PT-EnvelopeV1-01.3.6.1.4.1.17218.1.2.2.1.0This module explicitly exports the following symbols:
BT4PTEnvelope SecurityProviderDataElementsCompanyCode Timestamp TimestampSeconds Data DSSSignature ECPublicKey DATA-ELEMENT
This data structure is the basic entry point of the envelope. A BT4PT envelope SHALL consist of the bytes resulting from encoding this data structure using the Canonical Aligned Packed Encoding Rules, per .
The value of this choice may be one of the following:
This variant contains the list of data elements that the envelope encodes, in an unsigned fashion, with no additional security data.
This variant SHALL only be used where no security is required. That is, when an unsigned envelope is considered suitable for the application.
This type is constrained in the following way:
The length of the value must be greater than or equal to:
1
The length of the value must be less than or equal to:
16
This type is concretely parameterised with the following:
This type is constrained in the following way:
The type must satisfy the following field constraints, other fields are unconstrained:
| Field | Presence | Value |
|---|---|---|
| format | No stipulation |
InverseAny value, except any satisfying the following: UnionAny of the following can be true: Single value
The value must be exactly:
OR Single value
The value must be exactly:
OR Single value
The value must be exactly:
|
This variant is used for a signed envelope. It contains the list of data elements that the envelope encodes, along with a signature from the Security Provider, the certificate for the end-entity that output this envelope, and an optional binding of this envelope to a end-device's public key.
This sequence contains the following fields:
This field contains the Security Provider Signed Data, as well as any additional data to be signed by the device.
This field is used as part of the device binding of envelopes. When an envelope is bound to a Presentment
Device, it SHALL contain a signature, calculated over the Canonical Aligned Packed Encoding Rules encoding
of DeviceSignedData, using the device held private key corresponding to the public key provided in the
deviceBinding.devicePublicKey field of SecurityProviderSignedData.
If the deviceBinding field of the SecurityProviderSignedData is unset, and this field is set, the envelope SHALL be
construed as invalid.
If the deviceBinding field of the SecurityProviderSignedData is set, and this field is unset, the envelope SHALL be
construed as invalid.
This sequence contains the following fields:
This field contains the data signed by the Security Provider, in a message recovery fashion. Its inner data is the Canonical Aligned Packed Encoding Rules encoding of SecurityProviderSignedData, prefixed with the first 16 bytes of its hash, using the hash function of the curve of the signature, as specified in .
This field contains the end-entity certificate used to sign the data field.
This field contains the timestamp at which the Presentment Device generated the envelope.
This field SHALL be set if the deviceBinding field of the SecurityProviderSignedData is set, otherwise the
envelope SHALL be construed as invalid.
If this timestamp is more than the deviceBinding.validityDuration field of the SecurityProviderSignedData seconds
in the past, the envelope SHALL be construed as invalid, subject to the clock tolerance specified in
.
A Presentment Device SHALL NOT rely on its local clock alone when generating the timestamp of the device
signed data. It SHALL determine the offset of its local clock from the time of a reliable source, such as the
systems of the issuer, whenever it is online, and SHALL correct the timestamp by that offset. A Presentment
Device whose clock is set incorrectly, whether accidentally or deliberately, will otherwise generate envelopes
that are rejected as expired or as having a timestamp in the future.
This field contains data elements signed only by the Presentment Device, or not signed at all.
Note: the inclusion of device data without the SecurityProviderSignedData.deviceBinding field being set is
not an error. It is permissible to include unauthenticated device data, for example as a debugging aid, or for
the inclusion of a TOTP (see ).
This type is constrained in the following way:
The length of the value must be greater than or equal to:
1
The length of the value must be less than or equal to:
8
This type is concretely parameterised with the following:
This type is constrained in the following way:
The type must satisfy the following field constraints, other fields are unconstrained:
| Field | Presence | Value |
|---|---|---|
| format | No stipulation |
InverseAny value, except any satisfying the following: UnionAny of the following can be true: Single value
The value must be exactly:
OR Single value
The value must be exactly:
OR Single value
The value must be exactly:
|
This sequence contains the following fields:
This field contains data elements signed by the Security Provider.
This type is constrained in the following way:
The length of the value must be greater than or equal to:
1
The length of the value must be less than or equal to:
64
This type is concretely parameterised with the following:
This type is constrained in the following way:
The type must satisfy the following field constraints, other fields are unconstrained:
| Field | Presence | Value |
|---|---|---|
| format | No stipulation |
InverseAny value, except any satisfying the following: UnionAny of the following can be true: Single value
The value must be exactly:
OR Single value
The value must be exactly:
OR Single value
The value must be exactly:
|
This field allows for the encoding of an expiry date for the envelope. After this timestamp the envelope needs to be regenerated by the Security Provider for it to remain valid.
Note: this is different from the ticket validity encoded in a data element. An envelope could be valid for more or for less time than the transport product encoded in a data element.
This field allows for the binding of a barcode envelope to a specific end-device.
This sequence contains the following fields:
If device binding is in use, this field SHALL contain the public-key of the Presentment Device.
The value of this choice may be one of the following:
A point on the NIST P-256 curve.
This type is concretely parameterised with the following:
32
A point on the NIST P-384 curve.
This type is concretely parameterised with the following:
48
A point on the NIST P-521 curve.
This type is concretely parameterised with the following:
66
This type is constrained in the following way:
The length of the value must exactly:
32
This type is constrained in the following way:
The length of the value must exactly:
57
If the public-key is not one of the above types, this variant SHALL be used, and SHALL contain
an X.509 SubjectPublicKeyInfo structure, encoded according to the Distinguished Encoding
Rules per .
This field sets how long, in seconds, an envelope signed by the Presentment Device stays valid after generation. This value SHOULD NOT be less than 30 seconds, as a shorter duration leaves little margin for clock skew, etc.
This type is constrained in the following way:
The value must be greater than or equal to:
1
The value must be less than or equal to:
3600
The following data elements can appear in the data field of the SecurityProviderSignedData structure.
Note: other data elements, not defined in this standard, are also permitted to appear.
This object set has the following members:
| &id | &Type | &encoding | &Constraints |
|---|---|---|---|
MMT1
|
MultiModalTicket | cuperEncoding | MultiModalTicketConstraints |
FPD1
|
FixedPoint | cuperEncoding | FixedPointConstraints |
LUG1
|
LuggageTag | cuperEncoding | LuggageTagConstraints |
ENC1
|
EncryptedData | cuperEncoding | NULL |
HSM1
|
HSMTrace | cuperEncoding | HSMTraceConstraints |
REV1
|
RevocationRequest | cuperEncoding | NULL |
FCB3
|
UicRailTicketData | cuperEncoding | NULL |
FCB2
|
UicRailTicketData | cuperEncoding | NULL |
FCB13
|
UicRailTicketData | cuperEncoding | NULL |
| Other members may be added at runtime. | |||
The following data elements can appear in the deviceData field of the DeviceSignedData structure.
Note: other data elements, not defined in this standard, are also permitted to appear.
The difference between DCD1 and DCD1A is that the first uses unaligned packed encoding and the second uses
aligned packed encoding; otherwise, they are identical.
This object set has the following members:
| &id | &Type | &encoding | &Constraints |
|---|---|---|---|
DCD1
|
DynamicContent | cuperEncoding | NULL |
DCD1A
|
DynamicContent | caperEncoding | NULL |
OTP1
|
TotpValue | rawEncoding | NULL |
OTP1Q
|
TotpValue | rawEncoding | NULL |
FDC1
|
UicDynamicContentData | cuperEncoding | NULL |
| Other members may be added at runtime. | |||
This assignment is parameterised, accepting the following parameters:
The length, in bytes, of each of r and s. That is, half the total signature length.
This sequence contains the following fields:
The output r of the ECKNR signature process.
This type is constrained in the following way:
The length of the value must exactly: Parameter len
The output s of the ECKNR signature process.
This type is constrained in the following way:
The length of the value must exactly: Parameter len
The non-recoverable data part. That is, the remaining data of the ECKNR signature process.
This data structure contains a Elliptic Curve KCDSA/Nyberg-Rueppel message recovery signature. Such a signature is defined in
The value of this choice may be one of the following:
An ECKNR signature over the NIST P-256 curve with the SHA-256 hash function.
This type is concretely parameterised with the following:
32
An ECKNR signature over the NIST P-384 curve with the SHA-384 hash function.
This type is concretely parameterised with the following:
48
An ECKNR signature over the NIST P-521 curve with the SHA-512 hash function.
This type is concretely parameterised with the following:
66
This data structure contains a non-message recovery (i.e. standard) signature.
The value of this choice may be one of the following:
An ECDSA signature over the NIST P-256 curve with the SHA-256 hash function.
This type is concretely parameterised with the following:
32
An ECDSA signature over the NIST P-384 curve with the SHA-384 hash function.
This type is concretely parameterised with the following:
48
An ECDSA signature over the NIST P-521 curve with the SHA-512 hash function.
This type is concretely parameterised with the following:
66
An EdDSA signature over Curve25519.
This type is constrained in the following way:
The length of the value must exactly:
64
An EdDSA signature over Curve448.
This type is constrained in the following way:
The length of the value must exactly:
114
If the signature scheme is not one of the above types, this variant SHALL be used.
This sequence contains the following fields:
An object identifier specifying which signature scheme is in use.
The encoded signature, as per the above algId.