-
Notifications
You must be signed in to change notification settings - Fork 1
/
la-pca.asn
193 lines (178 loc) · 8.43 KB
/
la-pca.asn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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
--
-- Copyright 2017, 2018 Crash Avoidance Metrics Partner, VSC5 Consortium
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
-- @namespace Ieee1609Dot2LaPcaInterface
Ieee1609Dot2LaPcaInterface
{iso(1) identified-organization(3) ieee(111)
standards-association-numbered-series-standards(2) wave-stds(1609)
dot2(2) scms(4) interfaces(1) la-pca (10) major-version-2(2)}
DEFINITIONS AUTOMATIC TAGS ::= BEGIN
EXPORTS ALL;
IMPORTS
HashedId8,
Signature,
Time32,
Uint8,
Uint32
FROM IEEE1609dot2BaseTypes {iso(1) identified-organization(3) ieee(111)
standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2)
base(1) base-types(2) major-version-2(2)}
Certificate,
EncryptedData,
RecipientInfo
FROM IEEE1609dot2 {iso(1) identified-organization(3) ieee(111)
standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2)
base(1) schema(1) major-version-2(2)}
ScopedLaPcaError
FROM Ieee1609dot2ScmsError {iso(1) identified-organization(3) ieee(111)
standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2)
scms(4) errors(2) complete(1) major-version-2(2)}
FullSizeHash,
LaHostnameId,
PcaHostnameId
FROM Ieee1609dot2ScmsBaseTypes {iso(1) identified-organization(3) ieee(111)
standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2)
scms(4) interfaces(1) base-types(2) major-version-2(2)}
;
---
-- @brief The LaPcaInterfacePDU is the parent message type for messages sent
-- between Linkage Authority (LA) and Pseudonym Certificate Authority
-- (PCA).
-- @class LaPcaInterfacePDU
-- @param pcaLaKeyAgreementRequest contains the key agreement request sent
-- from PCA to LA.
-- @param laPcaKeyAgreementResponse contains the response to key agreement
-- request. Sent from LA to PCA.
-- @param pcaLaKeyAgreementAck contains the acknowledgement of receipt of
-- response from LA for key agreement.
LaPcaInterfacePDU::= CHOICE {
pcaLaKeyAgreementRequest PcaLaKeyAgreementRequestMsg,
laPcaKeyAgreementResponse LaPcaKeyAgreementResponseMsg,
pcaLaKeyAgreementAck PcaLaKeyAgreementAckMsg,
...
}
---
-- @brief PCA uses this data type to initiate key agreement with an LA.
-- @class PcaLaKeyAgreementRequestMsg
-- @param version contains the current version of the data type. The
-- version specified in this document is version 1,
-- represented by the integer 1.
-- @param pcaId is the unique hostname ID of a PCA.
-- @param pcaCertificate encloses PCA's certificate. This field is optional in
-- the case when LA already has PCA's certificate.
-- @param enc-R-pca is the encrypted data generated by using PCA's random
-- contribution. The encrypted data contains recipient's
-- certificate information.
-- @param recipient the LA's certificate digest info (RecipientInfo has type
-- of PKRecipientInfo, which contains the ID of the LA's
-- certificate and encrypted by ECIES symmetric key
-- Enc(AES_key))
-- @param ciphertext the PCA's encrypted 32-byte contribution R_pca of type
-- PcaRandomContribution. (the random contribution is
-- encrypted by AES_key from RecipientInfo)
-- @param startDate denotes the start date from which the request is
-- valid.
-- @param endDate denotes the end date until which the request in valid.
-- @see Uint8, PcaHostnameId, Certificate, EncryptedData, Time32
PcaLaKeyAgreementRequestMsg ::= SEQUENCE {
version Uint8(1),
pcaId PcaHostnameId,
pcaCertificate Certificate OPTIONAL,
enc-R-pca EncryptedData (WITH COMPONENTS {
recipients (SIZE (1) INTERSECTION (WITH COMPONENT (
RecipientInfo (WITH COMPONENTS {
certRecipInfo -- using hash of the LA certificate
})))),
ciphertext -- when decrypted it contains PcaRandomContribution, R_pca
}),
startDate Time32,
endDate Time32
}
---
-- @brief This data type denotes the 256 bit random number from PCA. It is
-- used to encrypt data while requesting key agreement with an LA by
-- PCA.
-- @class PcaRandomContribution
PcaRandomContribution ::= OCTET STRING (SIZE(32))
---
-- @brief This data type is used by the LA to respond to a
-- PcaLaKeyAgreementRequestMsg from a PCA.
-- @class LaPcaKeyAgreementResponseMsg
--- @param version contains the current version of the data type. The
-- version specified in this document is version 1,
-- represented by the integer 1.
-- @param requestHash is the hash of the original request.
-- @param laId is the unique hostname ID of a LA.
-- @param enc-R-la is the encrypted data generated by using LA's random
-- contribution. The encrypted data contains recipient's
-- certificate information.
-- @param reply in case of no errors in PCA's request, LA responds with
-- a full hash that is computed as follows:
-- MAC_la computed as HMAC(mac_key, R_pca || R_la || "scms-la")
-- where (enc_key, mac_key) = KDF(R_pca || R_la || "scms-la-pca")
-- enc_key is the negotiated symmetric key to be used by LA
-- for PLV encryption. In case of an error, an appropriate
-- error code is sent in the response.
-- @see Uint8, HashedId8, LaHostnameId, EncryptedData, FullSizeHash,
-- ScopedLaPcaError
LaPcaKeyAgreementResponseMsg ::= SEQUENCE {
version Uint8(1),
requestHash HashedId8, -- hash of the original request
laId LaHostnameId,
enc-R-la EncryptedData (WITH COMPONENTS {
recipients (SIZE (1) INTERSECTION (WITH COMPONENT (
RecipientInfo (WITH COMPONENTS {
certRecipInfo -- using hash of the PCA certificate
})))),
ciphertext -- when decrypted it contains LaRandomContribution, R_la
}),
reply CHOICE {
success FullSizeHash,
failure ScopedLaPcaError
}
}
---
-- @brief This data type denotes the 256 bit random number from LA. It is used
-- to encrypt data while reponding to a key agreement request from LA
-- to PCA.
-- @class LaRandomContribution
LaRandomContribution ::= OCTET STRING (SIZE(32))
---
-- @brief This data type is used by the PCA to acknowledge receipt of key
-- agreement response sent by LA.
-- @class PcaLaKeyAgreementAckMsg
--- @param version contains the current version of the data type. The
-- version specified in this document is version 1,
-- represented by the integer 1.
-- @param requestHash is the hash of the original request.
-- @param pcaId is the unique hostname ID of a PCA.
-- @param reply in case of no errors in LA's response, PCA responds with
-- a full hash that is computed as follows:
-- MAC_pca computed as HMAC(mac_key, R_pca || R_la || "scms-pca")
-- where (enc_key, mac_key) = KDF(R_pca || R_la || "scms-la-pca")
-- enc_key is the negotiated symmetric key to be used by
-- PCA for PLV decryption. In the case of an error, an
-- appropriate error code is sent in the acknowledgement.
-- @see Uint8, HashedId8, PcaHostnameId, FullSizeHash, ScopedLaPcaError
PcaLaKeyAgreementAckMsg ::= SEQUENCE {
version Uint8(1),
requestHash HashedId8, -- hash of the initial request
pcaId PcaHostnameId,
reply CHOICE {
success FullSizeHash,
failure ScopedLaPcaError
}
}
END