Loading ttcn/Security/LibItsSecurity_Functions.ttcn3 +4 −4 Original line number Diff line number Diff line Loading @@ -156,7 +156,7 @@ module LibItsSecurity_Functions { * @param p_toBeHashedData Data to be used to calculate the hash value * @return The hash value */ external function fx_hashWithSha256(in octetstring p_toBeHashedData) return Oct32; external function fx_hashWithSha256(in octetstring p_toBeHashedData) return octetstring; /** * @desc Produces a Elliptic Curve Digital Signature Algorithm (ECDSA) signaturee Loading @@ -164,7 +164,7 @@ module LibItsSecurity_Functions { * @param p_privateKey The private key * @return The signature value */ external function fx_signWithEcdsaNistp256WithSha256(in octetstring p_toBeSignedData, in UInt64 p_privateKey) return octetstring; external function fx_signWithEcdsaNistp256WithSha256(in octetstring p_toBeSignedData, in octetstring/*UInt64*/ p_privateKey) return octetstring; /** * @desc Verify the signature of the specified data Loading @@ -174,7 +174,7 @@ module LibItsSecurity_Functions { * @param p_ecdsaNistp256PublicKeyY The public key (y coordinate) * @return true on success, false otherwise */ external function fx_verifyWithEcdsaNistp256WithSha256(in octetstring p_toBeVerifiedData, in octetstring p_signature, in Oct32 p_ecdsaNistp256PublicKeyX, in Oct32 p_ecdsaNistp256PublicKeyY) return boolean; external function fx_verifyWithEcdsaNistp256WithSha256(in octetstring p_toBeVerifiedData, in octetstring p_signature, in octetstring p_ecdsaNistp256PublicKeyX, in octetstring p_ecdsaNistp256PublicKeyY) return boolean; /** * @desc Produce a new public/private key pair based on Elliptic Curve Digital Signature Algorithm (ECDSA) algorithm Loading @@ -183,7 +183,7 @@ module LibItsSecurity_Functions { * @param p_publicKeyX The new public key value (y coordinate) * @return true on success, false otherwise */ external function fx_generateKeyPair(out UInt64 p_privateKey, out UInt64 p_publicKeyX, out UInt64 p_publicKeyY) return boolean; external function fx_generateKeyPair(out octetstring/*UInt64*/ p_privateKey, out octetstring p_publicKeyX, out octetstring p_publicKeyY) return boolean; } // End of group externalFunctions Loading ttcn/Security/LibItsSecurity_Pixits.ttcn3 +9 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,10 @@ module LibItsSecurity_Pixits { // LibCommon import from LibCommon_DataStrings { type Oct0to12 } // LibItsSecurity import from LibItsSecurity_TypesAndValues { Loading Loading @@ -44,4 +48,9 @@ module LibItsSecurity_Pixits { */ modulepar HashedId8 PX_ECDSA_DIGEST := '0102030405060708'O; /** * @desc */ modulepar Oct0to12 PX_AESCCM_NONCE := '010203040506070808080808'O; } // End of module LibItsSecurity_Pixits No newline at end of file ttcn/Security/LibItsSecurity_Templates.ttcn3 +263 −74 Original line number Diff line number Diff line Loading @@ -10,7 +10,12 @@ module LibItsSecurity_Templates { // LibCommon import from LibCommon_BasicTypesAndValues { type UInt8 UInt8, Int32 } import from LibCommon_DataStrings { type Oct2 } // LibItsSecurity Loading Loading @@ -114,6 +119,17 @@ module LibItsSecurity_Templates { } // End of field y } // End of template m_aesccm_dummy /** * @desc Generic send template for AES CCM encryption parameters * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.7 EncryptionParameters */ template (value) EncryptionParameters m_encryptionParameters_dummy := { symm_algorithm := e_aes_128_ccm, public_key := { nonce := PX_AESCCM_NONCE } } // End of template m_encryptionParameters_dummy } // End of group algorithms /** Loading @@ -123,13 +139,16 @@ module LibItsSecurity_Templates { */ group signatures { template (value) Signature m_signature_ecdsa := { template (value) Signature m_signature( in template (value) EcdsaSignature p_ecdsaSignature ):= { algorithm := e_ecdsa_nistp256_with_sha256, signature_ := { ecdsa_signature := m_ecdsaSignature ecdsa_signature := p_ecdsaSignature } // End of field signature_ } // End of template m_signature_ecdsa template (value) EcdsaSignature m_ecdsaSignature := { algorithm := e_ecdsa_nistp256_with_sha256, field_size := f_int2UInt8(1 + lengthof(PX_ECDSA_S)), Loading @@ -139,6 +158,48 @@ module LibItsSecurity_Templates { } // End of group signatures group signerInfos { /** * @desc Send template for self signed message */ template (value) SignerInfo m_SignerInfo_self := { type_ := e_self, signerInfo := omit } // End of template m_SignerInfo_self /** * @desc Send template for self signed message */ template (value) SignerInfo m_SignerInfo_digest( in template (value) HashedId8 p_digest ) := { type_ := e_certificate_digest_with_ecdsap256, signerInfo := { digest := p_digest } // End of field signerInfo } // End of template m_SignerInfo_digest template (value) SignerInfo m_signerInfo_certificate( in template (value) Certificate p_certificate ) := { type_ := e_certificate, signerInfo := { certificate := p_certificate } // End of field signerInfo } // End of template m_signerInfo_certificate template (value) SignerInfo m_signerInfo_certificates( in template (value) CertificateChain p_certificates ) := { type_ := e_certificate_chain, signerInfo := { certificates := p_certificates } // End of field signerInfo } // End of template m_signerInfo_certificates } // End of group signerInfos /** * @desc Dummy send template for PublicKey/EccPoint * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.4 PublicKey Loading @@ -164,6 +225,51 @@ module LibItsSecurity_Templates { } // End of field public_key } // End of template m_publicKey_aesccm_dummy /** * @desc Send template for Time64WithStandardDeviation * @param p_time TODO * @param p_log_std_dev TODO * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.17 Time64WithStandardDeviation */ template (value) Time64WithStandardDeviation m_time64WithStandardDeviation( in template (value) Time64 p_time, in template (value) UInt8 p_log_std_dev ) := { time := p_time, log_std_dev := p_log_std_dev } // End of template m_time64WithStandardDeviation /** * @desc Send template for TwoDLocation * @param p_latitude Latitude range from 900 000 000 to +900 000 000 * @param p_longitude Longitude range from 1 800 000 000 to +1 800 000 000 * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.19 TwoDLocation */ template (value) TwoDLocation m_twoDLocation( in template (value) Int32 p_latitude, in template (value) Int32 p_longitude ) := { latitude := p_latitude, longitude := p_longitude } // End of template m_twoDLocation /** * @desc Send template for ThreeDLocation * @param p_latitude Latitude range from 900 000 000 to +900 000 000 * @param p_longitude Longitude range from 1 800 000 000 to +1 800 000 000 * @param p_elevation Elevation relative to the WGS-84 ellipsoid in decimetres * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.20 ThreeDLocation */ template (value) ThreeDLocation m_threeDLocation( in template (value) Int32 p_latitude, in template (value) Int32 p_longitude, in template (value) Oct2 p_elevation ) := { latitude := p_latitude, longitude := p_longitude, elevation := p_elevation } // End of template m_threeDLocation } // End of group dummyBasicFormatElementsSend /** Loading Loading @@ -194,6 +300,82 @@ module LibItsSecurity_Templates { } // End of field public_key } // End of template m_publicKey_aesccm_dummy /** * @desc Dummy receive template for Time64WithStandardDeviation * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.17 Time64WithStandardDeviation */ template (present) Time64WithStandardDeviation mw_time64WithStandardDeviation_dummy := { time := ?, log_std_dev := ? } // End of template mw_time64WithStandardDeviation_dummy /** * @desc Receive template for Time64WithStandardDeviation * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.17 Time64WithStandardDeviation */ template (present) Time64WithStandardDeviation mw_time64WithStandardDeviation( in template (present) Time64 p_time, in template (present) UInt8 p_log_std_dev ) := { time := p_time, log_std_dev := p_log_std_dev } // End of template mw_time64WithStandardDeviation /** * @desc Dummy receive template for TwoDLocation * @param p_latitude Latitude range from 900 000 000 to +900 000 000 * @param p_longitude Longitude range from 1 800 000 000 to +1 800 000 000 * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.19 TwoDLocation */ template (present) TwoDLocation mw_twoDLocation_dummy := { latitude := ?, longitude := ? } // End of template mw_twoDLocation_dummy /** * @desc Dummy receive template for TwoDLocation * @param p_latitude Latitude range from 900 000 000 to +900 000 000 * @param p_longitude Longitude range from 1 800 000 000 to +1 800 000 000 * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.19 TwoDLocation */ template (present) TwoDLocation mw_twoDLocation( in template (present) Int32 p_latitude, in template (present) Int32 p_longitude ) := { latitude := p_latitude, longitude := p_longitude } // End of template mw_twoDLocation /** * @desc Dummy send template for ThreeDLocation * @param p_latitude Latitude range from 900 000 000 to +900 000 000 * @param p_longitude Longitude range from 1 800 000 000 to +1 800 000 000 * @param p_elevation Elevation relative to the WGS-84 ellipsoid in decimetres * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.20 ThreeDLocation */ template (present) ThreeDLocation mdw_threeDLocation_dummy := { latitude := ?, longitude := ?, elevation := ? } // End of template mdw_threeDLocation_dummy /** * @desc Receive template for ThreeDLocation * @param p_latitude Latitude range from 900 000 000 to +900 000 000 * @param p_longitude Longitude range from 1 800 000 000 to +1 800 000 000 * @param p_elevation Elevation relative to the WGS-84 ellipsoid in decimetres * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.20 ThreeDLocation */ template (present) ThreeDLocation mw_threeDLocation( in template (present) Int32 p_latitude, in template (present) Int32 p_longitude, in template (present) Oct2 p_elevation ) := { latitude := p_latitude, longitude := p_longitude, elevation := p_elevation } // End of template mw_threeDLocation } // End of group dummyBasicFormatElementsRecv } // End of group dummyBasicFormatElements Loading Loading @@ -222,15 +404,45 @@ module LibItsSecurity_Templates { trailer_fields := { } } // End of template m_secureMessageCAMs_dummy /** * @desc Generic send template for Security profile for DENMs * @see Draft ETSI TS 103 097 V1.1.6 Clause 7.2 Security profile for DENMs */ template (value) SecuredMessage m_secureMessageDENMs_dummy := { protocol_version := c_protocol_version, security_profile := c_security_profileDENMs, header_fields := { m_header_field_signerInfo_dummy }, payload_fields := { }, trailer_fields := { } } // End of template m_secureMessageDENMs_dummy /** * @desc Generic send template for Security profile for other messages * @see Draft ETSI TS 103 097 V1.1.6 Clause 7.3 Generic security profile for other signed messages */ template (value) SecuredMessage m_secureMessageOthers_dummy := { protocol_version := c_protocol_version, security_profile := c_security_profileOthers, header_fields := { m_header_field_signerInfo_dummy }, payload_fields := { }, trailer_fields := { } } // End of template m_secureMessageCAMs_dummy group headerFields { template (value) HeaderField m_header_field_signerInfo_dummy := { type_ := e_signer_info, headerField := m_header_field_container_dummy } // End of template m_header_field_signerInfo_dummy template (value) HeaderFieldContainer m_header_field_container_dummy := { other_header := ''O signer := m_SignerInfo_self } // End of template m_header_field_container_dummy } // End of group headerFields group payloads { template (value) Payload m_payload_signed_dummy := { type_ := e_signed, data := m_data_payload_dummy Loading @@ -245,6 +457,10 @@ module LibItsSecurity_Templates { rawPayload := ''O } // End of template m_data_payload_dummy } // End of group payloads group trailerFields { template (value) TrailerField m_trailer_field_dummy := { type_ := e_signature, trailerField := m_trailer_field_container_dummy Loading @@ -254,6 +470,8 @@ module LibItsSecurity_Templates { security_field := ''O } // End of template m_trailer_field_container_dummy } // End of group trailerFields } // End of group dummyMessagesSend /** Loading Loading @@ -312,16 +530,16 @@ module LibItsSecurity_Templates { template (value) Certificate m_certificate_dummy := { version := c_certificate_version, signer_info := { m_signerInfo_ecdsa256( m_signerInfoContainer_digest( m_SignerInfo_digest( PX_ECDSA_DIGEST ) ) }, }, // End of field signer_info subject_info := m_subject_info_dummy, subject_attributes := { m_subject_attribute_dummy }, validity_restrictions := { m_validity_restriction_dummy }, signature_ := m_signature_ecdsa signature_ := m_signature( m_ecdsaSignature ) // End of field signature_ } // End of template m_certificate_dummy template (value) SubjectInfo m_subject_info_dummy := { Loading Loading @@ -394,42 +612,13 @@ module LibItsSecurity_Templates { trailer_fields := p_trailer_fields } // End of template md_secureMessageCAMs template (value) HeaderField m_header_field_signerInfo_ecdsa256( in template (value) SignerInfoContainer p_signerInfo template (value) HeaderField m_header_field_signerInfo_ecdsa( in template (value) SignerInfo p_signerInfo ) modifies m_header_field_signerInfo_dummy := { headerField := m_header_field_container_ecdsa256(p_signerInfo) } // End of template m_header_field_signerInfo_ecdsa256 template (value) HeaderFieldContainer m_header_field_container_ecdsa256( in template (value) SignerInfoContainer p_signerInfo ) := { signer := m_signerInfo_ecdsa256(p_signerInfo) } // End of template m_header_field_container_ecdsa256 template (value) SignerInfo m_signerInfo_ecdsa256( in template (value) SignerInfoContainer p_signerInfo ) := { type_ := e_certificate_digest_with_ecdsap256, signerInfo := p_signerInfo } // End of template m_signerInfo_ecdsa256 template (value) SignerInfoContainer m_signerInfoContainer_certificate( in template (value) Certificate p_certificate ) := { certificate := p_certificate } // End of template m_signerInfoContainer_certificate template (value) SignerInfoContainer m_signerInfoContainer_certificates( in template (value) CertificateChain p_certificates ) := { certificates := p_certificates } // End of template m_signerInfoContainer_certificates template (value) SignerInfoContainer m_signerInfoContainer_digest( in template (value) HashedId8 p_digest ) := { digest := p_digest } // End of template m_signerInfoContainer_digest headerField := { signer := p_signerInfo } } // End of template m_header_field_signerInfo_ecdsa } // End of group securityProfilesCAMsSend Loading ttcn/Security/LibItsSecurity_TypesAndValues.ttcn3 +5 −0 Original line number Diff line number Diff line Loading @@ -431,6 +431,10 @@ module LibItsSecurity_TypesAndValues { type set of HeaderField HeaderFields; /** * @desc Information of interest to the security layer * @see Draft ETSI TS 103 097 V1.1.6 Clause 5.4 HeaderField */ type record HeaderField { HeaderFieldType type_, HeaderFieldContainer headerField Loading @@ -438,6 +442,7 @@ module LibItsSecurity_TypesAndValues { /** * @desc Supported types of header fields * @see Draft ETSI TS 103 097 V1.1.6 Clause 5.5 HeaderFieldType */ type enumerated HeaderFieldType { e_generation_time (0), Loading Loading
ttcn/Security/LibItsSecurity_Functions.ttcn3 +4 −4 Original line number Diff line number Diff line Loading @@ -156,7 +156,7 @@ module LibItsSecurity_Functions { * @param p_toBeHashedData Data to be used to calculate the hash value * @return The hash value */ external function fx_hashWithSha256(in octetstring p_toBeHashedData) return Oct32; external function fx_hashWithSha256(in octetstring p_toBeHashedData) return octetstring; /** * @desc Produces a Elliptic Curve Digital Signature Algorithm (ECDSA) signaturee Loading @@ -164,7 +164,7 @@ module LibItsSecurity_Functions { * @param p_privateKey The private key * @return The signature value */ external function fx_signWithEcdsaNistp256WithSha256(in octetstring p_toBeSignedData, in UInt64 p_privateKey) return octetstring; external function fx_signWithEcdsaNistp256WithSha256(in octetstring p_toBeSignedData, in octetstring/*UInt64*/ p_privateKey) return octetstring; /** * @desc Verify the signature of the specified data Loading @@ -174,7 +174,7 @@ module LibItsSecurity_Functions { * @param p_ecdsaNistp256PublicKeyY The public key (y coordinate) * @return true on success, false otherwise */ external function fx_verifyWithEcdsaNistp256WithSha256(in octetstring p_toBeVerifiedData, in octetstring p_signature, in Oct32 p_ecdsaNistp256PublicKeyX, in Oct32 p_ecdsaNistp256PublicKeyY) return boolean; external function fx_verifyWithEcdsaNistp256WithSha256(in octetstring p_toBeVerifiedData, in octetstring p_signature, in octetstring p_ecdsaNistp256PublicKeyX, in octetstring p_ecdsaNistp256PublicKeyY) return boolean; /** * @desc Produce a new public/private key pair based on Elliptic Curve Digital Signature Algorithm (ECDSA) algorithm Loading @@ -183,7 +183,7 @@ module LibItsSecurity_Functions { * @param p_publicKeyX The new public key value (y coordinate) * @return true on success, false otherwise */ external function fx_generateKeyPair(out UInt64 p_privateKey, out UInt64 p_publicKeyX, out UInt64 p_publicKeyY) return boolean; external function fx_generateKeyPair(out octetstring/*UInt64*/ p_privateKey, out octetstring p_publicKeyX, out octetstring p_publicKeyY) return boolean; } // End of group externalFunctions Loading
ttcn/Security/LibItsSecurity_Pixits.ttcn3 +9 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,10 @@ module LibItsSecurity_Pixits { // LibCommon import from LibCommon_DataStrings { type Oct0to12 } // LibItsSecurity import from LibItsSecurity_TypesAndValues { Loading Loading @@ -44,4 +48,9 @@ module LibItsSecurity_Pixits { */ modulepar HashedId8 PX_ECDSA_DIGEST := '0102030405060708'O; /** * @desc */ modulepar Oct0to12 PX_AESCCM_NONCE := '010203040506070808080808'O; } // End of module LibItsSecurity_Pixits No newline at end of file
ttcn/Security/LibItsSecurity_Templates.ttcn3 +263 −74 Original line number Diff line number Diff line Loading @@ -10,7 +10,12 @@ module LibItsSecurity_Templates { // LibCommon import from LibCommon_BasicTypesAndValues { type UInt8 UInt8, Int32 } import from LibCommon_DataStrings { type Oct2 } // LibItsSecurity Loading Loading @@ -114,6 +119,17 @@ module LibItsSecurity_Templates { } // End of field y } // End of template m_aesccm_dummy /** * @desc Generic send template for AES CCM encryption parameters * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.7 EncryptionParameters */ template (value) EncryptionParameters m_encryptionParameters_dummy := { symm_algorithm := e_aes_128_ccm, public_key := { nonce := PX_AESCCM_NONCE } } // End of template m_encryptionParameters_dummy } // End of group algorithms /** Loading @@ -123,13 +139,16 @@ module LibItsSecurity_Templates { */ group signatures { template (value) Signature m_signature_ecdsa := { template (value) Signature m_signature( in template (value) EcdsaSignature p_ecdsaSignature ):= { algorithm := e_ecdsa_nistp256_with_sha256, signature_ := { ecdsa_signature := m_ecdsaSignature ecdsa_signature := p_ecdsaSignature } // End of field signature_ } // End of template m_signature_ecdsa template (value) EcdsaSignature m_ecdsaSignature := { algorithm := e_ecdsa_nistp256_with_sha256, field_size := f_int2UInt8(1 + lengthof(PX_ECDSA_S)), Loading @@ -139,6 +158,48 @@ module LibItsSecurity_Templates { } // End of group signatures group signerInfos { /** * @desc Send template for self signed message */ template (value) SignerInfo m_SignerInfo_self := { type_ := e_self, signerInfo := omit } // End of template m_SignerInfo_self /** * @desc Send template for self signed message */ template (value) SignerInfo m_SignerInfo_digest( in template (value) HashedId8 p_digest ) := { type_ := e_certificate_digest_with_ecdsap256, signerInfo := { digest := p_digest } // End of field signerInfo } // End of template m_SignerInfo_digest template (value) SignerInfo m_signerInfo_certificate( in template (value) Certificate p_certificate ) := { type_ := e_certificate, signerInfo := { certificate := p_certificate } // End of field signerInfo } // End of template m_signerInfo_certificate template (value) SignerInfo m_signerInfo_certificates( in template (value) CertificateChain p_certificates ) := { type_ := e_certificate_chain, signerInfo := { certificates := p_certificates } // End of field signerInfo } // End of template m_signerInfo_certificates } // End of group signerInfos /** * @desc Dummy send template for PublicKey/EccPoint * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.4 PublicKey Loading @@ -164,6 +225,51 @@ module LibItsSecurity_Templates { } // End of field public_key } // End of template m_publicKey_aesccm_dummy /** * @desc Send template for Time64WithStandardDeviation * @param p_time TODO * @param p_log_std_dev TODO * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.17 Time64WithStandardDeviation */ template (value) Time64WithStandardDeviation m_time64WithStandardDeviation( in template (value) Time64 p_time, in template (value) UInt8 p_log_std_dev ) := { time := p_time, log_std_dev := p_log_std_dev } // End of template m_time64WithStandardDeviation /** * @desc Send template for TwoDLocation * @param p_latitude Latitude range from 900 000 000 to +900 000 000 * @param p_longitude Longitude range from 1 800 000 000 to +1 800 000 000 * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.19 TwoDLocation */ template (value) TwoDLocation m_twoDLocation( in template (value) Int32 p_latitude, in template (value) Int32 p_longitude ) := { latitude := p_latitude, longitude := p_longitude } // End of template m_twoDLocation /** * @desc Send template for ThreeDLocation * @param p_latitude Latitude range from 900 000 000 to +900 000 000 * @param p_longitude Longitude range from 1 800 000 000 to +1 800 000 000 * @param p_elevation Elevation relative to the WGS-84 ellipsoid in decimetres * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.20 ThreeDLocation */ template (value) ThreeDLocation m_threeDLocation( in template (value) Int32 p_latitude, in template (value) Int32 p_longitude, in template (value) Oct2 p_elevation ) := { latitude := p_latitude, longitude := p_longitude, elevation := p_elevation } // End of template m_threeDLocation } // End of group dummyBasicFormatElementsSend /** Loading Loading @@ -194,6 +300,82 @@ module LibItsSecurity_Templates { } // End of field public_key } // End of template m_publicKey_aesccm_dummy /** * @desc Dummy receive template for Time64WithStandardDeviation * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.17 Time64WithStandardDeviation */ template (present) Time64WithStandardDeviation mw_time64WithStandardDeviation_dummy := { time := ?, log_std_dev := ? } // End of template mw_time64WithStandardDeviation_dummy /** * @desc Receive template for Time64WithStandardDeviation * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.17 Time64WithStandardDeviation */ template (present) Time64WithStandardDeviation mw_time64WithStandardDeviation( in template (present) Time64 p_time, in template (present) UInt8 p_log_std_dev ) := { time := p_time, log_std_dev := p_log_std_dev } // End of template mw_time64WithStandardDeviation /** * @desc Dummy receive template for TwoDLocation * @param p_latitude Latitude range from 900 000 000 to +900 000 000 * @param p_longitude Longitude range from 1 800 000 000 to +1 800 000 000 * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.19 TwoDLocation */ template (present) TwoDLocation mw_twoDLocation_dummy := { latitude := ?, longitude := ? } // End of template mw_twoDLocation_dummy /** * @desc Dummy receive template for TwoDLocation * @param p_latitude Latitude range from 900 000 000 to +900 000 000 * @param p_longitude Longitude range from 1 800 000 000 to +1 800 000 000 * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.19 TwoDLocation */ template (present) TwoDLocation mw_twoDLocation( in template (present) Int32 p_latitude, in template (present) Int32 p_longitude ) := { latitude := p_latitude, longitude := p_longitude } // End of template mw_twoDLocation /** * @desc Dummy send template for ThreeDLocation * @param p_latitude Latitude range from 900 000 000 to +900 000 000 * @param p_longitude Longitude range from 1 800 000 000 to +1 800 000 000 * @param p_elevation Elevation relative to the WGS-84 ellipsoid in decimetres * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.20 ThreeDLocation */ template (present) ThreeDLocation mdw_threeDLocation_dummy := { latitude := ?, longitude := ?, elevation := ? } // End of template mdw_threeDLocation_dummy /** * @desc Receive template for ThreeDLocation * @param p_latitude Latitude range from 900 000 000 to +900 000 000 * @param p_longitude Longitude range from 1 800 000 000 to +1 800 000 000 * @param p_elevation Elevation relative to the WGS-84 ellipsoid in decimetres * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.20 ThreeDLocation */ template (present) ThreeDLocation mw_threeDLocation( in template (present) Int32 p_latitude, in template (present) Int32 p_longitude, in template (present) Oct2 p_elevation ) := { latitude := p_latitude, longitude := p_longitude, elevation := p_elevation } // End of template mw_threeDLocation } // End of group dummyBasicFormatElementsRecv } // End of group dummyBasicFormatElements Loading Loading @@ -222,15 +404,45 @@ module LibItsSecurity_Templates { trailer_fields := { } } // End of template m_secureMessageCAMs_dummy /** * @desc Generic send template for Security profile for DENMs * @see Draft ETSI TS 103 097 V1.1.6 Clause 7.2 Security profile for DENMs */ template (value) SecuredMessage m_secureMessageDENMs_dummy := { protocol_version := c_protocol_version, security_profile := c_security_profileDENMs, header_fields := { m_header_field_signerInfo_dummy }, payload_fields := { }, trailer_fields := { } } // End of template m_secureMessageDENMs_dummy /** * @desc Generic send template for Security profile for other messages * @see Draft ETSI TS 103 097 V1.1.6 Clause 7.3 Generic security profile for other signed messages */ template (value) SecuredMessage m_secureMessageOthers_dummy := { protocol_version := c_protocol_version, security_profile := c_security_profileOthers, header_fields := { m_header_field_signerInfo_dummy }, payload_fields := { }, trailer_fields := { } } // End of template m_secureMessageCAMs_dummy group headerFields { template (value) HeaderField m_header_field_signerInfo_dummy := { type_ := e_signer_info, headerField := m_header_field_container_dummy } // End of template m_header_field_signerInfo_dummy template (value) HeaderFieldContainer m_header_field_container_dummy := { other_header := ''O signer := m_SignerInfo_self } // End of template m_header_field_container_dummy } // End of group headerFields group payloads { template (value) Payload m_payload_signed_dummy := { type_ := e_signed, data := m_data_payload_dummy Loading @@ -245,6 +457,10 @@ module LibItsSecurity_Templates { rawPayload := ''O } // End of template m_data_payload_dummy } // End of group payloads group trailerFields { template (value) TrailerField m_trailer_field_dummy := { type_ := e_signature, trailerField := m_trailer_field_container_dummy Loading @@ -254,6 +470,8 @@ module LibItsSecurity_Templates { security_field := ''O } // End of template m_trailer_field_container_dummy } // End of group trailerFields } // End of group dummyMessagesSend /** Loading Loading @@ -312,16 +530,16 @@ module LibItsSecurity_Templates { template (value) Certificate m_certificate_dummy := { version := c_certificate_version, signer_info := { m_signerInfo_ecdsa256( m_signerInfoContainer_digest( m_SignerInfo_digest( PX_ECDSA_DIGEST ) ) }, }, // End of field signer_info subject_info := m_subject_info_dummy, subject_attributes := { m_subject_attribute_dummy }, validity_restrictions := { m_validity_restriction_dummy }, signature_ := m_signature_ecdsa signature_ := m_signature( m_ecdsaSignature ) // End of field signature_ } // End of template m_certificate_dummy template (value) SubjectInfo m_subject_info_dummy := { Loading Loading @@ -394,42 +612,13 @@ module LibItsSecurity_Templates { trailer_fields := p_trailer_fields } // End of template md_secureMessageCAMs template (value) HeaderField m_header_field_signerInfo_ecdsa256( in template (value) SignerInfoContainer p_signerInfo template (value) HeaderField m_header_field_signerInfo_ecdsa( in template (value) SignerInfo p_signerInfo ) modifies m_header_field_signerInfo_dummy := { headerField := m_header_field_container_ecdsa256(p_signerInfo) } // End of template m_header_field_signerInfo_ecdsa256 template (value) HeaderFieldContainer m_header_field_container_ecdsa256( in template (value) SignerInfoContainer p_signerInfo ) := { signer := m_signerInfo_ecdsa256(p_signerInfo) } // End of template m_header_field_container_ecdsa256 template (value) SignerInfo m_signerInfo_ecdsa256( in template (value) SignerInfoContainer p_signerInfo ) := { type_ := e_certificate_digest_with_ecdsap256, signerInfo := p_signerInfo } // End of template m_signerInfo_ecdsa256 template (value) SignerInfoContainer m_signerInfoContainer_certificate( in template (value) Certificate p_certificate ) := { certificate := p_certificate } // End of template m_signerInfoContainer_certificate template (value) SignerInfoContainer m_signerInfoContainer_certificates( in template (value) CertificateChain p_certificates ) := { certificates := p_certificates } // End of template m_signerInfoContainer_certificates template (value) SignerInfoContainer m_signerInfoContainer_digest( in template (value) HashedId8 p_digest ) := { digest := p_digest } // End of template m_signerInfoContainer_digest headerField := { signer := p_signerInfo } } // End of template m_header_field_signerInfo_ecdsa } // End of group securityProfilesCAMsSend Loading
ttcn/Security/LibItsSecurity_TypesAndValues.ttcn3 +5 −0 Original line number Diff line number Diff line Loading @@ -431,6 +431,10 @@ module LibItsSecurity_TypesAndValues { type set of HeaderField HeaderFields; /** * @desc Information of interest to the security layer * @see Draft ETSI TS 103 097 V1.1.6 Clause 5.4 HeaderField */ type record HeaderField { HeaderFieldType type_, HeaderFieldContainer headerField Loading @@ -438,6 +442,7 @@ module LibItsSecurity_TypesAndValues { /** * @desc Supported types of header fields * @see Draft ETSI TS 103 097 V1.1.6 Clause 5.5 HeaderFieldType */ type enumerated HeaderFieldType { e_generation_time (0), Loading