Newer
Older
* @version $URL$
* $Id$
* @desc Module containing types and values for Security Protocol
* @see Draft ETSI TS 103 097 V1.1.14
garciay
committed
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
/**
* @desc Specification of basic format elements
* @see Draft ETSI TS 103 097 V1.1.14 Clause 4.2
group basicFormatElements {
* @see Draft ETSI TS 103 097 V1.1.14 Clause 4.2.1 IntX
*/
type integer IntX with { variant "IntX" };
/**
* @desc List of supported algorithms based on public key cryptography
* @see Draft ETSI TS 103 097 V1.1.14 Clause 4.2.2 PublicKeyAlgorithm
*/
type enumerated PublicKeyAlgorithm {
e_ecdsa_nistp256_with_sha256 (0),
} with { variant "8 bit" }
/**
* @desc List of supported algorithms based on symmetric key cryptography
* @see Draft ETSI TS 103 097 V1.1.14 Clause 4.2.3 SymmetricAlgorithm
*/
type enumerated SymmetricAlgorithm {
} with { variant "8 bit" }
/**
* @desc Wrapper for public keys by specifying the used algorithm
* @member algorithm Specifying the used algorithm
* @member public_key The public key structure
* @see Draft ETSI TS 103 097 V1.1.14 Clause 4.2.4 PublicKey
*/
type record PublicKey {
PublicKeyAlgorithm algorithm,
PublicKeyContainer public_key
} // End of type PublicKey
/**
* @desc Information regarding ECC contained in an EccPoint structure
* @member eccPoint Specific details regarding ECC contained in an EccPoint structure
* @member ecies_nistp256 Specific details regarding ECC contained in an EccPoint structure
* @member other_key Out of scope
*/
type union PublicKeyContainer {
EccPoint eccPoint,
octetstring other_key
} // End of type PublicKeyContainer
/**
* @desc Information regarding AES CCM encryption
* @member supported_symm_alg The symmetric key algorithm
* @member eccPoint The EccPoint used in the PublicKey
*/
type record AesCcm {
SymmetricAlgorithm supported_symm_alg,
EccPoint eccPoint
} // End of type AesCcmsc
/**
* @desc Defines public key based on elliptic curve cryptography
* @member type_ The ECC key types
* @member x The x coordinate
* @member y The y coordinate
* @remark In case of e_x_coordinate_only, e_compressed_lsb_y_0 and e_compressed_lsb_y_1, the field y shall not be present
* @see Draft ETSI TS 103 097 V1.1.14 Clause 4.2.5 EccPoint
* @see Draft ETSI TS 103 097 V1.1.14 Table 2: Derivation of field sizes depending on the used algorithm
*/
type record EccPoint {
EccPointType type_,
octetstring x,
EccPointContainer y optional
} // End of type EccPoint
/**
* @desc Defines a public key based on elliptic curve cryptography
* @member y The y coordinate
* @member data Out of scope
*/
type union EccPointContainer {
octetstring y,
octetstring data
} // End of type EccPointContainer
/**
* @desc List of supported ECC key types
* @see Draft ETSI TS 103 097 V1.1.14 Clause 4.2.6 EccPointType
*/
type enumerated EccPointType {
e_x_coordinate_only (0),
e_compressed_lsb_y_0 (2),
e_compressed_lsb_y_1 (3),
} with { variant "8 bit" }
/**
* @desc Parameters and additional data required for encryption and decryption of data using different symmetric encryption algorithms
* @member symm_algorithm The symmetric algorithm that shall be used with a public key for encryption
* @member public_key The public key for encryption
* @see Draft ETSI TS 103 097 V1.1.14 Clause 4.2.7 EncryptionParameters
*/
type record EncryptionParameters {
SymmetricAlgorithm symm_algorithm,
EncryptionParametersContainer public_key
} // End of type EncryptionParameters
/**
* @desc
* @member nonce Data encryption with the Advanced Encryption Standard (AES) using a 128-bit key in Counter with cipher block chaining message authentication code (CCM) mode
* @member params Out of scope
*/
type union EncryptionParametersContainer {
octetstring params
} // End of type EncryptionParametersContainer
/**
* @desc Signatures based on public key cryptography
* @member algorithm Algorithm type
* @member signature_ The signature
* @see Draft ETSI TS 103 097 V1.1.14 Clause 4.2.8 Signature
*/
type record Signature {
PublicKeyAlgorithm algorithm,
SignatureContainer signature_
} // End of type Signature
/**
* @desc
* @member algorithm The ECDSA based signature
* @member signature_ Out of scope
*/
type union SignatureContainer {
EcdsaSignature ecdsa_signature,
octetstring signature_
} // End of type SignatureContainer
/**
* @desc Description an ECDSA based signature
* @member r Coordinate of the elliptic curve point resulting from multiplying the generator element by the ephemeral private key
* @see Draft ETSI TS 103 097 V1.1.14 Clause 4.2.9 EcdsaSignature
*/
type record EcdsaSignature {
EccPoint r,
octetstring s
} // End of type EcdsaSignature
/**
* @desc Information about the signer of a message
* @member type_ Signature algorithm type
* @member signerInfo Signature algorithm information. In case of self-signed, this field is not required because of no additional data shall be given
* @remark In case of e_self, the field signerInfo shall not be present
* @see Draft ETSI TS 103 097 V1.1.14 Clause 4.2.10 SignerInfo
*/
type record SignerInfo {
SignerInfoType type_,
SignerInfoContainer signerInfo optional
} // End of type SignerInfo
/**
* @desc
* @member digest The digest value
* @member certificate A certificate
* @member certificates A complete certificate chain
* @member certificateWithAlgo A certificate with a specific algorithm
* @member info To be used in all other cases
*/
type union SignerInfoContainer {
HashedId8 digest,
Certificate certificate,
CertificateChain certificates,
CertificateWithAlgo certificateWithAlgo,
octetstring info
} // End of type SignerInfoContainer
/**
* @desc
* @member algorithm The public key algorithm
* @member digest The digest value
*/
type record CertificateWithAlgo {
Loading
Loading full blame...