Commit 4a4e9369 authored by garciay's avatar garciay
Browse files

Remove templates referencing CAM/DENM

parent 052e9d98
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -21,17 +21,17 @@ module LibItsSecurity_Pixits {
    /**
    /**
     * @desc TODO
     * @desc TODO
     */
     */
    modulepar octetstring PX_ECDSA_X_COORDINATE := 'CAFEDECACAFEDECACAFEDECACAFEDECACAFEDECACAFEDECACAFEDECACAFEDECA'O;
    modulepar octetstring PX_ECDSA_X_COORDINATE := 'D89D70110B4AB76904CBD27578420F0814380A5E4183F42AE602BE903EE606F8'O;
    
    
    /**
    /**
     * @desc TODO
     * @desc TODO
     */
     */
    modulepar octetstring PX_ECDSA_Y_COORDINATE := 'CAFEDECACAFEDECACAFEDECACAFEDECACAFEDECACAFEDECACAFEDECACAFEDECA'O;
    modulepar octetstring PX_ECDSA_Y_COORDINATE := '639D5CB825989E92F0A77B31EF65DE5B3505C75FD7B12BA64DBA89897DCB4043'O;
    
    
    /**
    /**
     * @desc TODO
     * @desc TODO
     */
     */
    modulepar octetstring PX_ECDSA_S := 'CAFEDECACAFEDECACAFEDECACAFEDECACAFEDECACAFEDECACAFEDECACAFEDECA'O;
    modulepar octetstring PX_ECDSA_S := '00008A08AE40EC69030C056E48152F7A14F72BA4F305C2E6AA31997ABE93E7FD3D07E43400F68D98EEDB3B5A64FF49177ED6C484D94A596CD5CB2A5209B2A26CCDF8'O;
    
    
    /**
    /**
     * @desc TODO
     * @desc TODO
+58 −92
Original line number Original line Diff line number Diff line
@@ -15,7 +15,7 @@ module LibItsSecurity_Templates {
    }
    }
    import from LibCommon_DataStrings {
    import from LibCommon_DataStrings {
        type 
        type 
            Oct2, Oct20, Oct0to31, 
            Oct2, Oct12, Oct20, Oct0to31, 
            Bit2, Bit3
            Bit2, Bit3
    }
    }


@@ -247,12 +247,52 @@ module LibItsSecurity_Templates {
             */
             */
            group algorithms {
            group algorithms {
                
                
                /**
                 * @desc Send template for EccPoint description
                 * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.5   EccPoint
                 * @see Draft ETSI TS 103 097 V1.1.6 Table 2: Derivation of field sizes depending on the used algorithm
                 */
                template (value) EccPoint m_eccPointecdsa_nistp256_with_sha256_x_coordinate_only(
                                                                                                 in template (value) octetstring p_x
                ) modifies m_eccPoint_dummy := { 
                    field_size      := f_int2UInt8(1 + lengthof(p_x)), 
                    x               := p_x
                } // End of template m_eccPointecdsa_nistp256_with_sha256_x_coordinate_only
                
                /**
                 * @desc Send template for AES CCM description
                 * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.5   EccPoint
                 * @see Draft ETSI TS 103 097 V1.1.6 Table 2: Derivation of field sizes depending on the used algorithm
                 */
                template (value) EccPoint m_aesccm_ecies_nistp256_uncompressed(
                                                                               in template (value) octetstring p_x,
                                                                               in template (value) octetstring p_y
                ) modifies m_aesccm_dummy := { 
                    field_size      := f_int2UInt8(1 + lengthof(p_x)), 
                    x               := p_x,
                    y               := {
                        y := p_y
                    } // End of field y
                } // End of template m_aesccm_ecies_nistp256_uncompressed
                                
                /**
                 * @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_aes_128_ccm(
                                                                                         in template (value) Oct12 p_nonce
                ) modifies m_encryptionParameters_dummy := {
                    symm_algorithm := e_aes_128_ccm,
                    public_key := {
                        nonce := p_nonce
                    }
                } // End of template m_encryptionParameters_aes_128_ccm
                
                
            } // End of group algorithms
            } // End of group algorithms
            
            
            /**
            /**
             * @desc Send/receive templates for Signature description
             * @desc Send/receive templates for Signature description
             * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.5   EccPoint
             * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.9   Signature
             * @see Draft ETSI TS 103 097 V1.1.6 Table 2: Derivation of field sizes depending on the used algorithm
             * @see Draft ETSI TS 103 097 V1.1.6 Table 2: Derivation of field sizes depending on the used algorithm
             */
             */
            group signatures {
            group signatures {
@@ -261,7 +301,7 @@ module LibItsSecurity_Templates {
                 * @desc Send template for signatures based on ECDSA algorithm
                 * @desc Send template for signatures based on ECDSA algorithm
                 * @member algorithm        Algorithm type
                 * @member algorithm        Algorithm type
                 * @member p_ecdsaSignature The ECDSA based signature
                 * @member p_ecdsaSignature The ECDSA based signature
                 * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.7   EncryptionParameters
                 * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.9   Signature
                 */
                 */
                template (value) Signature m_signature(
                template (value) Signature m_signature(
                                                       in template (value) EcdsaSignature p_ecdsaSignature
                                                       in template (value) EcdsaSignature p_ecdsaSignature
@@ -276,15 +316,17 @@ module LibItsSecurity_Templates {
                 * @desc Send template for ECDSA based signature
                 * @desc Send template for ECDSA based signature
                 * @member algorithm    Algorithm type
                 * @member algorithm    Algorithm type
                 * @member p_r          The coordinate of the elliptic curve point resulting from multiplying the generator element by the ephemeral private key
                 * @member p_r          The 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.6 Clause 4.2.7   EncryptionParameters
                 * @member p_s          The signature
                 * @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.10   EcdsaSignature
                 */
                 */
                template (value) EcdsaSignature m_ecdsaSignature(
                template (value) EcdsaSignature m_ecdsaSignature(
                                                                 in template (value) EccPoint p_r
                                                                 in template (value) EccPoint p_r,
                                                                 in template (value) octetstring p_s
                ) := {
                ) := {
                    algorithm   := e_ecdsa_nistp256_with_sha256,
                    algorithm   := e_ecdsa_nistp256_with_sha256,
                    field_size  := f_int2UInt8(1 + lengthof(PX_ECDSA_S)),
                    field_size  := f_int2UInt8(1 + lengthof(p_s)),
                    r           := p_r,
                    r           := p_r,
                    s           := PX_ECDSA_S
                    s           := p_s
                } // End of template m_ecdsaSignature
                } // End of template m_ecdsaSignature
                
                
            } // End of group signatures 
            } // End of group signatures 
@@ -603,43 +645,11 @@ module LibItsSecurity_Templates {
         */
         */
        group dummyMessagesSend {
        group dummyMessagesSend {
            
            
            /**
             * @desc Generic send template for Security profile for CAMs
             * @see Draft ETSI TS 103 097 V1.1.6 Clause 7.1  Security profile for CAMs
             */
            template (value) SecuredMessage m_secureMessageCAMs_dummy := {
                protocol_version     := c_protocol_version,
                security_profile     := c_security_profileCAMs,
                header_fields        := {
                    m_header_field_signer_info(
                        m_SignerInfo_self
                    )
                },
                payload_fields        := { },
                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_signer_info(
                        m_SignerInfo_self
                    )
                },
                payload_fields        := { },
                trailer_fields        := { }
            } // End of template m_secureMessageDENMs_dummy
            
            /**
            /**
             * @desc Generic send template for Security profile for other messages
             * @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
             * @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 := {
            template (value) SecuredMessage m_secureMessage_dummy := {
                protocol_version     := c_protocol_version,
                protocol_version     := c_protocol_version,
                security_profile     := c_security_profileOthers,
                security_profile     := c_security_profileOthers,
                header_fields        := { 
                header_fields        := { 
@@ -649,7 +659,7 @@ module LibItsSecurity_Templates {
                },
                },
                payload_fields        := { },
                payload_fields        := { },
                trailer_fields        := { }
                trailer_fields        := { }
            } // End of template m_secureMessageCAMs_dummy
            } // End of template m_secureMessage_dummy
            
            
        } // End of group dummyMessagesSend
        } // End of group dummyMessagesSend
        
        
@@ -670,38 +680,6 @@ module LibItsSecurity_Templates {
                trailer_fields      := ?
                trailer_fields      := ?
            } // End of template mw_securedMessage_dummy
            } // End of template mw_securedMessage_dummy
            
            
            /**
             * @desc Generic received template for SecuredMessage
             */
            template (present) SecuredMessage mdw_securedMessageCAMs_dummy
            modifies mw_securedMessage_dummy := {
                security_profile    := c_security_profileCAMs
            } // End of template mdw_securedMessageCAMs_dummy
            
            /**
             * @desc Generic received template for SecuredMessage
             */
            template (present) SecuredMessage mdw_securedMessageDENMs_dummy
            modifies mw_securedMessage_dummy := {
                security_profile    := c_security_profileDENMs
            } // End of template mdw_securedMessageDENMs_dummy
            
            /**
             * @desc Generic received template for SecuredMessage
             */
            template (present) SecuredMessage mdw_securedMessageOthers_dummy
            modifies mw_securedMessage_dummy := {
                security_profile    := c_security_profileOthers
            } // End of template mdw_securedMessageOthers_dummy
            
            /**
             * @desc Generic received template for SecuredMessage
             */
            template (present) Payload mw_signedPayload_dummy := {
                type_   := e_signed, 
                data    := ?
            } // End of template mw_signedPayload_dummy
            
        } // End of group dummyMessagesRecv 
        } // End of group dummyMessagesRecv 
        
        
        group dummyPayloads {
        group dummyPayloads {
@@ -715,12 +693,12 @@ module LibItsSecurity_Templates {
            } // End of template mw_unsecuredPayload_dummy
            } // End of template mw_unsecuredPayload_dummy
            
            
            /**
            /**
             * @desc Generic received template for secured payload
             * @desc Generic received template for SecuredMessage
             */
             */
            template (present) Payload mw_data_payload_dummmy := {
            template (present) Payload mw_signedPayload_dummy := {
                type_   := ?,
                type_   := e_signed, 
                data    := ?
                data    := ?
            } // End of template mw_data_payload_dummmy
            } // End of template mw_signedPayload_dummy
            
            
        } // End of group payloads
        } // End of group payloads
        
        
@@ -1621,20 +1599,6 @@ module LibItsSecurity_Templates {
             */
             */
            group securityProfilesCAMsSend {
            group securityProfilesCAMsSend {
                
                
                /**
                 * @desc Generic send template for Security profile for CAMs with a single payload
                 */
                template (value) SecuredMessage md_secureMessageCAMs(
                                                                     in template (value) HeaderFields p_header_fields,
                                                                     in template (value) Payload p_payload_field,
                                                                     in template (value) TrailerFields p_trailer_fields
                ) modifies m_secureMessageCAMs_dummy := {
                    security_profile    := c_security_profileCAMs,
                    header_fields       := p_header_fields,
                    payload_fields      := { p_payload_field },
                    trailer_fields      := p_trailer_fields
                } // End of template md_secureMessageCAMs
                
                /**
                /**
                 * @desc Generic send template for Security profile for CAMs with several payloads
                 * @desc Generic send template for Security profile for CAMs with several payloads
                 */
                 */
@@ -1642,7 +1606,7 @@ module LibItsSecurity_Templates {
                                                                     in template (value) HeaderFields p_header_fields,
                                                                     in template (value) HeaderFields p_header_fields,
                                                                     in template (value) Payloads p_payload_fields,
                                                                     in template (value) Payloads p_payload_fields,
                                                                     in template (value) TrailerFields p_trailer_fields
                                                                     in template (value) TrailerFields p_trailer_fields
                ) modifies m_secureMessageCAMs_dummy := {
                ) modifies m_secureMessage_dummy := {
                    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,
@@ -1670,6 +1634,7 @@ module LibItsSecurity_Templates {
                    payload_fields      := ?,
                    payload_fields      := ?,
                    trailer_fields      := ?
                    trailer_fields      := ?
                } // End of template mdw_secureMessageCAMs
                } // End of template mdw_secureMessageCAMs
                
            } // End of group securityProfilesCAMsRecv
            } // End of group securityProfilesCAMsRecv
            
            
        } // End of group securityProfilesCAMs
        } // End of group securityProfilesCAMs
@@ -1697,6 +1662,7 @@ module LibItsSecurity_Templates {
         * @desc Convert integer into UInt8
         * @desc Convert integer into UInt8
         */
         */
        function f_int2UInt8(in integer p_value) return UInt8 {
        function f_int2UInt8(in integer p_value) return UInt8 {
//			log("f_int2UInt8: ", p_value);
            return p_value;
            return p_value;
        }
        }