Debian Codegraph @

mlspp/include/mls/messages.h

raw symbols SCIP
1 #cxx . . $ `<file>/mlspp/include/mls/messages.h`/pragma once
2
3 #include "mls/common.h"cxx . . $ `<file>/mlspp/include/mls/common.h`/
4 #include "mls/core_types.h"cxx . . $ `<file>/mlspp/include/mls/core_types.h`/
5 #include "mls/credential.h"cxx . . $ `<file>/mlspp/include/mls/credential.h`/
6 #include "mls/crypto.h"cxx . . $ `<file>/mlspp/include/mls/crypto.h`/
7 #include "mls/treekem.h"cxx . . $ `<file>/mlspp/include/mls/treekem.h`/
8 #include <optional>
9 #include <tls/tls_syntax.h>cxx . . $ `<file>/mlspp/lib/bytes/include/tls/tls_syntax.h`/
10
11 namespace mlsppcxx . . $ mlspp/ {
12
13 struct ExternalPubExtensioncxx . . $ mlspp/ExternalPubExtension#
14 {
15 HPKEPublicKeycxx . . $ mlspp/HPKEPublicKey# external_pubcxx . . $ mlspp/ExternalPubExtension#external_pub.;
16
17 static const uint16_tcxx . . $ uint16_t# typecxx . . $ mlspp/ExternalPubExtension#type.;
18 TLS_SERIALIZABLEcxx . . $ std/(external_pub)
19 };
20
21 struct RatchetTreeExtensioncxx . . $ mlspp/RatchetTreeExtension#
22 {
23 TreeKEMPublicKeycxx . . $ mlspp/TreeKEMPublicKey# treecxx . . $ mlspp/RatchetTreeExtension#tree.;
24
25 static const uint16_tcxx . . $ uint16_t# typecxx . . $ mlspp/RatchetTreeExtension#type.;
26 TLS_SERIALIZABLEcxx . . $ std/(tree)
27 };
28
29 struct ExternalSendercxx . . $ mlspp/ExternalSender#
30 {
31 SignaturePublicKeycxx . . $ mlspp/SignaturePublicKey# signature_keycxx . . $ mlspp/ExternalSender#signature_key.;
32 Credentialcxx . . $ mlspp/Credential# credentialcxx . . $ mlspp/ExternalSender#credential.;
33
34 TLS_SERIALIZABLEcxx . . $ mlspp/ExternalSender#_tls_fields_w(99184c4a1f31366e).(signature_key, credential);
35 };
36
37 struct ExternalSendersExtensioncxx . . $ mlspp/ExternalSendersExtension#
38 {
39 stdcxx . . $ std/::vectorcxx . . $ std/vector#<ExternalSendercxx . . $ mlspp/ExternalSender#> senderscxx . . $ mlspp/ExternalSendersExtension#senders.;
40
41 static const uint16_tcxx . . $ uint16_t# typecxx . . $ mlspp/ExternalSendersExtension#type.;
42 TLS_SERIALIZABLEcxx . . $ std/(senders);
43 };
44
45 struct SFrameParameterscxx . . $ mlspp/SFrameParameters#
46 {
47 uint16_tcxx . . $ uint16_t# cipher_suitecxx . . $ mlspp/SFrameParameters#cipher_suite.;
48 uint8_tcxx . . $ uint8_t# epoch_bitscxx . . $ mlspp/SFrameParameters#epoch_bits.;
49
50 static const uint16_tcxx . . $ uint16_t# typecxx . . $ mlspp/SFrameParameters#type.;
51 TLS_SERIALIZABLEcxx . . $ mlspp/SFrameParameters#_tls_serializable.(cipher_suite, epoch_bits)
52 };
53
54 struct SFrameCapabilitiescxx . . $ mlspp/SFrameCapabilities#
55 {
56 stdcxx . . $ std/::vectorcxx . . $ std/vector#<uint16_tcxx . . $ uint16_t#> cipher_suitescxx . . $ mlspp/SFrameCapabilities#cipher_suites.;
57
58 bool compatiblecxx . . $ mlspp/SFrameCapabilities#compatible(eecd3f1a07cc47fb).(const SFrameParameterscxx . . $ mlspp/SFrameParameters#& params) const;
59
60 static const uint16_tcxx . . $ uint16_t# typecxx . . $ mlspp/SFrameCapabilities#type.;
61 TLS_SERIALIZABLEcxx . . $ mlspp/SFrameCapabilities#_tls_fields_w(fdc0bd1e1b11459).(cipher_suites)
62 };
63
64 ///
65 /// PSKs
66 ///
67 enum struct PSKTypecxx . . $ mlspp/PSKType# : uint8_tcxx . . $ uint8_t#
68 {
69 reservedcxx . . $ mlspp/PSKType#reserved. = 0,
70 externalcxx . . $ mlspp/PSKType#external. = 1,
71 resumptioncxx . . $ mlspp/PSKType#resumption. = 2,
72 };
73
74 struct ExternalPSKcxx . . $ mlspp/ExternalPSK#
75 {
76 bytescxx . . $ mlspp/bytes_ns/bytes# psk_idcxx . . $ mlspp/ExternalPSK#psk_id.;
77 TLS_SERIALIZABLEcxx . . $ mlspp/ExternalPSK#_tls_serializable.(psk_id)
78 };
79
80 enum struct ResumptionPSKUsagecxx . . $ mlspp/ResumptionPSKUsage# : uint8_tcxx . . $ uint8_t#
81 {
82 reservedcxx . . $ mlspp/ResumptionPSKUsage#reserved. = 0,
83 applicationcxx . . $ mlspp/ResumptionPSKUsage#application. = 1,
84 reinitcxx . . $ mlspp/ResumptionPSKUsage#reinit. = 2,
85 branchcxx . . $ mlspp/ResumptionPSKUsage#branch. = 3,
86 };
87
88 struct ResumptionPSKcxx . . $ mlspp/ResumptionPSK#
89 {
90 ResumptionPSKUsagecxx . . $ mlspp/ResumptionPSKUsage# usagecxx . . $ mlspp/ResumptionPSK#usage.;
91 bytescxx . . $ mlspp/bytes_ns/bytes# psk_group_idcxx . . $ mlspp/ResumptionPSK#psk_group_id.;
92 epoch_tcxx . . $ mlspp/epoch_t# psk_epochcxx . . $ mlspp/ResumptionPSK#psk_epoch.;
93 TLS_SERIALIZABLEcxx . . $ mlspp/ResumptionPSK#psk_group_id.(usage, psk_group_id, psk_epoch)
94 };
95
96 struct PreSharedKeyIDcxx . . $ mlspp/PreSharedKeyID#
97 {
98 var::variantcxx . . $ std/variant#<ExternalPSKcxx . . $ mlspp/ExternalPSK#, ResumptionPSKcxx . . $ mlspp/ResumptionPSK#> contentcxx . . $ mlspp/PreSharedKeyID#content.;
99 bytescxx . . $ mlspp/bytes_ns/bytes# psk_noncecxx . . $ mlspp/PreSharedKeyID#psk_nonce.;
100 TLS_SERIALIZABLEcxx . . $ std/(content, psk_nonce)
101 TLS_TRAITScxx . . $ std/(tls::variant<PSKType>, tls::pass)
102 };
103
104 struct PreSharedKeyscxx . . $ mlspp/PreSharedKeys#
105 {
106 stdcxx . . $ std/::vectorcxx . . $ std/vector#<PreSharedKeyIDcxx . . $ mlspp/PreSharedKeyID#> pskscxx . . $ mlspp/PreSharedKeys#psks.;
107 TLS_SERIALIZABLEcxx . . $ mlspp/PreSharedKeys#psks.(psks)
108 };
109
110 struct PSKWithSecretcxx . . $ mlspp/PSKWithSecret#
111 {
112 PreSharedKeyIDcxx . . $ mlspp/PreSharedKeyID# idcxx . . $ mlspp/PSKWithSecret#id.;
113 bytescxx . . $ mlspp/bytes_ns/bytes# secretcxx . . $ mlspp/PSKWithSecret#secret.;
114 };
115
116 // struct {
117 // ProtocolVersion version = mls10;
118 // CipherSuite cipher_suite;
119 // opaque group_id<V>;
120 // uint64 epoch;
121 // opaque tree_hash<V>;
122 // opaque confirmed_transcript_hash<V>;
123 // Extension extensions<V>;
124 // } GroupContext;
125 struct GroupContextcxx . . $ mlspp/GroupContext#
126 {
127 ProtocolVersioncxx . . $ mlspp/ProtocolVersion# versioncxx . . $ mlspp/GroupContext#version.{ ProtocolVersioncxx . . $ mlspp/ProtocolVersion#::mls10cxx . . $ mlspp/ProtocolVersion#mls10. };
128 CipherSuitecxx . . $ mlspp/CipherSuite# cipher_suitecxx . . $ mlspp/GroupContext#cipher_suite.;
129 bytescxx . . $ mlspp/bytes_ns/bytes# group_idcxx . . $ mlspp/GroupContext#group_id.;
130 epoch_tcxx . . $ mlspp/epoch_t# epochcxx . . $ mlspp/GroupContext#epoch.;
131 bytescxx . . $ mlspp/bytes_ns/bytes# tree_hashcxx . . $ mlspp/GroupContext#tree_hash.;
132 bytescxx . . $ mlspp/bytes_ns/bytes# confirmed_transcript_hashcxx . . $ mlspp/GroupContext#confirmed_transcript_hash.;
133 ExtensionListcxx . . $ mlspp/ExtensionList# extensionscxx . . $ mlspp/GroupContext#extensions.;
134
135 GroupContextcxx . . $ mlspp/GroupContext#GroupContext(49f6e7a06ebc5aa8).() = default;
136 GroupContextcxx . . $ mlspp/GroupContext#GroupContext(59c8082fdf1cbc0e).(CipherSuitecxx . . $ mlspp/CipherSuite# cipher_suite_in,
137 bytescxx . . $ mlspp/bytes_ns/bytes# group_id_in,
138 epoch_tcxx . . $ mlspp/epoch_t# epoch_in,
139 bytescxx . . $ mlspp/bytes_ns/bytes# tree_hash_in,
140 bytescxx . . $ mlspp/bytes_ns/bytes# confirmed_transcript_hash_in,
141 ExtensionListcxx . . $ mlspp/ExtensionList# extensions_in);
142
143 TLS_SERIALIZABLEcxx . . $ mlspp/GroupContext#extensions.(version,
144 cipher_suite,
145 group_id,
146 epoch,
147 tree_hash,
148 confirmed_transcript_hash,
149 extensions)
150 };
151
152 // struct {
153 // GroupContext group_context;
154 // Extension extensions<V>;
155 // MAC confirmation_tag;
156 // uint32 signer;
157 // // SignWithLabel(., "GroupInfoTBS", GroupInfoTBS)
158 // opaque signature<V>;
159 // } GroupInfo;
160 struct GroupInfocxx . . $ mlspp/GroupInfo#
161 {
162 GroupContextcxx . . $ mlspp/GroupContext# group_contextcxx . . $ mlspp/GroupInfo#group_context.;
163 ExtensionListcxx . . $ mlspp/ExtensionList# extensionscxx . . $ mlspp/GroupInfo#extensions.;
164 bytescxx . . $ mlspp/bytes_ns/bytes# confirmation_tagcxx . . $ mlspp/GroupInfo#confirmation_tag.;
165 LeafIndexcxx . . $ mlspp/LeafIndex# signercxx . . $ mlspp/GroupInfo#signer.;
166 bytescxx . . $ mlspp/bytes_ns/bytes# signaturecxx . . $ mlspp/GroupInfo#signature.;
167
168 GroupInfocxx . . $ mlspp/GroupInfo#GroupInfo(49f6e7a06ebc5aa8).() = default;
169 GroupInfocxx . . $ mlspp/GroupInfo#GroupInfo(6eefa60eacb8ffcb).(GroupContextcxx . . $ mlspp/GroupContext# group_context_in,
170 ExtensionListcxx . . $ mlspp/ExtensionList# extensions_in,
171 bytescxx . . $ mlspp/bytes_ns/bytes# confirmation_tag_in);
172
173 bytescxx . . $ mlspp/bytes_ns/bytes# to_be_signedcxx . . $ mlspp/GroupInfo#to_be_signed(d7392ba79aa35767).() const;
174 void signcxx . . $ mlspp/GroupInfo#sign(f56bede4ff7e1bef).(const TreeKEMPublicKeycxx . . $ mlspp/TreeKEMPublicKey#& tree,
175 LeafIndexcxx . . $ mlspp/LeafIndex# signer_index,
176 const SignaturePrivateKeycxx . . $ mlspp/SignaturePrivateKey#& priv);
177 bool verifycxx . . $ mlspp/GroupInfo#verify(eaed869e1938a2dc).(const TreeKEMPublicKeycxx . . $ mlspp/TreeKEMPublicKey#& tree) const;
178
179 // These methods exist only to simplify unit testing
180 void signcxx . . $ mlspp/GroupInfo#sign(a62c296173377137).(LeafIndexcxx . . $ mlspp/LeafIndex# signer_index, const SignaturePrivateKeycxx . . $ mlspp/SignaturePrivateKey#& priv);
181 bool verifycxx . . $ mlspp/GroupInfo#verify(9a76ab9c2cdc40ef).(const SignaturePublicKeycxx . . $ mlspp/SignaturePublicKey#& pub) const;
182
183 TLS_SERIALIZABLEcxx . . $ `mlspp/lib/bytes/include/tls/tls_syntax.h:333:9`!(group_context,
184 extensions,
185 confirmation_tag,
186 signer,
187 signature)
188 };
189
190 // struct {
191 // opaque joiner_secret<1..255>;
192 // optional<PathSecret> path_secret;
193 // PreSharedKeys psks;
194 // } GroupSecrets;
195 struct GroupSecretscxx . . $ mlspp/GroupSecrets#
196 {
197 struct PathSecretcxx . . $ mlspp/GroupSecrets#PathSecret#
198 {
199 bytescxx . . $ mlspp/bytes_ns/bytes# secretcxx . . $ mlspp/GroupSecrets#PathSecret#secret.;
200
201 TLS_SERIALIZABLEcxx . . $ mlspp/GroupSecrets#PathSecret#_tls_serializable.(secret)
202 };
203
204 bytescxx . . $ mlspp/bytes_ns/bytes# joiner_secretcxx . . $ mlspp/GroupSecrets#joiner_secret.;
205 stdcxx . . $ std/::optionalcxx . . $ std/optional#<PathSecretcxx . . $ mlspp/GroupSecrets#PathSecret#> path_secretcxx . . $ mlspp/GroupSecrets#path_secret.;
206 PreSharedKeyscxx . . $ mlspp/PreSharedKeys# pskscxx . . $ mlspp/GroupSecrets#psks.;
207
208 TLS_SERIALIZABLEcxx . . $ std/(joiner_secret, path_secret, psks)
209 };
210
211 // struct {
212 // opaque key_package_hash<1..255>;
213 // HPKECiphertext encrypted_group_secrets;
214 // } EncryptedGroupSecrets;
215 struct EncryptedGroupSecretscxx . . $ mlspp/EncryptedGroupSecrets#
216 {
217 KeyPackageRefcxx . . $ mlspp/KeyPackageRef# new_membercxx . . $ mlspp/EncryptedGroupSecrets#new_member.;
218 HPKECiphertextcxx . . $ mlspp/HPKECiphertext# encrypted_group_secretscxx . . $ mlspp/EncryptedGroupSecrets#encrypted_group_secrets.;
219
220 TLS_SERIALIZABLEcxx . . $ `mlspp/lib/bytes/include/tls/tls_syntax.h:333:9`!(new_member, encrypted_group_secrets)
221 };
222
223 // struct {
224 // ProtocolVersion version = mls10;
225 // CipherSuite cipher_suite;
226 // EncryptedGroupSecrets group_secretss<1..2^32-1>;
227 // opaque encrypted_group_info<1..2^32-1>;
228 // } Welcome;
229 struct Welcomecxx . . $ mlspp/Welcome#
230 {
231 CipherSuitecxx . . $ mlspp/CipherSuite# cipher_suitecxx . . $ mlspp/Welcome#cipher_suite.;
232 stdcxx . . $ std/::vectorcxx . . $ std/vector#<EncryptedGroupSecretscxx . . $ mlspp/EncryptedGroupSecrets#> secretscxx . . $ mlspp/Welcome#secrets.;
233 bytescxx . . $ mlspp/bytes_ns/bytes# encrypted_group_infocxx . . $ mlspp/Welcome#encrypted_group_info.;
234
235 Welcomecxx . . $ mlspp/Welcome#Welcome(49f6e7a06ebc5aa8).();
236 Welcomecxx . . $ mlspp/Welcome#Welcome(eaff8aba63a9c6d).(CipherSuitecxx . . $ mlspp/CipherSuite# suite,
237 const bytescxx . . $ mlspp/bytes_ns/bytes#& joiner_secret,
238 const stdcxx . . $ std/::vectorcxx . . $ std/vector#<PSKWithSecretcxx . . $ mlspp/PSKWithSecret#>& psks,
239 const GroupInfocxx . . $ mlspp/GroupInfo#& group_info);
240
241 void encryptcxx . . $ mlspp/Welcome#encrypt(36b3267e5243a5b9).(const KeyPackagecxx . . $ mlspp/KeyPackage#& kp, const stdcxx . . $ std/::optionalcxx . . $ std/optional#<bytescxx . . $ mlspp/bytes_ns/bytes#>& path_secret);
242 stdcxx . . $ std/::optionalcxx . . $ std/optional#<int> findcxx . . $ mlspp/Welcome#find(bb6a8adc8a3815ad).(const KeyPackagecxx . . $ mlspp/KeyPackage#& kp) const;
243 GroupSecretscxx . . $ mlspp/GroupSecrets# decrypt_secretscxx . . $ mlspp/Welcome#decrypt_secrets(829c26bdce94c216).(int kp_index,
244 const HPKEPrivateKeycxx . . $ mlspp/HPKEPrivateKey#& init_priv) const;
245 GroupInfocxx . . $ mlspp/GroupInfo# decryptcxx . . $ mlspp/Welcome#decrypt(81448b52776f14d3).(const bytescxx . . $ mlspp/bytes_ns/bytes#& joiner_secret,
246 const stdcxx . . $ std/::vectorcxx . . $ std/vector#<PSKWithSecretcxx . . $ mlspp/PSKWithSecret#>& psks) const;
247
248 TLS_SERIALIZABLEcxx . . $ mlspp/Welcome#_tls_fields_w(c8b8be67df9e83a1).(cipher_suite, secrets, encrypted_group_info)
249
250 private:
251 bytescxx . . $ mlspp/bytes_ns/bytes# _joiner_secretcxx . . $ mlspp/Welcome#_joiner_secret.;
252 PreSharedKeyscxx . . $ mlspp/PreSharedKeys# _pskscxx . . $ mlspp/Welcome#_psks.;
253 static KeyAndNoncecxx . . $ mlspp/KeyAndNonce# group_info_key_noncecxx . . $ mlspp/Welcome#group_info_key_nonce(6ac639ad95aa0e0f).(
254 CipherSuitecxx . . $ mlspp/CipherSuite# suite,
255 const bytescxx . . $ mlspp/bytes_ns/bytes#& joiner_secret,
256 const stdcxx . . $ std/::vectorcxx . . $ std/vector#<PSKWithSecretcxx . . $ mlspp/PSKWithSecret#>& psks);
257 };
258
259 ///
260 /// Proposals & Commit
261 ///
262
263 // Add
264 struct Addcxx . . $ mlspp/Add#
265 {
266 KeyPackagecxx . . $ mlspp/KeyPackage# key_packagecxx . . $ mlspp/Add#key_package.;
267 TLS_SERIALIZABLEcxx . . $ std/(key_package)
268 };
269
270 // Update
271 struct Updatecxx . . $ mlspp/Update#
272 {
273 LeafNodecxx . . $ mlspp/LeafNode# leaf_nodecxx . . $ mlspp/Update#leaf_node.;
274 TLS_SERIALIZABLEcxx . . $ std/(leaf_node)
275 };
276
277 // Remove
278 struct Removecxx . . $ mlspp/Remove#
279 {
280 LeafIndexcxx . . $ mlspp/LeafIndex# removedcxx . . $ mlspp/Remove#removed.;
281 TLS_SERIALIZABLEcxx . . $ mlspp/Remove#_tls_serializable.(removed)
282 };
283
284 // PreSharedKey
285 struct PreSharedKeycxx . . $ mlspp/PreSharedKey#
286 {
287 PreSharedKeyIDcxx . . $ mlspp/PreSharedKeyID# pskcxx . . $ mlspp/PreSharedKey#psk.;
288 TLS_SERIALIZABLEcxx . . $ mlspp/PreSharedKey#_tls_fields_w(1854aa0b7a5dcc8c).(psk)
289 };
290
291 // ReInit
292 struct ReInitcxx . . $ mlspp/ReInit#
293 {
294 bytescxx . . $ mlspp/bytes_ns/bytes# group_idcxx . . $ mlspp/ReInit#group_id.;
295 ProtocolVersioncxx . . $ mlspp/ProtocolVersion# versioncxx . . $ mlspp/ReInit#version.;
296 CipherSuitecxx . . $ mlspp/CipherSuite# cipher_suitecxx . . $ mlspp/ReInit#cipher_suite.;
297 ExtensionListcxx . . $ mlspp/ExtensionList# extensionscxx . . $ mlspp/ReInit#extensions.;
298
299 TLS_SERIALIZABLEcxx . . $ `mlspp/lib/bytes/include/tls/tls_syntax.h:333:9`!(group_id, version, cipher_suite, extensions)
300 };
301
302 // ExternalInit
303 struct ExternalInitcxx . . $ mlspp/ExternalInit#
304 {
305 bytescxx . . $ mlspp/bytes_ns/bytes# kem_outputcxx . . $ mlspp/ExternalInit#kem_output.;
306 TLS_SERIALIZABLEcxx . . $ mlspp/ExternalInit#_tls_fields_r(27af81d2bc16a160).(kem_output)
307 };
308
309 // GroupContextExtensions
310 struct GroupContextExtensionscxx . . $ mlspp/GroupContextExtensions#
311 {
312 ExtensionListcxx . . $ mlspp/ExtensionList# group_context_extensionscxx . . $ mlspp/GroupContextExtensions#group_context_extensions.;
313 TLS_SERIALIZABLEcxx . . $ `mlspp/lib/bytes/include/tls/tls_syntax.h:333:9`!(group_context_extensions)
314 };
315
316 struct ProposalTypecxx . . $ mlspp/ProposalType#;
317
318 struct Proposalcxx . . $ mlspp/Proposal#
319 {
320 using Typecxx . . $ mlspp/Proposal#Type# = uint16_tcxx . . $ uint16_t#;
321
322 var::variantcxx . . $ std/variant#<Addcxx . . $ mlspp/Add#,
323 Updatecxx . . $ mlspp/Update#,
324 Removecxx . . $ mlspp/Remove#,
325 PreSharedKeycxx . . $ mlspp/PreSharedKey#,
326 ReInitcxx . . $ mlspp/ReInit#,
327 ExternalInitcxx . . $ mlspp/ExternalInit#,
328 GroupContextExtensionscxx . . $ mlspp/GroupContextExtensions#>
329 contentcxx . . $ mlspp/Proposal#content.;
330
331 Typecxx . . $ mlspp/Proposal#Type# proposal_typecxx . . $ mlspp/Proposal#proposal_type(72085aa11f4b6e09).() const;
332
333 TLS_SERIALIZABLEcxx . . $ mlspp/Proposal#_tls_serializable.(content)
334 TLS_TRAITScxx . . $ mlspp/tls/variant#(tls::variant<ProposalType>)
335 };
336
337 struct ProposalTypecxx . . $ mlspp/ProposalType#
338 {
339 static constexpr Proposalcxx . . $ mlspp/Proposal#::Typecxx . . $ mlspp/Proposal#Type# invalidcxx . . $ mlspp/ProposalType#invalid. = 0;
340 static constexpr Proposalcxx . . $ mlspp/Proposal#::Typecxx . . $ mlspp/Proposal#Type# addcxx . . $ mlspp/ProposalType#add. = 1;
341 static constexpr Proposalcxx . . $ mlspp/Proposal#::Typecxx . . $ mlspp/Proposal#Type# updatecxx . . $ mlspp/ProposalType#update. = 2;
342 static constexpr Proposalcxx . . $ mlspp/Proposal#::Typecxx . . $ mlspp/Proposal#Type# removecxx . . $ mlspp/ProposalType#remove. = 3;
343 static constexpr Proposalcxx . . $ mlspp/Proposal#::Typecxx . . $ mlspp/Proposal#Type# pskcxx . . $ mlspp/ProposalType#psk. = 4;
344 static constexpr Proposalcxx . . $ mlspp/Proposal#::Typecxx . . $ mlspp/Proposal#Type# reinitcxx . . $ mlspp/ProposalType#reinit. = 5;
345 static constexpr Proposalcxx . . $ mlspp/Proposal#::Typecxx . . $ mlspp/Proposal#Type# external_initcxx . . $ mlspp/ProposalType#external_init. = 6;
346 static constexpr Proposalcxx . . $ mlspp/Proposal#::Typecxx . . $ mlspp/Proposal#Type# group_context_extensionscxx . . $ mlspp/ProposalType#group_context_extensions. = 7;
347
348 constexpr ProposalTypecxx . . $ mlspp/ProposalType#ProposalType(49f6e7a06ebc5aa8).()
349 : valcxx . . $ mlspp/ProposalType#val.(invalidcxx . . $ mlspp/ProposalType#invalid.)
350 {
351 }
352
353 constexpr ProposalTypecxx . . $ mlspp/ProposalType#ProposalType(ed53e3bbd3fa2f69).(Proposalcxx . . $ mlspp/Proposal#::Typecxx . . $ mlspp/Proposal#Type# pt)
354 : valcxx . . $ mlspp/ProposalType#val.(pt)
355 {
356 }
357
358 Proposalcxx . . $ mlspp/Proposal#::Typecxx . . $ mlspp/Proposal#Type# valcxx . . $ mlspp/ProposalType#val.;
359 TLS_SERIALIZABLEcxx . . $ std/(val)
360 };
361
362 enum struct ProposalOrRefTypecxx . . $ mlspp/ProposalOrRefType# : uint8_tcxx . . $ uint8_t#
363 {
364 reservedcxx . . $ mlspp/ProposalOrRefType#reserved. = 0,
365 valuecxx . . $ mlspp/ProposalOrRefType#value. = 1,
366 referencecxx . . $ mlspp/ProposalOrRefType#reference. = 2,
367 };
368
369 struct ProposalOrRefcxx . . $ mlspp/ProposalOrRef#
370 {
371 var::variantcxx . . $ std/variant#<Proposalcxx . . $ mlspp/Proposal#, ProposalRefcxx . . $ mlspp/ProposalRef#> contentcxx . . $ mlspp/ProposalOrRef#content.;
372
373 TLS_SERIALIZABLEcxx . . $ mlspp/ProposalOrRef#content.(content)
374 TLS_TRAITScxx . . $ mlspp/ProposalOrRef#_tls_has_traits.(tls::variant<ProposalOrRefType>)
375 };
376
377 // struct {
378 // ProposalOrRef proposals<0..2^32-1>;
379 // optional<UpdatePath> path;
380 // } Commit;
381 struct Commitcxx . . $ mlspp/Commit#
382 {
383 stdcxx . . $ std/::vectorcxx . . $ std/vector#<ProposalOrRefcxx . . $ mlspp/ProposalOrRef#> proposalscxx . . $ mlspp/Commit#proposals.;
384 stdcxx . . $ std/::optionalcxx . . $ std/optional#<UpdatePathcxx . . $ mlspp/UpdatePath#> pathcxx . . $ mlspp/Commit#path.;
385
386 // Validate that the commit is acceptable as an external commit, and if so,
387 // produce the public key from the ExternalInit proposal
388 stdcxx . . $ std/::optionalcxx . . $ std/optional#<bytescxx . . $ mlspp/bytes_ns/bytes#> valid_externalcxx . . $ mlspp/Commit#valid_external(82a679487d1deb04).() const;
389
390 TLS_SERIALIZABLEcxx . . $ mlspp/Commit#proposals.(proposals, path)
391 };
392
393 // struct {
394 // opaque group_id<0..255>;
395 // uint32 epoch;
396 // uint32 sender;
397 // ContentType content_type;
398 //
399 // select (PublicMessage.content_type) {
400 // case handshake:
401 // GroupOperation operation;
402 // opaque confirmation<0..255>;
403 //
404 // case application:
405 // opaque application_data<0..2^32-1>;
406 // }
407 //
408 // opaque signature<0..2^16-1>;
409 // } PublicMessage;
410 struct ApplicationDatacxx . . $ mlspp/ApplicationData#
411 {
412 bytescxx . . $ mlspp/bytes_ns/bytes# datacxx . . $ mlspp/ApplicationData#data.;
413 TLS_SERIALIZABLEcxx . . $ std/forward_as_tuple(cd19fb0d9524ec73).(data)
414 };
415
416 struct GroupContextcxx . . $ mlspp/GroupContext#;
417
418 enum struct WireFormatcxx . . $ mlspp/WireFormat# : uint16_tcxx . . $ uint16_t#
419 {
420 reservedcxx . . $ mlspp/WireFormat#reserved. = 0,
421 mls_public_messagecxx . . $ mlspp/WireFormat#mls_public_message. = 1,
422 mls_private_messagecxx . . $ mlspp/WireFormat#mls_private_message. = 2,
423 mls_welcomecxx . . $ mlspp/WireFormat#mls_welcome. = 3,
424 mls_group_infocxx . . $ mlspp/WireFormat#mls_group_info. = 4,
425 mls_key_packagecxx . . $ mlspp/WireFormat#mls_key_package. = 5,
426 };
427
428 enum struct ContentTypecxx . . $ mlspp/ContentType# : uint8_tcxx . . $ uint8_t#
429 {
430 invalidcxx . . $ mlspp/ContentType#invalid. = 0,
431 applicationcxx . . $ mlspp/ContentType#application. = 1,
432 proposalcxx . . $ mlspp/ContentType#proposal. = 2,
433 commitcxx . . $ mlspp/ContentType#commit. = 3,
434 };
435
436 enum struct SenderTypecxx . . $ mlspp/SenderType# : uint8_tcxx . . $ uint8_t#
437 {
438 invalidcxx . . $ mlspp/SenderType#invalid. = 0,
439 membercxx . . $ mlspp/SenderType#member. = 1,
440 externalcxx . . $ mlspp/SenderType#external. = 2,
441 new_member_proposalcxx . . $ mlspp/SenderType#new_member_proposal. = 3,
442 new_member_commitcxx . . $ mlspp/SenderType#new_member_commit. = 4,
443 };
444
445 struct MemberSendercxx . . $ mlspp/MemberSender#
446 {
447 LeafIndexcxx . . $ mlspp/LeafIndex# sendercxx . . $ mlspp/MemberSender#sender.;
448 TLS_SERIALIZABLEcxx . . $ mlspp/MemberSender#sender.(sender);
449 };
450
451 struct ExternalSenderIndexcxx . . $ mlspp/ExternalSenderIndex#
452 {
453 uint32_tcxx . . $ uint32_t# sender_indexcxx . . $ mlspp/ExternalSenderIndex#sender_index.;
454 TLS_SERIALIZABLEcxx . . $ std/forward_as_tuple(cd19fb0d9524ec73).(sender_index)
455 };
456
457 struct NewMemberProposalSendercxx . . $ mlspp/NewMemberProposalSender#
458 {
459 TLS_SERIALIZABLEcxx . . $ std/forward_as_tuple(cd19fb0d9524ec73).()
460 };
461
462 struct NewMemberCommitSendercxx . . $ mlspp/NewMemberCommitSender#
463 {
464 TLS_SERIALIZABLEcxx . . $ mlspp/NewMemberCommitSender#_tls_fields_r(34cf6ce17faf5f13).()
465 };
466
467 struct Sendercxx . . $ mlspp/Sender#
468 {
469 var::variantcxx . . $ std/variant#<MemberSendercxx . . $ mlspp/MemberSender#,
470 ExternalSenderIndexcxx . . $ mlspp/ExternalSenderIndex#,
471 NewMemberProposalSendercxx . . $ mlspp/NewMemberProposalSender#,
472 NewMemberCommitSendercxx . . $ mlspp/NewMemberCommitSender#>
473 sendercxx . . $ mlspp/Sender#sender.;
474
475 SenderTypecxx . . $ mlspp/SenderType# sender_typecxx . . $ mlspp/Sender#sender_type(2a41707803b4ee62).() const;
476
477 TLS_SERIALIZABLEcxx . . $ std/(sender)
478 TLS_TRAITScxx . . $ mlspp/tls/(tls::variant<SenderType>)
479 };
480
481 ///
482 /// MLSMessage and friends
483 ///
484 struct GroupKeySourcecxx . . $ mlspp/GroupKeySource#;
485
486 struct GroupContentcxx . . $ mlspp/GroupContent#
487 {
488 using RawContentcxx . . $ mlspp/GroupContent#RawContent# = var::variantcxx . . $ std/variant#<ApplicationDatacxx . . $ mlspp/ApplicationData#, Proposalcxx . . $ mlspp/Proposal#, Commitcxx . . $ mlspp/Commit#>;
489
490 bytescxx . . $ mlspp/bytes_ns/bytes# group_idcxx . . $ mlspp/GroupContent#group_id.;
491 epoch_tcxx . . $ mlspp/epoch_t# epochcxx . . $ mlspp/GroupContent#epoch.;
492 Sendercxx . . $ mlspp/Sender# sendercxx . . $ mlspp/GroupContent#sender.;
493 bytescxx . . $ mlspp/bytes_ns/bytes# authenticated_datacxx . . $ mlspp/GroupContent#authenticated_data.;
494 RawContentcxx . . $ mlspp/GroupContent#RawContent# contentcxx . . $ mlspp/GroupContent#content.;
495
496 GroupContentcxx . . $ mlspp/GroupContent#GroupContent(49f6e7a06ebc5aa8).() = default;
497 GroupContentcxx . . $ mlspp/GroupContent#GroupContent(f5f370ed8cd561bf).(bytescxx . . $ mlspp/bytes_ns/bytes# group_id_in,
498 epoch_tcxx . . $ mlspp/epoch_t# epoch_in,
499 Sendercxx . . $ mlspp/Sender# sender_in,
500 bytescxx . . $ mlspp/bytes_ns/bytes# authenticated_data_in,
501 RawContentcxx . . $ mlspp/GroupContent#RawContent# content_in);
502 GroupContentcxx . . $ mlspp/GroupContent#GroupContent(b1128e9291071743).(bytescxx . . $ mlspp/bytes_ns/bytes# group_id_in,
503 epoch_tcxx . . $ mlspp/epoch_t# epoch_in,
504 Sendercxx . . $ mlspp/Sender# sender_in,
505 bytescxx . . $ mlspp/bytes_ns/bytes# authenticated_data_in,
506 ContentTypecxx . . $ mlspp/ContentType# content_type);
507
508 ContentTypecxx . . $ mlspp/ContentType# content_typecxx . . $ mlspp/GroupContent#content_type(911b27f74c945772).() const;
509
510 TLS_SERIALIZABLEcxx . . $ mlspp/GroupContent#sender.(group_id, epoch, sender, authenticated_data, content)
511 TLS_TRAITScxx . . $ mlspp/ContentType#(tls::pass,
512 tls::pass,
513 tls::pass,
514 tls::pass,
515 tls::variant<ContentType>)
516 };
517
518 struct GroupContentAuthDatacxx . . $ mlspp/GroupContentAuthData#
519 {
520 ContentTypecxx . . $ mlspp/ContentType# content_typecxx . . $ mlspp/GroupContentAuthData#content_type. = ContentTypecxx . . $ mlspp/ContentType#::invalidcxx . . $ mlspp/ContentType#invalid.;
521 bytescxx . . $ mlspp/bytes_ns/bytes# signaturecxx . . $ mlspp/GroupContentAuthData#signature.;
522 stdcxx . . $ std/::optionalcxx . . $ std/optional#<bytescxx . . $ mlspp/bytes_ns/bytes#> confirmation_tagcxx . . $ mlspp/GroupContentAuthData#confirmation_tag.;
523
524 friend tlscxx . . $ mlspp/tls/::ostreamcxx . . $ mlspp/tls/ostream#& operatorcxx . . $ mlspp/`operator<<`(ec46f4e5e266d437).<<(tlscxx . . $ mlspp/tls/::ostreamcxx . . $ mlspp/tls/ostream#& str,
525 const GroupContentAuthDatacxx . . $ mlspp/GroupContentAuthData#& obj);
526 friend tlscxx . . $ mlspp/tls/::istreamcxx . . $ mlspp/tls/istream#& operatorcxx . . $ mlspp/`operator>>`(63c45ef99cb77536).>>(tlscxx . . $ mlspp/tls/::istreamcxx . . $ mlspp/tls/istream#& str, GroupContentAuthDatacxx . . $ mlspp/GroupContentAuthData#& obj);
527 friend bool operatorcxx . . $ mlspp/`operator==`(5664086339a95c04).==(const GroupContentAuthDatacxx . . $ mlspp/GroupContentAuthData#& lhs,
528 const GroupContentAuthDatacxx . . $ mlspp/GroupContentAuthData#& rhs);
529 };
530
531 struct AuthenticatedContentcxx . . $ mlspp/AuthenticatedContent#
532 {
533 WireFormatcxx . . $ mlspp/WireFormat# wire_formatcxx . . $ mlspp/AuthenticatedContent#wire_format.;
534 GroupContentcxx . . $ mlspp/GroupContent# contentcxx . . $ mlspp/AuthenticatedContent#content.;
535 GroupContentAuthDatacxx . . $ mlspp/GroupContentAuthData# authcxx . . $ mlspp/AuthenticatedContent#auth.;
536
537 AuthenticatedContentcxx . . $ mlspp/AuthenticatedContent#AuthenticatedContent(49f6e7a06ebc5aa8).() = default;
538
539 static AuthenticatedContentcxx . . $ mlspp/AuthenticatedContent# signcxx . . $ mlspp/AuthenticatedContent#sign(6554afcb5b84419).(WireFormatcxx . . $ mlspp/WireFormat# wire_format,
540 GroupContentcxx . . $ mlspp/GroupContent# content,
541 CipherSuitecxx . . $ mlspp/CipherSuite# suite,
542 const SignaturePrivateKeycxx . . $ mlspp/SignaturePrivateKey#& sig_priv,
543 const stdcxx . . $ std/::optionalcxx . . $ std/optional#<GroupContextcxx . . $ mlspp/GroupContext#>& context);
544 bool verifycxx . . $ mlspp/AuthenticatedContent#verify(3653f40ee3caab0a).(CipherSuitecxx . . $ mlspp/CipherSuite# suite,
545 const SignaturePublicKeycxx . . $ mlspp/SignaturePublicKey#& sig_pub,
546 const stdcxx . . $ std/::optionalcxx . . $ std/optional#<GroupContextcxx . . $ mlspp/GroupContext#>& context) const;
547
548 bytescxx . . $ mlspp/bytes_ns/bytes# confirmed_transcript_hash_inputcxx . . $ mlspp/AuthenticatedContent#confirmed_transcript_hash_input(d7392ba79aa35767).() const;
549 bytescxx . . $ mlspp/bytes_ns/bytes# interim_transcript_hash_inputcxx . . $ mlspp/AuthenticatedContent#interim_transcript_hash_input(d7392ba79aa35767).() const;
550
551 void set_confirmation_tagcxx . . $ mlspp/AuthenticatedContent#set_confirmation_tag(68ca607eebb5be3e).(const bytescxx . . $ mlspp/bytes_ns/bytes#& confirmation_tag);
552 bool check_confirmation_tagcxx . . $ mlspp/AuthenticatedContent#check_confirmation_tag(efd4f3c976ab92ce).(const bytescxx . . $ mlspp/bytes_ns/bytes#& confirmation_tag) const;
553
554 friend tlscxx . . $ mlspp/tls/::ostreamcxx . . $ mlspp/tls/ostream#& operatorcxx . . $ mlspp/`operator<<`(3de15628e07b82e2).<<(tlscxx . . $ mlspp/tls/::ostreamcxx . . $ mlspp/tls/ostream#& str,
555 const AuthenticatedContentcxx . . $ mlspp/AuthenticatedContent#& obj);
556 friend tlscxx . . $ mlspp/tls/::istreamcxx . . $ mlspp/tls/istream#& operatorcxx . . $ mlspp/`operator>>`(b28fa0a93aad6ead).>>(tlscxx . . $ mlspp/tls/::istreamcxx . . $ mlspp/tls/istream#& str, AuthenticatedContentcxx . . $ mlspp/AuthenticatedContent#& obj);
557 friend bool operatorcxx . . $ mlspp/`operator==`(1d9eaf42c0eadcee).==(const AuthenticatedContentcxx . . $ mlspp/AuthenticatedContent#& lhs,
558 const AuthenticatedContentcxx . . $ mlspp/AuthenticatedContent#& rhs);
559
560 private:
561 AuthenticatedContentcxx . . $ mlspp/AuthenticatedContent#AuthenticatedContent(6fb0b5b8685f6795).(WireFormatcxx . . $ mlspp/WireFormat# wire_format_in, GroupContentcxx . . $ mlspp/GroupContent# content_in);
562 AuthenticatedContentcxx . . $ mlspp/AuthenticatedContent#AuthenticatedContent(8d87d391e6c7cdab).(WireFormatcxx . . $ mlspp/WireFormat# wire_format_in,
563 GroupContentcxx . . $ mlspp/GroupContent# content_in,
564 GroupContentAuthDatacxx . . $ mlspp/GroupContentAuthData# auth_in);
565
566 bytescxx . . $ mlspp/bytes_ns/bytes# to_be_signedcxx . . $ mlspp/AuthenticatedContent#to_be_signed(7354dd4995a43625).(const stdcxx . . $ std/::optionalcxx . . $ std/optional#<GroupContextcxx . . $ mlspp/GroupContext#>& context) const;
567
568 friend struct PublicMessagecxx . . $ mlspp/PublicMessage#;
569 friend struct PrivateMessagecxx . . $ mlspp/PrivateMessage#;
570 };
571
572 struct ValidatedContentcxx . . $ mlspp/ValidatedContent#
573 {
574 const AuthenticatedContentcxx . . $ mlspp/AuthenticatedContent#& authenticated_contentcxx . . $ mlspp/ValidatedContent#authenticated_content(780253df4e70ffcf).() const;
575
576 friend bool operatorcxx . . $ mlspp/`operator==`(b819a072b6308eef).==(const ValidatedContentcxx . . $ mlspp/ValidatedContent#& lhs,
577 const ValidatedContentcxx . . $ mlspp/ValidatedContent#& rhs);
578
579 private:
580 AuthenticatedContentcxx . . $ mlspp/AuthenticatedContent# content_authcxx . . $ mlspp/ValidatedContent#content_auth.;
581
582 ValidatedContentcxx . . $ mlspp/ValidatedContent#ValidatedContent(4cb5f50ea8a1da54).(AuthenticatedContentcxx . . $ mlspp/AuthenticatedContent# content_auth_in);
583
584 friend struct PublicMessagecxx . . $ mlspp/PublicMessage#;
585 friend struct PrivateMessagecxx . . $ mlspp/PrivateMessage#;
586 friend class Statecxx . . $ mlspp/State#;
587 };
588
589 struct PublicMessagecxx . . $ mlspp/PublicMessage#
590 {
591 PublicMessagecxx . . $ mlspp/PublicMessage#PublicMessage(49f6e7a06ebc5aa8).() = default;
592
593 bytescxx . . $ mlspp/bytes_ns/bytes# get_group_idcxx . . $ mlspp/PublicMessage#get_group_id(d7392ba79aa35767).() const { return contentcxx . . $ mlspp/PublicMessage#content..group_idcxx . . $ mlspp/GroupContent#group_id.; }
594 epoch_tcxx . . $ mlspp/epoch_t# get_epochcxx . . $ mlspp/PublicMessage#get_epoch(fe4d2d262d4164a8).() const { return contentcxx . . $ mlspp/PublicMessage#content..epochcxx . . $ mlspp/GroupContent#epoch.; }
595
596 static PublicMessagecxx . . $ mlspp/PublicMessage# protectcxx . . $ mlspp/PublicMessage#protect(2291e3815af7a859).(AuthenticatedContentcxx . . $ mlspp/AuthenticatedContent# content_auth,
597 CipherSuitecxx . . $ mlspp/CipherSuite# suite,
598 const stdcxx . . $ std/::optionalcxx . . $ std/optional#<bytescxx . . $ mlspp/bytes_ns/bytes#>& membership_key,
599 const stdcxx . . $ std/::optionalcxx . . $ std/optional#<GroupContextcxx . . $ mlspp/GroupContext#>& context);
600 stdcxx . . $ std/::optionalcxx . . $ std/optional#<ValidatedContentcxx . . $ mlspp/ValidatedContent#> unprotectcxx . . $ mlspp/PublicMessage#unprotect(fefd97f134b41226).(
601 CipherSuitecxx . . $ mlspp/CipherSuite# suite,
602 const stdcxx . . $ std/::optionalcxx . . $ std/optional#<bytescxx . . $ mlspp/bytes_ns/bytes#>& membership_key,
603 const stdcxx . . $ std/::optionalcxx . . $ std/optional#<GroupContextcxx . . $ mlspp/GroupContext#>& context) const;
604
605 bool containscxx . . $ mlspp/PublicMessage#contains(891fdc29165d76d0).(const AuthenticatedContentcxx . . $ mlspp/AuthenticatedContent#& content_auth) const;
606
607 // TODO(RLB) Make this private and expose only to tests
608 AuthenticatedContentcxx . . $ mlspp/AuthenticatedContent# authenticated_contentcxx . . $ mlspp/PublicMessage#authenticated_content(a7864a14feee5fc2).() const;
609
610 friend tlscxx . . $ mlspp/tls/::ostreamcxx . . $ mlspp/tls/ostream#& operatorcxx . . $ mlspp/`operator<<`(5abed274187f5cbe).<<(tlscxx . . $ mlspp/tls/::ostreamcxx . . $ mlspp/tls/ostream#& str, const PublicMessagecxx . . $ mlspp/PublicMessage#& obj);
611 friend tlscxx . . $ mlspp/tls/::istreamcxx . . $ mlspp/tls/istream#& operatorcxx . . $ mlspp/`operator>>`(14ee52d4faa317cc).>>(tlscxx . . $ mlspp/tls/::istreamcxx . . $ mlspp/tls/istream#& str, PublicMessagecxx . . $ mlspp/PublicMessage#& obj);
612 friend bool operatorcxx . . $ mlspp/`operator==`(a11265f2657dfb81).==(const PublicMessagecxx . . $ mlspp/PublicMessage#& lhs, const PublicMessagecxx . . $ mlspp/PublicMessage#& rhs);
613 friend bool operatorcxx . . $ mlspp/`operator!=`(a11265f2657dfb81).!=(const PublicMessagecxx . . $ mlspp/PublicMessage#& lhs, const PublicMessagecxx . . $ mlspp/PublicMessage#& rhs);
614
615 private:
616 GroupContentcxx . . $ mlspp/GroupContent# contentcxx . . $ mlspp/PublicMessage#content.;
617 GroupContentAuthDatacxx . . $ mlspp/GroupContentAuthData# authcxx . . $ mlspp/PublicMessage#auth.;
618 stdcxx . . $ std/::optionalcxx . . $ std/optional#<bytescxx . . $ mlspp/bytes_ns/bytes#> membership_tagcxx . . $ mlspp/PublicMessage#membership_tag.;
619
620 PublicMessagecxx . . $ mlspp/PublicMessage#PublicMessage(4cb5f50ea8a1da54).(AuthenticatedContentcxx . . $ mlspp/AuthenticatedContent# content_auth);
621
622 bytescxx . . $ mlspp/bytes_ns/bytes# membership_maccxx . . $ mlspp/PublicMessage#membership_mac(27872dd8c9f4b71a).(CipherSuitecxx . . $ mlspp/CipherSuite# suite,
623 const bytescxx . . $ mlspp/bytes_ns/bytes#& membership_key,
624 const stdcxx . . $ std/::optionalcxx . . $ std/optional#<GroupContextcxx . . $ mlspp/GroupContext#>& context) const;
625 };
626
627 struct PrivateMessagecxx . . $ mlspp/PrivateMessage#
628 {
629 PrivateMessagecxx . . $ mlspp/PrivateMessage#PrivateMessage(ced63f7c635d850d).() = default;
630
631 bytescxx . . $ mlspp/bytes_ns/bytes# get_group_idcxx . . $ mlspp/PrivateMessage#get_group_id(d7392ba79aa35767).() const { return group_idcxx . . $ mlspp/bytes_ns/bytes#bytes(68ca607eebb5be3e).; }
632 epoch_tcxx . . $ mlspp/epoch_t# get_epochcxx . . $ mlspp/PrivateMessage#get_epoch(fe4d2d262d4164a8).() const { return epochcxx . . $ mlspp/PrivateMessage#epoch.; }
633
634 static PrivateMessagecxx . . $ mlspp/PrivateMessage# protectcxx . . $ mlspp/PrivateMessage#protect(5256fdc14bb335a).(AuthenticatedContentcxx . . $ mlspp/AuthenticatedContent# content_auth,
635 CipherSuitecxx . . $ mlspp/CipherSuite# suite,
636 GroupKeySourcecxx . . $ mlspp/GroupKeySource#& keys,
637 const bytescxx . . $ mlspp/bytes_ns/bytes#& sender_data_secret,
638 size_t padding_size);
639 stdcxx . . $ std/::optionalcxx . . $ std/optional#<ValidatedContentcxx . . $ mlspp/ValidatedContent#> unprotectcxx . . $ mlspp/PrivateMessage#unprotect(e57a24405060fb5).(
640 CipherSuitecxx . . $ mlspp/CipherSuite# suite,
641 GroupKeySourcecxx . . $ mlspp/GroupKeySource#& keys,
642 const bytescxx . . $ mlspp/bytes_ns/bytes#& sender_data_secret) const;
643
644 TLS_SERIALIZABLEcxx . . $ `mlspp/lib/bytes/include/tls/tls_syntax.h:333:9`!(group_id,
645 epoch,
646 content_type,
647 authenticated_data,
648 encrypted_sender_data,
649 ciphertext)
650
651 private:
652 bytescxx . . $ mlspp/bytes_ns/bytes# group_idcxx . . $ mlspp/PrivateMessage#group_id.;
653 epoch_tcxx . . $ mlspp/epoch_t# epochcxx . . $ mlspp/PrivateMessage#epoch.;
654 ContentTypecxx . . $ mlspp/ContentType# content_typecxx . . $ mlspp/PrivateMessage#content_type.;
655 bytescxx . . $ mlspp/bytes_ns/bytes# authenticated_datacxx . . $ mlspp/PrivateMessage#authenticated_data.;
656 bytescxx . . $ mlspp/bytes_ns/bytes# encrypted_sender_datacxx . . $ mlspp/PrivateMessage#encrypted_sender_data.;
657 bytescxx . . $ mlspp/bytes_ns/bytes# ciphertextcxx . . $ mlspp/PrivateMessage#ciphertext.;
658
659 PrivateMessagecxx . . $ mlspp/PrivateMessage#PrivateMessage(22a646458d5d0229).(GroupContentcxx . . $ mlspp/GroupContent# content,
660 bytescxx . . $ mlspp/bytes_ns/bytes# encrypted_sender_data_in,
661 bytescxx . . $ mlspp/bytes_ns/bytes# ciphertext_in);
662 };
663
664 struct MLSMessagecxx . . $ mlspp/MLSMessage#
665 {
666 ProtocolVersioncxx . . $ mlspp/ProtocolVersion# versioncxx . . $ mlspp/MLSMessage#version. = ProtocolVersioncxx . . $ mlspp/ProtocolVersion#::mls10cxx . . $ mlspp/ProtocolVersion#mls10.;
667 var::variantcxx . . $ std/variant#<PublicMessagecxx . . $ mlspp/PublicMessage#, PrivateMessagecxx . . $ mlspp/PrivateMessage#, Welcomecxx . . $ mlspp/Welcome#, GroupInfocxx . . $ mlspp/GroupInfo#, KeyPackagecxx . . $ mlspp/KeyPackage#>
668 messagecxx . . $ mlspp/MLSMessage#message.;
669
670 bytescxx . . $ mlspp/bytes_ns/bytes# group_idcxx . . $ mlspp/MLSMessage#group_id(d7392ba79aa35767).() const;
671 epoch_tcxx . . $ mlspp/epoch_t# epochcxx . . $ mlspp/MLSMessage#epoch(fe4d2d262d4164a8).() const;
672 WireFormatcxx . . $ mlspp/WireFormat# wire_formatcxx . . $ mlspp/MLSMessage#wire_format(6821ab1531194d4c).() const;
673
674 MLSMessagecxx . . $ mlspp/MLSMessage#MLSMessage(49f6e7a06ebc5aa8).() = default;
675 MLSMessagecxx . . $ mlspp/MLSMessage#MLSMessage(efba1c00b0eccae9).(PublicMessagecxx . . $ mlspp/PublicMessage# public_message);
676 MLSMessagecxx . . $ mlspp/MLSMessage#MLSMessage(305115f184887e4c).(PrivateMessagecxx . . $ mlspp/PrivateMessage# private_message);
677 MLSMessagecxx . . $ mlspp/MLSMessage#MLSMessage(aeaf1eb64702ea21).(Welcomecxx . . $ mlspp/Welcome# welcome);
678 MLSMessagecxx . . $ mlspp/MLSMessage#MLSMessage(56b4a303122a185a).(GroupInfocxx . . $ mlspp/GroupInfo# group_info);
679 MLSMessagecxx . . $ mlspp/MLSMessage#MLSMessage(559025088f3cfff9).(KeyPackagecxx . . $ mlspp/KeyPackage# key_package);
680
681 TLS_SERIALIZABLEcxx . . $ mlspp/MLSMessage#_tls_serializable.(version, message)
682 TLS_TRAITScxx . . $ mlspp/tls/(tls::pass, tls::variant<WireFormat>)
683 };
684
685 MLSMessagecxx . . $ mlspp/MLSMessage#
686 external_proposalcxx . . $ mlspp/external_proposal(fa83ef3fa85544c0).(CipherSuitecxx . . $ mlspp/CipherSuite# suite,
687 const bytescxx . . $ mlspp/bytes_ns/bytes#& group_id,
688 epoch_tcxx . . $ mlspp/epoch_t# epoch,
689 const Proposalcxx . . $ mlspp/Proposal#& proposal,
690 uint32_tcxx . . $ uint32_t# signer_index,
691 const SignaturePrivateKeycxx . . $ mlspp/SignaturePrivateKey#& sig_priv);
692
693 } // namespace mlspp
694
695 namespace mlsppcxx . . $ mlspp/::tlscxx . . $ mlspp/tls/ {
696
697 TLS_VARIANT_MAPcxx . . $ mlspp/(mlspp::PSKType, mlspp::ExternalPSK, external)
698 TLS_VARIANT_MAPcxx . . $ mlspp/ResumptionPSK#(mlspp::PSKType,
699 mlspp::ResumptionPSK,
700 resumption)
701
702 TLS_VARIANT_MAPcxx . . $ mlspp/(mlspp::ProposalOrRefType,
703 mlspp::Proposal,
704 value)
705 TLS_VARIANT_MAPcxx . . $ mlspp/(mlspp::ProposalOrRefType,
706 mlspp::ProposalRef,
707 reference)
708
709 TLS_VARIANT_MAPcxx . . $ mlspp/tls/variant_map(b18917d71c907128).(mlspp::ProposalType, mlspp::Add, add)
710 TLS_VARIANT_MAPcxx . . $ mlspp/ProposalType#ProposalType(ed53e3bbd3fa2f69).(mlspp::ProposalType, mlspp::Update, update)
711 TLS_VARIANT_MAPcxx . . $ mlspp/Remove#(mlspp::ProposalType, mlspp::Remove, remove)
712 TLS_VARIANT_MAPcxx . . $ mlspp/ProposalType#psk.(mlspp::ProposalType, mlspp::PreSharedKey, psk)
713 TLS_VARIANT_MAPcxx . . $ mlspp/ProposalType#ProposalType(ed53e3bbd3fa2f69).(mlspp::ProposalType, mlspp::ReInit, reinit)
714 TLS_VARIANT_MAPcxx . . $ mlspp/(mlspp::ProposalType,
715 mlspp::ExternalInit,
716 external_init)
717 TLS_VARIANT_MAPcxx . . $ mlspp/ProposalType#ProposalType(ed53e3bbd3fa2f69).(mlspp::ProposalType,
718 mlspp::GroupContextExtensions,
719 group_context_extensions)
720
721 TLS_VARIANT_MAPcxx . . $ mlspp/tls/variant_map(a9fdbdefb35eb0fc).(mlspp::ContentType,
722 mlspp::ApplicationData,
723 application)
724 TLS_VARIANT_MAPcxx . . $ mlspp/ContentType#(mlspp::ContentType, mlspp::Proposal, proposal)
725 TLS_VARIANT_MAPcxx . . $ `mlspp/lib/bytes/include/tls/tls_syntax.h:398:9`!(mlspp::ContentType, mlspp::Commit, commit)
726
727 TLS_VARIANT_MAPcxx . . $ `mlspp/lib/bytes/include/tls/tls_syntax.h:398:9`!(mlspp::SenderType, mlspp::MemberSender, member)
728 TLS_VARIANT_MAPcxx . . $ mlspp/tls/variant_map(910aba2f59a04bf9).(mlspp::SenderType,
729 mlspp::ExternalSenderIndex,
730 external)
731 TLS_VARIANT_MAPcxx . . $ `mlspp/lib/bytes/include/tls/tls_syntax.h:398:9`!(mlspp::SenderType,
732 mlspp::NewMemberProposalSender,
733 new_member_proposal)
734 TLS_VARIANT_MAPcxx . . $ `mlspp/lib/bytes/include/tls/tls_syntax.h:398:9`!(mlspp::SenderType,
735 mlspp::NewMemberCommitSender,
736 new_member_commit)
737
738 TLS_VARIANT_MAPcxx . . $ `mlspp/lib/bytes/include/tls/tls_syntax.h:398:9`!(mlspp::WireFormat,
739 mlspp::PublicMessage,
740 mls_public_message)
741 TLS_VARIANT_MAPcxx . . $ mlspp/WireFormat#mls_private_message.(mlspp::WireFormat,
742 mlspp::PrivateMessage,
743 mls_private_message)
744 TLS_VARIANT_MAPcxx . . $ mlspp/WireFormat#mls_welcome.(mlspp::WireFormat, mlspp::Welcome, mls_welcome)
745 TLS_VARIANT_MAPcxx . . $ mlspp/(mlspp::WireFormat,
746 mlspp::GroupInfo,
747 mls_group_info)
748 TLS_VARIANT_MAPcxx . . $ mlspp/tls/variant_map(af26876b5ab916df).(mlspp::WireFormat,
749 mlspp::KeyPackage,
750 mls_key_package)
751
752 } // namespace mlspp::tls