Commit 311476d0 authored by garciay's avatar garciay
Browse files

Implementation of f_calculateDigest()

parent 7d6f5bc4
Loading
Loading
Loading
Loading
+21 −21
Original line number Original line Diff line number Diff line
@@ -35,8 +35,8 @@ module LibItsSecurity_Pixits {
                m_subject_attribute_verification_key(
                m_subject_attribute_verification_key(
                    m_publicKey_eccPoint(
                    m_publicKey_eccPoint(
                        m_eccPointecdsa_nistp256_with_sha256_uncompressed(
                        m_eccPointecdsa_nistp256_with_sha256_uncompressed(
                            'bf8a03e7a5c26ecc9cde8199ac933b4f934ea2e5555acffd71c81e127ef15a75'O,
                            '2310175fc18d35a60b756326603ba4b91222156330c8b2ea9ba11bb77bf4ab2a'O,
                            'ed5f95ea1ec498d2bd01974676e7812bbffd0cac6f37db20cf8791e3a458a7d9'O
                            '6cc5dbdedae46859755c3c7d24bbd0672fa2c19603253250462d561a9cd6e772'O
                        )
                        )
                    )
                    )
                ),
                ),
@@ -44,8 +44,8 @@ module LibItsSecurity_Pixits {
                    m_publicKey_aesccm(
                    m_publicKey_aesccm(
                        m_aesccm(
                        m_aesccm(
                            m_eccPointecdsa_nistp256_with_sha256_uncompressed(
                            m_eccPointecdsa_nistp256_with_sha256_uncompressed(
                                'bcdc54771cb782683d4cdeca0853d11600756ace9120b672caba69976b145f6f'O,
                                '52b860c7e98b2a80dffb2f0dbb66655e50912f032e5e9e455d4cda2b585288e3'O,
                                '49a72be0141b8ed085371cb33aa4c2dc2c80aee7448a130d07d38cdda65ca780'O
                                '4aa121c98582f1d4142cdf602ca20ece11d4a4c95c10570d3698acea0d88b70a'O
                            )
                            )
                        )
                        )
                    )
                    )
@@ -90,9 +90,9 @@ module LibItsSecurity_Pixits {
            signature_              := m_signature(
            signature_              := m_signature(
                m_ecdsaSignature(
                m_ecdsaSignature(
                    m_eccPointecdsa_nistp256_with_sha256_x_coordinate_only(
                    m_eccPointecdsa_nistp256_with_sha256_x_coordinate_only(
                        '41001bca24d594da442a1e653dd618ccddca435ac6308b53018e881dea14a31e'O
                        '4a249cd8c9d06591b5b872e6c43f4cdadb92ddbfdec76efc97ac8e417757d180'O
                    ),
                    ),
                    '64b7d4da721ef2ff7c67563b4bf16ad79b3288a3878c821dfe394c5484ca7f79'O
                    'feb5073184ddd22126758f60ff92f185a668bca761c917e32f08690014e01535'O
                )
                )
            )
            )
        } // End of config #0
        } // End of config #0
@@ -120,8 +120,8 @@ module LibItsSecurity_Pixits {
                m_subject_attribute_verification_key(
                m_subject_attribute_verification_key(
                    m_publicKey_eccPoint(
                    m_publicKey_eccPoint(
                        m_eccPointecdsa_nistp256_with_sha256_uncompressed(
                        m_eccPointecdsa_nistp256_with_sha256_uncompressed(
                            'f4c5e1e8650fef248fb90a38499c11fe8e4a58ed25c368ee36790232e0d770f5'O,
                            'd2099e59a56b776543f64ab8db22fa92c0481bdc90b744d0db1e6aedc166d0d0'O,
                            '619f7174da9629f981f5d365e3eddfe406ffe4920c723dad473a87b5b05ae57f'O
                            '3893e3830a5f73552536f7f96682949cd6f294ca432db142602c259cb1f32204'O
                        )
                        )
                    )
                    )
                ),
                ),
@@ -129,8 +129,8 @@ module LibItsSecurity_Pixits {
                    m_publicKey_aesccm(
                    m_publicKey_aesccm(
                        m_aesccm(
                        m_aesccm(
                            m_eccPointecdsa_nistp256_with_sha256_uncompressed(
                            m_eccPointecdsa_nistp256_with_sha256_uncompressed(
                                '5b36e9ab76e977f6cb1b822e8bdee82ee72f28f1055128c0051c9f85699abebe'O,
                                'cb056cc2d14bfdb33d4018561a3ffb29cab78f009387215a218c761940a5e5a8'O,
                                '5b36e9ab76e977f6cb1b822e8bdee82ee72f28f1055128c0051c9f85699abebe'O
                                'cb056cc2d14bfdb33d4018561a3ffb29cab78f009387215a218c761940a5e5a8'O
                            )
                            )
                        )
                        )
                    )
                    )
@@ -175,9 +175,9 @@ module LibItsSecurity_Pixits {
            signature_              := m_signature(
            signature_              := m_signature(
                m_ecdsaSignature(
                m_ecdsaSignature(
                    m_eccPointecdsa_nistp256_with_sha256_x_coordinate_only(
                    m_eccPointecdsa_nistp256_with_sha256_x_coordinate_only(
                        'be28371f8b18d411581c10f30310128625f78f9c69761757d58203c6c757f38e'O
                        'f34c574eaba1c3d5d733b603d765cb9b2a603623c4c927f82ae6b84f95683d80'O
                    ),
                    ),
                    'c10d683159c9a52bc3f3e9563194ccaf694cadac56cbaee575bc7366f02ea09d'O
                    '2914da5c5a519d597630c38ca78c1d844475a6c8e0f0343e79ba87af7716f3cd'O
                )
                )
            )
            )
        } // End of config #0
        } // End of config #0
@@ -194,7 +194,7 @@ module LibItsSecurity_Pixits {
                {
                {
                    type_         := e_certificate_digest_with_ecdsap256,
                    type_         := e_certificate_digest_with_ecdsap256,
                    signerInfo    := {
                    signerInfo    := {
                        digest := '6dbeefd92c7f36db'O
                        digest := 'ea16b7847cbc4680'O
                    } // End of field signerInfo
                    } // End of field signerInfo
                } 
                } 
            },
            },
@@ -203,8 +203,8 @@ module LibItsSecurity_Pixits {
                m_subject_attribute_verification_key(
                m_subject_attribute_verification_key(
                    m_publicKey_eccPoint(
                    m_publicKey_eccPoint(
                        m_eccPointecdsa_nistp256_with_sha256_uncompressed(
                        m_eccPointecdsa_nistp256_with_sha256_uncompressed(
                            'b462520bee11df3cd826e969e4db0ba4327e686e2526fa05bffa617773d217fd'O,
                            '7a9e782368297b62b47d3dbe3718f9c9879cfe985f8b734667f4573820f9d46c'O,
                            'ca45fb75c453430521484332a0835f5bb690201b1ef3d8fe2c43bdf2eb3865a6'O
                            'ad2b4454bd31ded6c39f9d9338410fbf330995e50743f99782add4f5ce04df45'O
                        )
                        )
                    )
                    )
                ),
                ),
@@ -212,8 +212,8 @@ module LibItsSecurity_Pixits {
                    m_publicKey_aesccm(
                    m_publicKey_aesccm(
                        m_aesccm(
                        m_aesccm(
                            m_eccPointecdsa_nistp256_with_sha256_uncompressed(
                            m_eccPointecdsa_nistp256_with_sha256_uncompressed(
                                '9f803aaf544262eb522c5ce2332f018cac4d9817b6fddda97d12b01bcdaf56f9'O,
                                '4bb98551a5f5606f2c5b6dcf640dd5d88530fff6a9d1b9d073537f89dc9f3a76'O,
                                '2bf1ea0b3d0d969cb5d3c1d5fce9eba043d340b76ba7f44e4fc83d6f753517cf'O
                                '3f9631c068bed0373c6c2333617b922254e0951ed90e25e3fe3a0a9ffd8f6b5d'O
                            )
                            )
                        )
                        )
                    )
                    )
@@ -240,9 +240,9 @@ module LibItsSecurity_Pixits {
            signature_              := m_signature(
            signature_              := m_signature(
                m_ecdsaSignature(
                m_ecdsaSignature(
                    m_eccPointecdsa_nistp256_with_sha256_x_coordinate_only(
                    m_eccPointecdsa_nistp256_with_sha256_x_coordinate_only(
                        'd8dfca3197ff2177e8d7e169266a7e78192f0c656ceb07f1e2035044509c0560'O
                        'e3cfcb6cca2138cdf82daccf4530c47753a7868e2c1e299346e2acd58ab7dec0'O
                    ),
                    ),
                    '9c7efb2f953a2019d7a0c7a0cd7ce5a52cc1544ee92cafa74857b1489f419f46'O
                    'ebec940cb0694a779b3055d8bd3a9bc67427021980d60b3780814b62d7555327'O
                )
                )
            )
            )
        } // End of config #0
        } // End of config #0
@@ -266,8 +266,8 @@ module LibItsSecurity_Pixits {
     */
     */
    modulepar TaConfigs PX_TA_CONFIGS := {
    modulepar TaConfigs PX_TA_CONFIGS := {
        { // Config #0
        { // Config #0
            signingPrivateKey   := '56fc91b6d762529c670555a326120a210738a8718cc68e2db8f1e4b0643fc3e0'O,
            signingPrivateKey   := '673a51298753d89af6d70b52a938a69e3ab7d4f8540823998d0751191e1e31c6'O,
            encryptPrivateKey   := 'b462520bee11df3cd826e969e4db0ba4327e686e2526fa05bffa617773d217fd'O,
            encryptPrivateKey   := '73122d2d0b40f639db8c62bc90569e312af8f99df4a8f706e8375c8dc1bbc10a'O,
            caCertificate       := PX_CA_CERTIFICATES[0],
            caCertificate       := PX_CA_CERTIFICATES[0],
            aaCertificate       := PX_AA_CERTIFICATES[0],
            aaCertificate       := PX_AA_CERTIFICATES[0],
            atCertificate       := PX_AT_CERTIFICATES[0],
            atCertificate       := PX_AT_CERTIFICATES[0],
+19 −32
Original line number Original line Diff line number Diff line
@@ -726,7 +726,7 @@ module LibItsSecurity_Templates {
             */
             */
            template (value) SecuredMessage m_secureMessage(
            template (value) SecuredMessage m_secureMessage(
                 in template (value) HeaderFields p_header_fields,
                 in template (value) HeaderFields p_header_fields,
                 in template (value) SecPayloads p_payload_fields,
                 in template (omit) SecPayloads p_payload_fields,
                 in template (value) TrailerFields p_trailer_fields
                 in template (value) TrailerFields p_trailer_fields
            ) := {
            ) := {
                protocol_version    := c_protocol_version,
                protocol_version    := c_protocol_version,
@@ -1734,32 +1734,19 @@ module LibItsSecurity_Templates {
             */
             */
            group securityProfilesCAMsSend {
            group securityProfilesCAMsSend {
                
                
                template (value) ToBeSignedSecuredMessage m_ToBeSignedSecuredMessage_cam(
                    in template (value) HeaderFields p_header_fields,
                    in template (omit) SecPayloads p_payload_fields,
                    in template (value) TrailerFieldType p_trailer_field_type
                ) := {
                    protocol_version        := c_protocol_version,
                    security_profile        := c_security_profileCAMs,
                    header_fields           := p_header_fields,
                    payload_fields          := p_payload_fields,
                    trailer_fieldsLength    := 67, // 43h = lengthof(trailer_fields) // FIXME To be enhanced
                    trailerFieldType        := p_trailer_field_type
                } // End of template m_ToBeSignedSecuredMessage_cam
                
                /**
                /**
                 * @desc Generic send template for Security profile for CAMs with several payloads
                 * @desc Generic send template for Security profile for CAMs with several payloads
                 */
                 */
                template (value) SecuredMessage md_secureMessageCAM(
                template (value) SecuredMessage md_secureMessage_profileCam(
                    in template (value) HeaderFields p_header_fields,
                    in template (value) HeaderFields p_header_fields,
                    in template (value) SecPayloads p_payload_fields,
                    in template (omit) SecPayloads p_payload_fields,
                    in template (value) TrailerFields p_trailer_fields
                    in template (value) TrailerFields p_trailer_fields
                ) modifies m_secureMessage := {
                ) modifies m_secureMessage := {
                    security_profile    := c_security_profileCAMs,
                    security_profile    := c_security_profileCAMs,
                    header_fields       := p_header_fields,
                    header_fields       := p_header_fields,
                    payload_fields      := p_payload_fields,
                    payload_fields      := p_payload_fields,
                    trailer_fields      := p_trailer_fields
                    trailer_fields      := p_trailer_fields
                } // End of template md_secureMessageCAM
                } // End of template md_secureMessage_profileCam
                
                
            } // End of group securityProfilesCAMsSend
            } // End of group securityProfilesCAMsSend
            
            
@@ -1803,18 +1790,19 @@ module LibItsSecurity_Templates {
            
            
            group securityProfilesDENMsSend {
            group securityProfilesDENMsSend {
                
                
                template (value) ToBeSignedSecuredMessage m_ToBeSignedSecuredMessage_denm(
                /**
                 * @desc Generic send template for Security profile for CAMs with several payloads
                 */
                template (value) SecuredMessage md_secureMessage_profileDenm(
                    in template (value) HeaderFields p_header_fields,
                    in template (value) HeaderFields p_header_fields,
                    in template (omit) SecPayloads p_payload_fields,
                    in template (omit) SecPayloads p_payload_fields,
                    in template (value) TrailerFieldType p_trailer_field_type
                    in template (value) TrailerFields p_trailer_fields
                ) := {
                ) modifies m_secureMessage := {
                    protocol_version        := c_protocol_version,
                    security_profile    := c_security_profileCAMs,
                    security_profile        := c_security_profileDENMs,
                    header_fields       := p_header_fields,
                    header_fields       := p_header_fields,
                    payload_fields      := p_payload_fields,
                    payload_fields      := p_payload_fields,
                    trailer_fieldsLength    := 67, // 43h = lengthof(trailer_fields) // FIXME To be enhanced
                    trailer_fields      := p_trailer_fields
                    trailerFieldType        := p_trailer_field_type
                } // End of template md_secureMessage_profileDenm
                } // End of template m_ToBeSignedSecuredMessage_denm
                
                
            } // End of group securityProfilesDENMsSend
            } // End of group securityProfilesDENMsSend
            
            
@@ -1848,17 +1836,16 @@ module LibItsSecurity_Templates {
            
            
            group otherSecurityProfilesSend {
            group otherSecurityProfilesSend {
                
                
                template (value) SecuredMessage m_securedMessage_profileOther(
                template (value) SecuredMessage md_securedMessage_profileOther(
                    in template (value) HeaderFields p_header_fields,
                    in template (value) HeaderFields p_header_fields,
                    in template (omit) SecPayloads p_payload_fields,
                    in template (omit) SecPayloads p_payload_fields,
                    in template (value) TrailerFields p_trailer_fields
                    in template (value) TrailerFields p_trailer_fields
                ) := {
                ) modifies m_secureMessage := {
                    protocol_version    := c_protocol_version,
                    security_profile    := c_security_profileOthers,
                    security_profile    := c_security_profileOthers,
                    header_fields       := p_header_fields,
                    header_fields       := p_header_fields,
                    payload_fields      := p_payload_fields,
                    payload_fields      := p_payload_fields,
                    trailer_fields      := p_trailer_fields
                    trailer_fields      := p_trailer_fields
                } // End of template m_securedMessageBeacon
                } // End of template md_securedMessage_profileOther
                
                
            } // End of group m_securedMessage_profileOther
            } // End of group m_securedMessage_profileOther
            
            
@@ -1899,7 +1886,7 @@ module LibItsSecurity_Templates {
        template (value) ToBeSignedSecuredMessage m_toBeSignedSecuredMessage(
        template (value) ToBeSignedSecuredMessage m_toBeSignedSecuredMessage(
            in UInt8 p_security_profile,
            in UInt8 p_security_profile,
            in template (value) HeaderFields p_header_fields,
            in template (value) HeaderFields p_header_fields,
            in template (omit) SecPayloads p_payload_fields,
            in template (value) SecPayloads p_payload_fields,
            in template (value) TrailerFieldType p_trailer_field_type
            in template (value) TrailerFieldType p_trailer_field_type
        ) := {
        ) := {
            protocol_version        := c_protocol_version,
            protocol_version        := c_protocol_version,