Newer
Older
/**
* @author ETSI / STF481
* @version $URL$
* $Id$
* @desc Module containing templates for Security Protocol
*
*/
module LibItsSecurity_Templates {
// LibCommon
import from LibCommon_BasicTypesAndValues {
type
// // LibIts
// import from CAM_PDU_Descriptions language "ASN.1:1997" {
// type CAM
// }
// import from DENM_PDU_Descriptions language "ASN.1:1997" {
// type DENM
// }
//
// LibItsSecurity
import from LibItsSecurity_TypesAndValues all;
import from LibItsSecurity_Pixits all;
// import from LibItsSecurity_TestSystem {
// type
// GnSecurityReq, GnSecurityInd
// }
// template (value) GnSecurityReq m_gnSecurityReq(
// in template (value) SecuredMessage p_msgReq
// ) := {
// msgReq := p_msgReq
// } // End of template m_gnSecurityReq
//
// template (present) GnSecurityInd mw_gnSecurityInd(
// in template (present) SecuredMessage p_msgInd
// ) := {
// msgInd := p_msgInd
// } // End of template mw_gnSecurityIng
//
group constants {
/**
* @desc Protocol version
* @see Draft ETSI TS 103 097 V1.1.6 Clause 5.1 SecuredMessage
*/
const UInt8 c_protocol_version := 2;
/**
* @desc Security profile identifier for CAMs
* @see Draft ETSI TS 103 097 V1.1.6 Clause 7.1 Security profile for CAMs
*/
const UInt8 c_security_profileCAMs := 1;
/**
* @desc Security profile identifier for DENMs
* @see Draft ETSI TS 103 097 V1.1.6 Clause 7.2 Security profile for DENMs
*/
const UInt8 c_security_profileDENMs := 2;
/**
* @desc Security profile identifier for other messages
* @see Draft ETSI TS 103 097 V1.1.6 Clause 7.3 Generic security profile for other signed messages
*/
const UInt8 c_security_profileOthers := 3;
* @desc Certificate version
* @see Draft ETSI TS 103 097 V1.1.6 Clause 6.1 Certificate
* @desc Dummy send/receive templates for security headers
* @see Draft ETSI TS 103 097 V1.1.6 Clause 4 Basic format elements
* @desc Dummy send templates for security headers
* @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2 Specification of basic format elements
group dummyAlgorithms {
/**
* @desc Generic 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_eccPoint_dummy := {
field_size := f_int2UInt8(1 + lengthof(PX_ECDSA_X_COORDINATE)),
} // End of template m_eccPoint_dummy
/**
* @desc Generic 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_dummy := {
algorithm := e_ecies_nistp256,
field_size := f_int2UInt8(1 + lengthof(PX_AESCCM_X_COORDINATE)),
type_ := e_uncompressed,
x := PX_AESCCM_X_COORDINATE,
y := {
y := PX_AESCCM_Y_COORDINATE // WARNING siseof(y) == siseof(x)
} // 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
} // End of group dummyAlgorithms
/**
* @desc Dummy send template for PublicKey/EccPoint
* @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.4 PublicKey
*/
template (value) PublicKey m_publicKey_eccPoint_dummy := {
algorithm := e_ecdsa_nistp256_with_sha256,
public_key := {
eccPoint := m_eccPoint_dummy
} // End of field public_key
} // End of template PublicKey
/**
* @desc Dummy send template for PublicKey/AES CCM
* @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.4 PublicKey
*/
template (value) PublicKey m_publicKey_aesccm_dummy := {
algorithm := e_ecies_nistp256,
public_key := {
aesCcm := {
supported_symm_alg := e_aes_128_ccm,
eccPoint := m_aesccm_dummy
} // End of field aesCcm
} // End of field public_key
} // End of template m_publicKey_aesccm_dummy
} // End of group dummyBasicFormatElementsSend
/**
* @desc Dummy receive templates for security headers
* @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2 Specification of basic format elements
*/
group dummyBasicFormatElementsRecv {
/**
* @desc Dummy receive template for PublicKey/EccPoint
* @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.4 PublicKey
*/
template (present) PublicKey mw_publicKey_eccPoint_dummy := {
algorithm := e_ecdsa_nistp256_with_sha256,
public_key := {
eccPoint := ?
} // End of field public_key
} // End of template PublicKey
/**
* @desc Dummy send template for PublicKey/AES CCM
* @see Draft ETSI TS 103 097 V1.1.6 Clause 4.2.4 PublicKey
*/
template (present) PublicKey mw_publicKey_aesccm_dummy := {
algorithm := e_ecies_nistp256,
public_key := {
aesCcm := ?
} // End of field public_key
} // End of template m_publicKey_aesccm_dummy
/**
* @desc Dummy receive template for Time64WithStandardDeviation
Loading full blame...