Loading ttcn/Security/LibItsSecurity_Functions.ttcn3 +6 −2 Original line number Diff line number Diff line Loading @@ -66,6 +66,10 @@ module LibItsSecurity_Functions { in octetstring p_ecdsaNistp256PublicKeyX, in octetstring p_ecdsaNistp256PublicKeyY ) return boolean { log("p_toBeVerifiedData= ", p_toBeVerifiedData); log("p_signature= ", p_signature); log("p_ecdsaNistp256PublicKeyX= ", p_ecdsaNistp256PublicKeyX); log("p_ecdsaNistp256PublicKeyY= ", p_ecdsaNistp256PublicKeyY); return fx_verifyWithEcdsaNistp256WithSha256( p_toBeVerifiedData, p_signature, Loading Loading @@ -411,6 +415,7 @@ module LibItsSecurity_Functions { var boolean v_result := false; var template (value) ToBeSignedCertificate v_toBeSignedCertificate; log("p_certificateToBeVerified: ", p_certificateToBeVerified); log("full certificate: ", bit2oct(encvalue(p_certificateToBeVerified))); // Create Certificate payload to be verified Loading Loading @@ -454,7 +459,6 @@ module LibItsSecurity_Functions { var integer v_counter; for (v_counter := 0; v_counter < lengthof(p_issuingCertificate.subject_attributes); v_counter := v_counter + 1) { log("f_verifyCertificateSignatureWithIssuingCertificate: processing ", p_issuingCertificate.subject_attributes[v_counter]); if (valueof(p_issuingCertificate.subject_attributes[v_counter].type_) == e_verification_key) { return f_verifyCertificateSignatureWithPublicKey( p_certificateToBeVerified, Loading ttcn/Security/LibItsSecurity_Pixits.ttcn3 +42 −24 Original line number Diff line number Diff line Loading @@ -35,8 +35,8 @@ module LibItsSecurity_Pixits { valueof(m_subject_attribute_verification_key( m_publicKey_eccPoint( m_eccPointecdsa_nistp256_with_sha256_uncompressed( '681bd7f8b4f4483763130b659099a64a6b5d734ea729f966e4436bf8da128c55'O, '9596f82dcf60625bb2ef113cf85f1a7cc4adda09e239a869e2dd6b974d442378'O '99714f76eadcaf3ee8b763d4d57229e906dffcfdb72760bf00793251fce60273'O, '85de158c42e598f56dff1579b827dc2d2e51405e786a9bde41781d8d15fb32e8'O ) ) )), Loading @@ -44,8 +44,8 @@ module LibItsSecurity_Pixits { m_publicKey_aesccm( m_aesccm( m_eccPointecdsa_nistp256_with_sha256_uncompressed( 'b03573a37b86c6cf57518ccf20e1d6a2e7ddaa9cbe2c98953b838a9689fc13f4'O, 'dd2b847c6481a23c558e96caaf69d8bead7b518909acecfdb6e36c1bc824cfbd'O '50ca984cbfe1e576b10cbb0d31729abde878edfe6ba5dc8b919108376a0c410f'O, '49b3a3b052efb76e227933e8c0d5dfde5fa48a4495934e837d782f5dea3b3c93'O ) ) ) Loading Loading @@ -90,9 +90,9 @@ module LibItsSecurity_Pixits { signature_ := valueof(m_signature( m_ecdsaSignature( m_eccPointecdsa_nistp256_with_sha256_x_coordinate_only( 'b668e238a4f243331cc5caa87069b64c35389a23817cc07219556f957648e251'O '9d0f5242df9b9b459d6a5e4a58bfe0ae04d02354e3afefbb8dad31d9b709b75b'O ), 'bc5f2ecf8bba774c3c35b7aab80280e972c1530401ecda8794e387f579a705e8'O '23c3a850cd15835927cb2da694e9d00a865fe80771d9a7f77b50829491666731'O ) )) } // End of config #0 Loading @@ -109,7 +109,7 @@ module LibItsSecurity_Pixits { { type_ := e_certificate_digest_with_ecdsap256, signerInfo := { digest := 'e33752cefbf9a7c6'O digest := 'bfb9a8d1cc65adac'O } // End of field signerInfo } }, Loading @@ -120,8 +120,8 @@ module LibItsSecurity_Pixits { valueof(m_subject_attribute_verification_key( m_publicKey_eccPoint( m_eccPointecdsa_nistp256_with_sha256_uncompressed( 'c1ec9c8107f820f54345f4b996a74f984d0cf0b145e894417fedb973e6b23c83'O, 'b5bf92da1bbb0704067a8350ee478492d4433c81ea522c713d14685d81c70ea6'O 'be85ee62cdf9c0a7ecabedcc2da16705238485f1eedef89522823ad1fa739b67'O, '5f47cbec24a6c9a04db62cce2c62efe9d52a4f369e3761a5c59df78b3aa89880'O ) ) )), Loading @@ -129,8 +129,8 @@ module LibItsSecurity_Pixits { m_publicKey_aesccm( m_aesccm( m_eccPointecdsa_nistp256_with_sha256_uncompressed( '9b550869c67caf205372018b7789a44153fe7ac7685a89b0f4aa2e9dab30ad18'O, '9b550869c67caf205372018b7789a44153fe7ac7685a89b0f4aa2e9dab30ad18'O 'abe1fb5d4883f108b7cd163bacbe0d232589473715cdbbe91da6a7f6296e1c20'O, 'abe1fb5d4883f108b7cd163bacbe0d232589473715cdbbe91da6a7f6296e1c20'O ) ) ) Loading Loading @@ -175,9 +175,9 @@ module LibItsSecurity_Pixits { signature_ := valueof(m_signature( m_ecdsaSignature( m_eccPointecdsa_nistp256_with_sha256_x_coordinate_only( '46aa93c900e529b40b9e38af110f89f625ebae187bf4bdc908382eaa019eabef'O 'd6390d5a4f7bc5c08be6e0dd1cd5127331bb1b7a7a934a1ea3242ca98156cbbe'O ), 'e2ccb867b96b5f1c9151325297937078020955cf36c435102fa4a04e1e68ab4c'O 'b58aa41fae5813d9df7f05d255880e18837d6c97ec39696c885189d68bf71b42'O ) )) } // End of config #0 Loading @@ -194,7 +194,7 @@ module LibItsSecurity_Pixits { { type_ := e_certificate_digest_with_ecdsap256, signerInfo := { digest := 'd7fbfc40b39af7e0'O digest := '329196dea5aadf90'O } // End of field signerInfo } }, Loading @@ -203,8 +203,8 @@ module LibItsSecurity_Pixits { valueof(m_subject_attribute_verification_key( m_publicKey_eccPoint( m_eccPointecdsa_nistp256_with_sha256_uncompressed( 'b9e9c238c335ef8d2fb484e196b0fc36bb90f2aef1f7ce7b28401341ed122f14'O, 'a759ffdfd44d278df2877ac04f079190649e7f495d923c30e549452f33ff5832'O 'fa8ed7cf7251c2d5b323e35ff907d70d6b3bf1c1b36a6fdd90b37a497bfb1e9a'O, '43f3074569b232c0f91e74c410bf3ce014a8012dd8cecafff45355cc9cc85c8d'O ) ) )), Loading @@ -212,8 +212,8 @@ module LibItsSecurity_Pixits { m_publicKey_aesccm( m_aesccm( m_eccPointecdsa_nistp256_with_sha256_uncompressed( '007504649693dcc4f25ff7650a4d90f4151f9939e4f0531e81b57863e7536ac9'O, '00e4b9981e78da2775e50840e78edc810c3296c42ea26528b1080e848b539dd7'O '359ef9f14f8f275fea963ebd097e5137047485f1bd5c7e1dad814fdfc5b0df26'O, '29c9fb7ecf32da70afec008988f95bbdcad0013a04c9996c10a03ea68b8af7ac'O ) ) ) Loading @@ -235,14 +235,32 @@ module LibItsSecurity_Pixits { valueof(m_validity_restriction_time_start_and_end( 1408802285, 1513691885 )), valueof(m_validity_restriction_region( m_geographicRegion_polygonial( { { latitude := 498716540, longitude := 86382080 }, { latitude := 498685550, longitude := 86411050 }, { latitude := 492040400, longitude := 86475600 } } ) )) }, signature_ := valueof(m_signature( m_ecdsaSignature( m_eccPointecdsa_nistp256_with_sha256_x_coordinate_only( 'a108820c22e03a9f0e9e2b2bebd90692994e9d7e787d2b78cc814926107e841a'O '9ba18503dfc211994cfd1a1ecf71f306da9e6980ac2fb091d0797d9b155a2086'O ), '9571f152dbc23065226dc6e955af599b52d93d7e2b63d651d4188dee0a67a8cf'O '4930abcb59b4feda7a59c3c78cdafce8e804f6fe8cab94afcc84bf568d46497d'O ) )) } // End of config #0 Loading @@ -254,8 +272,8 @@ module LibItsSecurity_Pixits { */ modulepar ThreeDLocations PX_TRHEED_LOCATIONS := { { // Config #0 latitude := 12345, longitude := 12345, latitude := 498717000, longitude := 86384000, elevation := '020E'O } // End of config #0 // TODO Add additional configurations Loading @@ -266,8 +284,8 @@ module LibItsSecurity_Pixits { */ modulepar TaConfigs PX_TA_CONFIGS := { { // Config #0 signingPrivateKey := '6240f8eee3ecc40549538a46805da487806a3d40ab31380756aef687442b66e8'O, encryptPrivateKey := 'f14c6fa6fdde070e45922e1c37b44771e798b890e81b2fced893803af6639750'O, signingPrivateKey := '23b10baaad8081052e7a212aeb715f1ef3bb4197b65b09bd5b52e8ac21b04414'O, encryptPrivateKey := '253db07e952cc56d928ef02590fd5f66909be05e8ed5dde36611bb8a43adf836'O, caCertificate := PX_CA_CERTIFICATES[0], aaCertificate := PX_AA_CERTIFICATES[0], atCertificate := PX_AT_CERTIFICATES[0], Loading Loading
ttcn/Security/LibItsSecurity_Functions.ttcn3 +6 −2 Original line number Diff line number Diff line Loading @@ -66,6 +66,10 @@ module LibItsSecurity_Functions { in octetstring p_ecdsaNistp256PublicKeyX, in octetstring p_ecdsaNistp256PublicKeyY ) return boolean { log("p_toBeVerifiedData= ", p_toBeVerifiedData); log("p_signature= ", p_signature); log("p_ecdsaNistp256PublicKeyX= ", p_ecdsaNistp256PublicKeyX); log("p_ecdsaNistp256PublicKeyY= ", p_ecdsaNistp256PublicKeyY); return fx_verifyWithEcdsaNistp256WithSha256( p_toBeVerifiedData, p_signature, Loading Loading @@ -411,6 +415,7 @@ module LibItsSecurity_Functions { var boolean v_result := false; var template (value) ToBeSignedCertificate v_toBeSignedCertificate; log("p_certificateToBeVerified: ", p_certificateToBeVerified); log("full certificate: ", bit2oct(encvalue(p_certificateToBeVerified))); // Create Certificate payload to be verified Loading Loading @@ -454,7 +459,6 @@ module LibItsSecurity_Functions { var integer v_counter; for (v_counter := 0; v_counter < lengthof(p_issuingCertificate.subject_attributes); v_counter := v_counter + 1) { log("f_verifyCertificateSignatureWithIssuingCertificate: processing ", p_issuingCertificate.subject_attributes[v_counter]); if (valueof(p_issuingCertificate.subject_attributes[v_counter].type_) == e_verification_key) { return f_verifyCertificateSignatureWithPublicKey( p_certificateToBeVerified, Loading
ttcn/Security/LibItsSecurity_Pixits.ttcn3 +42 −24 Original line number Diff line number Diff line Loading @@ -35,8 +35,8 @@ module LibItsSecurity_Pixits { valueof(m_subject_attribute_verification_key( m_publicKey_eccPoint( m_eccPointecdsa_nistp256_with_sha256_uncompressed( '681bd7f8b4f4483763130b659099a64a6b5d734ea729f966e4436bf8da128c55'O, '9596f82dcf60625bb2ef113cf85f1a7cc4adda09e239a869e2dd6b974d442378'O '99714f76eadcaf3ee8b763d4d57229e906dffcfdb72760bf00793251fce60273'O, '85de158c42e598f56dff1579b827dc2d2e51405e786a9bde41781d8d15fb32e8'O ) ) )), Loading @@ -44,8 +44,8 @@ module LibItsSecurity_Pixits { m_publicKey_aesccm( m_aesccm( m_eccPointecdsa_nistp256_with_sha256_uncompressed( 'b03573a37b86c6cf57518ccf20e1d6a2e7ddaa9cbe2c98953b838a9689fc13f4'O, 'dd2b847c6481a23c558e96caaf69d8bead7b518909acecfdb6e36c1bc824cfbd'O '50ca984cbfe1e576b10cbb0d31729abde878edfe6ba5dc8b919108376a0c410f'O, '49b3a3b052efb76e227933e8c0d5dfde5fa48a4495934e837d782f5dea3b3c93'O ) ) ) Loading Loading @@ -90,9 +90,9 @@ module LibItsSecurity_Pixits { signature_ := valueof(m_signature( m_ecdsaSignature( m_eccPointecdsa_nistp256_with_sha256_x_coordinate_only( 'b668e238a4f243331cc5caa87069b64c35389a23817cc07219556f957648e251'O '9d0f5242df9b9b459d6a5e4a58bfe0ae04d02354e3afefbb8dad31d9b709b75b'O ), 'bc5f2ecf8bba774c3c35b7aab80280e972c1530401ecda8794e387f579a705e8'O '23c3a850cd15835927cb2da694e9d00a865fe80771d9a7f77b50829491666731'O ) )) } // End of config #0 Loading @@ -109,7 +109,7 @@ module LibItsSecurity_Pixits { { type_ := e_certificate_digest_with_ecdsap256, signerInfo := { digest := 'e33752cefbf9a7c6'O digest := 'bfb9a8d1cc65adac'O } // End of field signerInfo } }, Loading @@ -120,8 +120,8 @@ module LibItsSecurity_Pixits { valueof(m_subject_attribute_verification_key( m_publicKey_eccPoint( m_eccPointecdsa_nistp256_with_sha256_uncompressed( 'c1ec9c8107f820f54345f4b996a74f984d0cf0b145e894417fedb973e6b23c83'O, 'b5bf92da1bbb0704067a8350ee478492d4433c81ea522c713d14685d81c70ea6'O 'be85ee62cdf9c0a7ecabedcc2da16705238485f1eedef89522823ad1fa739b67'O, '5f47cbec24a6c9a04db62cce2c62efe9d52a4f369e3761a5c59df78b3aa89880'O ) ) )), Loading @@ -129,8 +129,8 @@ module LibItsSecurity_Pixits { m_publicKey_aesccm( m_aesccm( m_eccPointecdsa_nistp256_with_sha256_uncompressed( '9b550869c67caf205372018b7789a44153fe7ac7685a89b0f4aa2e9dab30ad18'O, '9b550869c67caf205372018b7789a44153fe7ac7685a89b0f4aa2e9dab30ad18'O 'abe1fb5d4883f108b7cd163bacbe0d232589473715cdbbe91da6a7f6296e1c20'O, 'abe1fb5d4883f108b7cd163bacbe0d232589473715cdbbe91da6a7f6296e1c20'O ) ) ) Loading Loading @@ -175,9 +175,9 @@ module LibItsSecurity_Pixits { signature_ := valueof(m_signature( m_ecdsaSignature( m_eccPointecdsa_nistp256_with_sha256_x_coordinate_only( '46aa93c900e529b40b9e38af110f89f625ebae187bf4bdc908382eaa019eabef'O 'd6390d5a4f7bc5c08be6e0dd1cd5127331bb1b7a7a934a1ea3242ca98156cbbe'O ), 'e2ccb867b96b5f1c9151325297937078020955cf36c435102fa4a04e1e68ab4c'O 'b58aa41fae5813d9df7f05d255880e18837d6c97ec39696c885189d68bf71b42'O ) )) } // End of config #0 Loading @@ -194,7 +194,7 @@ module LibItsSecurity_Pixits { { type_ := e_certificate_digest_with_ecdsap256, signerInfo := { digest := 'd7fbfc40b39af7e0'O digest := '329196dea5aadf90'O } // End of field signerInfo } }, Loading @@ -203,8 +203,8 @@ module LibItsSecurity_Pixits { valueof(m_subject_attribute_verification_key( m_publicKey_eccPoint( m_eccPointecdsa_nistp256_with_sha256_uncompressed( 'b9e9c238c335ef8d2fb484e196b0fc36bb90f2aef1f7ce7b28401341ed122f14'O, 'a759ffdfd44d278df2877ac04f079190649e7f495d923c30e549452f33ff5832'O 'fa8ed7cf7251c2d5b323e35ff907d70d6b3bf1c1b36a6fdd90b37a497bfb1e9a'O, '43f3074569b232c0f91e74c410bf3ce014a8012dd8cecafff45355cc9cc85c8d'O ) ) )), Loading @@ -212,8 +212,8 @@ module LibItsSecurity_Pixits { m_publicKey_aesccm( m_aesccm( m_eccPointecdsa_nistp256_with_sha256_uncompressed( '007504649693dcc4f25ff7650a4d90f4151f9939e4f0531e81b57863e7536ac9'O, '00e4b9981e78da2775e50840e78edc810c3296c42ea26528b1080e848b539dd7'O '359ef9f14f8f275fea963ebd097e5137047485f1bd5c7e1dad814fdfc5b0df26'O, '29c9fb7ecf32da70afec008988f95bbdcad0013a04c9996c10a03ea68b8af7ac'O ) ) ) Loading @@ -235,14 +235,32 @@ module LibItsSecurity_Pixits { valueof(m_validity_restriction_time_start_and_end( 1408802285, 1513691885 )), valueof(m_validity_restriction_region( m_geographicRegion_polygonial( { { latitude := 498716540, longitude := 86382080 }, { latitude := 498685550, longitude := 86411050 }, { latitude := 492040400, longitude := 86475600 } } ) )) }, signature_ := valueof(m_signature( m_ecdsaSignature( m_eccPointecdsa_nistp256_with_sha256_x_coordinate_only( 'a108820c22e03a9f0e9e2b2bebd90692994e9d7e787d2b78cc814926107e841a'O '9ba18503dfc211994cfd1a1ecf71f306da9e6980ac2fb091d0797d9b155a2086'O ), '9571f152dbc23065226dc6e955af599b52d93d7e2b63d651d4188dee0a67a8cf'O '4930abcb59b4feda7a59c3c78cdafce8e804f6fe8cab94afcc84bf568d46497d'O ) )) } // End of config #0 Loading @@ -254,8 +272,8 @@ module LibItsSecurity_Pixits { */ modulepar ThreeDLocations PX_TRHEED_LOCATIONS := { { // Config #0 latitude := 12345, longitude := 12345, latitude := 498717000, longitude := 86384000, elevation := '020E'O } // End of config #0 // TODO Add additional configurations Loading @@ -266,8 +284,8 @@ module LibItsSecurity_Pixits { */ modulepar TaConfigs PX_TA_CONFIGS := { { // Config #0 signingPrivateKey := '6240f8eee3ecc40549538a46805da487806a3d40ab31380756aef687442b66e8'O, encryptPrivateKey := 'f14c6fa6fdde070e45922e1c37b44771e798b890e81b2fced893803af6639750'O, signingPrivateKey := '23b10baaad8081052e7a212aeb715f1ef3bb4197b65b09bd5b52e8ac21b04414'O, encryptPrivateKey := '253db07e952cc56d928ef02590fd5f66909be05e8ed5dde36611bb8a43adf836'O, caCertificate := PX_CA_CERTIFICATES[0], aaCertificate := PX_AA_CERTIFICATES[0], atCertificate := PX_AT_CERTIFICATES[0], Loading