Loading ttcn/Pki/LibItsPki_EncdecDeclarations.ttcn +34 −0 Original line number Diff line number Diff line module LibItsPki_EncdecDeclarations { // LibIts import from IEEE1609dot2BaseTypes language "ASN.1:1997" all; import from EtsiTs102941BaseTypes language "ASN.1:1997" all; import from EtsiTs102941TypesEnrolment language "ASN.1:1997" all; import from EtsiTs102941TypesAuthorization language "ASN.1:1997" all; Loading Loading @@ -90,4 +91,37 @@ module LibItsPki_EncdecDeclarations { external function fx_dec_AuthorizationValidationRequest(inout bitstring b, out EtsiTs102941TypesAuthorizationValidation.AuthorizationValidationRequest p) return integer with {extension "prototype(sliding) decode(PER)"} /** * @desc Encoding function for EtsiTs102941BaseTypes PublicKeys * @param p The certificate to encode * @return The encode message in OER format */ external function fx_enc_PublicKeys(in EtsiTs102941BaseTypes.PublicKeys p) return bitstring with {extension "prototype(convert) encode(PER)"} external function fx_dec_PublicKeys(inout bitstring b, out EtsiTs102941BaseTypes.PublicKeys p) return integer with {extension "prototype(sliding) decode(PER)"} /** * @desc Encoding function for IEEE1609dot2BaseTypes PublicVerificationKey * @param p The certificate to encode * @return The encode message in OER format */ external function fx_enc_PublicVerificationKey(in IEEE1609dot2BaseTypes.PublicVerificationKey p) return bitstring with {extension "prototype(convert) encode(PER)"} external function fx_dec_PublicVerificationKey(inout bitstring b, out IEEE1609dot2BaseTypes.PublicVerificationKey p) return integer with {extension "prototype(sliding) decode(PER)"} /** * @desc Encoding function for IEEE1609dot2BaseTypes PublicEncryptionKey * @param p The certificate to encode * @return The encode message in OER format */ external function fx_enc_PublicEncryptionKey(in IEEE1609dot2BaseTypes.PublicEncryptionKey p) return bitstring with {extension "prototype(convert) encode(PER)"} external function fx_dec_PublicEncryptionKey(inout bitstring b, out IEEE1609dot2BaseTypes.PublicEncryptionKey p) return integer with {extension "prototype(sliding) decode(PER)"} } // End of module LibItsPki_EncdecDeclarations ttcn/Pki/LibItsPki_Functions.ttcn +123 −63 File changed.Preview size limit exceeded, changes collapsed. Show changes ttcn/Pki/LibItsPki_Pixits.ttcn +9 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,15 @@ module LibItsPki_Pixits { /** * @desc Indicate which encryption algorithem to be used */ modulepar SecurityAlg PX_EC_ALG := e_nist_p256; modulepar SecurityAlg PX_EC_ALG_FOR_EC := e_nist_p256; // TODO Use RCA to determine encryption algorithm? /** * @desc Indicate which encryption algorithem to be used */ modulepar SecurityAlg PX_EC_ALG_FOR_AT := e_nist_p256; /** * @desc Indicate which encryption algorithem to be used */ modulepar SecurityAlg PX_EC_ALG_FOR_ATV := e_nist_p256; /** * @desc Indicate which verification algorithem to be used Loading ttcn/Security/LibItsSecurity_Functions.ttcn +3 −0 Original line number Diff line number Diff line Loading @@ -624,6 +624,8 @@ module LibItsSecurity_Functions { out Oct32 p_publicKeyCompressed, out integer p_compressed_mode ) return boolean { log(">>> f_generate_key_pair_nistp256"); if (PICS_SEC_FIXED_KEYS) { // Debug mode: Use fixed values p_privateKey := '43481BC44C073C1432DB6EC4F0EF57062BEA08E4C19F811567325AD1FD1C6577'O; p_publicKeyX := '0B5D74B033531C51D17B4F218DD4E39289AE4BF2EE3D7BAB7C07DAF0C14F0317'O; Loading Loading @@ -653,6 +655,7 @@ module LibItsSecurity_Functions { out Oct32 p_publicKeyCompressed, out integer p_compressed_mode ) return boolean { log(">>> f_generate_key_pair_brainpoolp256"); return fx_generateKeyPair_brainpoolp256(p_privateKey, p_publicKeyX, p_publicKeyY, p_publicKeyCompressed, p_compressed_mode); } Loading ttcn/Security/LibItsSecurity_Templates.ttcn +11 −0 Original line number Diff line number Diff line Loading @@ -1804,6 +1804,17 @@ module LibItsSecurity_Templates { seconds := p_duration } // End of template m_duration_in_seconds /** * @desc Send template for Duration (in hours) * @param p_duration The duration value * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.18 Duration */ template (value) Duration m_duration_in_hours( in template (value) Int16 p_duration ) := { hours := p_duration } // End of template m_duration_in_hours /** * @desc Receive template for Duration (in seconds) * @param p_duration The duration value Loading Loading
ttcn/Pki/LibItsPki_EncdecDeclarations.ttcn +34 −0 Original line number Diff line number Diff line module LibItsPki_EncdecDeclarations { // LibIts import from IEEE1609dot2BaseTypes language "ASN.1:1997" all; import from EtsiTs102941BaseTypes language "ASN.1:1997" all; import from EtsiTs102941TypesEnrolment language "ASN.1:1997" all; import from EtsiTs102941TypesAuthorization language "ASN.1:1997" all; Loading Loading @@ -90,4 +91,37 @@ module LibItsPki_EncdecDeclarations { external function fx_dec_AuthorizationValidationRequest(inout bitstring b, out EtsiTs102941TypesAuthorizationValidation.AuthorizationValidationRequest p) return integer with {extension "prototype(sliding) decode(PER)"} /** * @desc Encoding function for EtsiTs102941BaseTypes PublicKeys * @param p The certificate to encode * @return The encode message in OER format */ external function fx_enc_PublicKeys(in EtsiTs102941BaseTypes.PublicKeys p) return bitstring with {extension "prototype(convert) encode(PER)"} external function fx_dec_PublicKeys(inout bitstring b, out EtsiTs102941BaseTypes.PublicKeys p) return integer with {extension "prototype(sliding) decode(PER)"} /** * @desc Encoding function for IEEE1609dot2BaseTypes PublicVerificationKey * @param p The certificate to encode * @return The encode message in OER format */ external function fx_enc_PublicVerificationKey(in IEEE1609dot2BaseTypes.PublicVerificationKey p) return bitstring with {extension "prototype(convert) encode(PER)"} external function fx_dec_PublicVerificationKey(inout bitstring b, out IEEE1609dot2BaseTypes.PublicVerificationKey p) return integer with {extension "prototype(sliding) decode(PER)"} /** * @desc Encoding function for IEEE1609dot2BaseTypes PublicEncryptionKey * @param p The certificate to encode * @return The encode message in OER format */ external function fx_enc_PublicEncryptionKey(in IEEE1609dot2BaseTypes.PublicEncryptionKey p) return bitstring with {extension "prototype(convert) encode(PER)"} external function fx_dec_PublicEncryptionKey(inout bitstring b, out IEEE1609dot2BaseTypes.PublicEncryptionKey p) return integer with {extension "prototype(sliding) decode(PER)"} } // End of module LibItsPki_EncdecDeclarations
ttcn/Pki/LibItsPki_Functions.ttcn +123 −63 File changed.Preview size limit exceeded, changes collapsed. Show changes
ttcn/Pki/LibItsPki_Pixits.ttcn +9 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,15 @@ module LibItsPki_Pixits { /** * @desc Indicate which encryption algorithem to be used */ modulepar SecurityAlg PX_EC_ALG := e_nist_p256; modulepar SecurityAlg PX_EC_ALG_FOR_EC := e_nist_p256; // TODO Use RCA to determine encryption algorithm? /** * @desc Indicate which encryption algorithem to be used */ modulepar SecurityAlg PX_EC_ALG_FOR_AT := e_nist_p256; /** * @desc Indicate which encryption algorithem to be used */ modulepar SecurityAlg PX_EC_ALG_FOR_ATV := e_nist_p256; /** * @desc Indicate which verification algorithem to be used Loading
ttcn/Security/LibItsSecurity_Functions.ttcn +3 −0 Original line number Diff line number Diff line Loading @@ -624,6 +624,8 @@ module LibItsSecurity_Functions { out Oct32 p_publicKeyCompressed, out integer p_compressed_mode ) return boolean { log(">>> f_generate_key_pair_nistp256"); if (PICS_SEC_FIXED_KEYS) { // Debug mode: Use fixed values p_privateKey := '43481BC44C073C1432DB6EC4F0EF57062BEA08E4C19F811567325AD1FD1C6577'O; p_publicKeyX := '0B5D74B033531C51D17B4F218DD4E39289AE4BF2EE3D7BAB7C07DAF0C14F0317'O; Loading Loading @@ -653,6 +655,7 @@ module LibItsSecurity_Functions { out Oct32 p_publicKeyCompressed, out integer p_compressed_mode ) return boolean { log(">>> f_generate_key_pair_brainpoolp256"); return fx_generateKeyPair_brainpoolp256(p_privateKey, p_publicKeyX, p_publicKeyY, p_publicKeyCompressed, p_compressed_mode); } Loading
ttcn/Security/LibItsSecurity_Templates.ttcn +11 −0 Original line number Diff line number Diff line Loading @@ -1804,6 +1804,17 @@ module LibItsSecurity_Templates { seconds := p_duration } // End of template m_duration_in_seconds /** * @desc Send template for Duration (in hours) * @param p_duration The duration value * @see Draft ETSI TS 103 097 V1.3.1 Clause 4.2.18 Duration */ template (value) Duration m_duration_in_hours( in template (value) Int16 p_duration ) := { hours := p_duration } // End of template m_duration_in_hours /** * @desc Receive template for Duration (in seconds) * @param p_duration The duration value Loading