1.1.0
-
1.1.0
- Update for simplified structured encryption
-
1.0.0
- Initial record
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
This document includes the specifications for common structures referenced throughout the Structured Encryption Library specification. These structures define a group of related fields that MUST hold certain properties. Wherever these structures are referenced in this specification, implementations MUST ensure that all properties of a structure's fields are upheld.
Note that this specification does not specify how these structures should be represented or passed throughout the Structured Encryption Library. While these structures will usually be represented as objects, lower level languages MAY represent these fields in a less strictly defined way as long as all field properties are still upheld.
Structures defined in this document:
- Authenticate Action
- Authenticate Schema
- Crypto Action
- Crypto Schema
- Encrypt Action
- Encryption Context
- Structured Data
- Terminal Data
- Path Segment
- Path
- Crypto Item
- Crypto List
- Auth Item
- Auth List
An Authenticate Action describes whether a particular Terminal Data is or is not authenticated during the Encrypt Structure and Decrypt Structure operations.
During Encrypt Structure, SIGN signifies that the Terminal Data MUST be included in the signature calculations on the footer.
During Decrypt Structure, SIGN signifies that the Terminal Data MUST be authenticated, and thus be included in the verification of the signatures on the footer.
During Encrypt Structure, DO_NOT_SIGN signifies that the Terminal Data MUST NOT be included in the signature calculations on the footer.
During Decrypt Structure, DO_NOT_SIGN signifies that the Terminal Data MUST NOT be authenticated, and thus not be included in the verification of the signatures on the footer.
The Authentication Schema maps a Authenticate Action to each Terminal Data within a Structured Data, based on that Terminal Data's location within the Structured Data.
A Crypto Action is a supported Authenticate Action and Encrypt Action pair.
ENCRYPT_AND_SIGN indicates that the following actions apply to a Terminal Data:
SIGN_ONLY indicates that the following actions apply to a Terminal Data:
SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT indicates that the following actions apply to a Terminal Data:
and further that the Terminal Data MUST be included in the encryption context.
DO_NOTHING indicates that the following actions apply to a Terminal Data:
The Crypto Schema maps a Crypto Action to each Terminal Data within a Structured Data, based on that Terminal Data's location within the Structured Data.
An Encrypt Action describes whether a particular Terminal Data is or is not encrypted and decrypted during the Encrypt Structure and Decrypt Structure operations.
During Encrypt Structure, ENCRYPT signifies that the Terminal Value in the Terminal Data MUST be encrypted in the resulting encrypted Structured Data.
During Decrypt Structure, ENCRYPT signifies that the Terminal Value in the Terminal Data MUST be attempted to be decrypted.
During Encrypt Structure and Decrypt Structure, DO_NOT_ENCRYPT signifies that the Terminal Data MUST have an equal Terminal Value and Terminal Type Id as the the Terminal Data in the same location in the resulting encrypted Structured Data. No encryption or decryption is performed on the Terminal Data.
The Encryption Context as defined by the Material Providers Library specification.
Structured Data is intended to support the expression of most JSON and XML data.
Structured Data is expressed as a Structured Data Map
A Structured Data Map MUST consist of:
- A map strings to Terminal Data
- This map MUST NOT allow duplicate key values
Terminal Data is a structure that contains:
- Terminal Type ID
- Terminal Value
A Terminal Type ID MUST be a 2 byte value that is used to identify how callers interpret Terminal Value.
If Terminal Value is to be interpreted as raw bytes, the Terminal Type ID MUST be 0xFFFF. Any other value prefixed by 0xFF is reserved and MUST NOT be used.
It is the responsibility of the caller to define and maintain a mapping of Terminal Type IDs (including 0xFFFF) to specific types and how those types should be serialized and deserialized.
Terminal Value MUST be a sequence of bytes, and MAY be empty (zero-length).
If these bytes are to be deserialized, these bytes MUST be interpreted as the type indicated in this Terminal Data's Terminal Type ID.D
A path segment MUST be a string, designating the name of a member of a structure.
In the future, a path segment might also refer to an index into a list, or to an attribute name.
A path is a sequence of path segments that refer to a location within a structure.
A crypto item MUST consist of
- a Path
- a Crypto Action
- a Terminal Data
and indicates that this data exists at this location, and should be handled with this action.
A crypto list MUST be a sequence of crypto item
An auth item MUST consist of
- a Path
- an Authenticate Action
- a Terminal Data
and indicates that this data exists at this location, and should be handled with this action.
An auth list MUST be a sequence of auth item