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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
|
#include "dime/signet/common.h"
#define SKEY_EMPTY { 0, 0, 0, 0, 0, 0, NULL, NULL }
#define SKEY_SIZE1 { 0, 1, 0, 1, 0, UNICODE, NULL, NULL }
#define SKEY_SIZE2 { 0, 1, 0, 2, 0, UNICODE, NULL, NULL }
// {
// .required,
// .unique,
// .bytes_name_size,
// .bytes_data_size,
// .data_size,
// .data_type,
// .name,
// .description
// }
signet_field_key_t
signet_org_field_keys[256] = {
SKEY_EMPTY,
// field 1
{
1, 1, 0, 1, 0, B64,
"Primary-Organizational-Key",
"Primary organizational signing key, also located in the DIME "
"record SIGNET."
},
// field 2
{
0, 0, 0, 1, 0, B64,
"Secondary-Organizational-Key",
"Secondary organizational signing key fields."
},
// field 3
{
1, 1, 0, 2, 0, B64,
"Encryption-Key",
"The ECC public key used to encrypt data sent to the holder "
"of organizational SIGNET holder."
},
// field 4
{
1, 1, 0, 0, ED25519_SIG_SIZE, B64,
"Organizational-Signature",
"ED25519 signature of the previous cryptographic."
},
SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY,
SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY,
// field 16
{
0, 1, 0, 1, 0, UNICODE,
"Name",
"Organization name."
},
// field 17
{
0, 1, 0, 1, 0, UNICODE,
"Address",
"Organization address."
},
// field 18
{
0, 1, 0, 1, 0, UNICODE,
"Province",
"Organization state/province."
},
// field 19
{
0, 1, 0, 1, 0, UNICODE,
"Country",
"Organization country."
},
// field 20
{
0, 1, 0, 1, 0, UNICODE,
"Postal-Code",
"Organization zip or postal code."
},
// field 21
{
0, 0, 0, 1, 0, UNICODE,
"Phone-Number",
"Organization phone number."
},
// field 22
{
0, 1, 0, 1, 0, UNICODE,
"Language",
"Organization language."
},
// field 23
{
0, 1, 0, 1, 0, UNICODE,
"Currency",
"Organization currency."
},
// field 24
{
0, 1, 0, 1, 0, UNICODE,
"Cryptocurrency",
"Organization cryptocurrency."
},
// field 25
{
0, 1, 0, 1, 0, UNICODE,
"Motto",
"Organization motto."
},
// field 26
{
0, 1, 0, 1, 0, UNICODE,
"Extensions",
"Organization Extensions."
},
// field 27
{
0, 1, 0, 1, 0, UNICODE,
"Message-Size-Limit",
"Organization Message-Size-Limit."
},
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
// field 160
{
0, 1, 0, 2, 0, UNICODE,
"Website",
"Organization Website."
},
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
// field 200
{
0, 1, 0, 2, 0, UNICODE,
"Contact-Abuse",
"Address to report service abuse to."
},
// field 201
{
0, 1, 0, 2, 0, UNICODE,
"Contact-Admin",
"Address to contact service admin."
},
// field 202
{
0, 1, 0, 2, 0, UNICODE,
"Contact-Support",
"Address to contact service support."
},
// field 203
{
0, 1, 0, 2, 0, UNICODE,
"Web-Access-Host",
"DNS name of web access hostname which supports HTTPS "
"and provides a webmail access."
},
// field 204
{
0, 1, 0, 2, 0, UNICODE,
"Web-Access-Location",
"HTTPS resource location of the webmail system."
},
// field 205
{
0, 1, 0, 2, 0, UNICODE,
"Web-Access-Certificate",
"Base 64 encoded ed25519 signature of the webmail TLS "
"certificate, may have more than a single signature "
"separated by semicolons."
},
// field 206
{
0, 1, 0, 2, 0, UNICODE,
"Mail-Access-Host",
"DNS name of the mail access hostname which offers connectivity "
"using DMAP."
},
// field 207
{
0, 1, 0, 2, 0, UNICODE,
"Mail-Access-Certificate",
"Base 64 encoded ed25519 signature of the DMAP-supporting mail "
"server's TLS certificate, may have mroe than a single signature "
"separated by semicolons."
},
// field 208
{
0, 1, 0, 2, 0, UNICODE,
"Onion-Access-Host",
"Onion hostname for mail access, a semicolon terminates the "
"hostname string and provides an optional separator."
},
// field 209
{
0, 1, 0, 2, 0, UNICODE,
"Onion-Access-Certificate",
"Base 64 encoded ed25519 signature of the TLS certificate "
"corresponding to the Onion access hostname, a semicolon "
"terminates the signature and provides an optional separator."
},
// field 210
{
0, 1, 0, 2, 0, UNICODE,
"Onion-Delivery-Host",
"Onion hostname for mail delivery, a semicolon terminates "
"the hostname string and provides an optional separator."
},
// field 211
{
0, 1, 0, 2, 0, UNICODE,
"Onion-Delivery-Certificate",
"Base 64 encoded ed25519 signature of the TLS certificate "
"corresponding to the Onion delivery hostname, a semicolon "
"terminates the signature and provides an optional separator."
},
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
// field 251
{
0, 0, 1, 2, 0, UNICODE,
"Undefined-Field",
"Organization undefined field specified by a name."
},
// field 252
{
0, 1, 0, 3, 0, PNG,
"Photo",
"Organization photo."
},
// field 253
{
1, 1, 0, 0, ED25519_SIG_SIZE, B64,
"Organizational-Signature",
"ED25519 signature of all the previous fields signed by "
"the organization POK."
},
// field 254
{
1, 1, 0, 1, 0, UNICODE,
"Signet-Identifier",
"Mail service domain name."
},
// field 255
{
1, 1, 0, 0, ED25519_SIG_SIZE, B64,
"Organizational-Signature",
"ED25519 signature of all the previous fields including "
"the Signet-Identifer field signed by the organization POK."
}
};
// {
// .required,
// .unique,
// .bytes_name_size
// .bytes_data_size,
// .data_size,
// .data_type,
// .name,
// .description
// }
signet_field_key_t
signet_user_field_keys[256] = {
SKEY_EMPTY,
// field 1
{ 1, 1, 0, 1, 0, B64, "Signing-Key", "User signing key." },
// field 2
{
1, 1, 0, 2, 0, B64,
"Encryption-Key",
"User encryption key which is used to encrypt messages to the "
"holder of the user signet."
},
// field 3
{
0, 0, 0, 2, 0, B64,
"Alternate-Encryption-Key",
"Alternative user encryption keys."
},
// field 4
{
0, 1, 0, 0, ED25519_SIG_SIZE, B64,
"Custody",
"The 'Chain-of-custody' Signature. HMAC of the previous fields "
"signed by user's previous private signing key."
},
// field 5
{
1, 1, 0, 0, ED25519_SIG_SIZE, B64,
"User-Signature",
"User's signature and the last field of the User's SSR. HMAC of "
"the previous fields signed by user's private Signing key."
},
// field 6
{
1, 1, 0, 0, ED25519_SIG_SIZE, B64,
"Organizational-Signature",
"HMAC of the fields provided by the user's SSR signed by the "
"Organization's private Signing Key."
},
SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY,
SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY,
// field 16
{ 0, 1, 0, 1, 0, UNICODE, "Name", "User name." },
// field 17
{ 0, 1, 0, 1, 0, UNICODE, "Address", "User address." },
// field 18
{ 0, 1, 0, 1, 0, UNICODE, "Province", "User state/province." },
// field 19
{ 0, 1, 0, 1, 0, UNICODE, "Country", "User country." },
// field 20
{ 0, 1, 0, 1, 0, UNICODE, "Postal-Code", "User zip or postal code." },
// field 21
{ 0, 0, 0, 1, 0, UNICODE, "Phone-Number", "User phone number." },
// field 22
{ 0, 1, 0, 1, 0, UNICODE, "Language", "User language." },
// field 23
{ 0, 1, 0, 1, 0, UNICODE, "Currency", "User currency." },
// field 24
{ 0, 1, 0, 1, 0, UNICODE, "Cryptocurrency", "User cryptocurrency." },
// field 25
{ 0, 1, 0, 1, 0, UNICODE, "Motto", "User motto." },
// field 26
{ 0, 1, 0, 1, 0, UNICODE, "Extensions", "User Extensions." },
// field 27
{ 0, 1, 0, 1, 0, UNICODE, "Message-Size-Limit", "User Message-Size-Limit." },
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
// field 93
{
0, 1, 0, 1, 0, UNICODE,
"Supported-Codecs",
"Semicolon delimited list of optional media codecs supported by user's "
"client, final semicolon is optional."
},
// field 94
{
0, 1, 0, 1, 0, UNICODE,
"Title",
"User's job title and optionally title label delimited by a semicolon."
},
// field 95
{
0, 1, 0, 1, 0, UNICODE,
"Employer",
"User's employer and optionally employer label delimited by a semicolon."
},
// field 96
{
0, 1, 0, 1, 0, UNICODE,
"Gender",
"User's gender and optionally gender label delimited by a semicolon."
},
// field 97
{
0, 1, 0, 1, 0, UNICODE,
"Alma-Mater",
"User's 'alma matter' and optionally 'alma matter' label delimited by "
"a semicolon."
},
// field 98
{
0, 1, 0, 1, 0, UNICODE,
"Supervisor",
"User's supervisor name and optionally supervisor name label delimited "
"by a semicolon."
},
// field 99
{
0, 1, 0, 1, 0, UNICODE,
"Political-Party",
"User's political party and optionally political party label delimited "
"by a semicolon."
},
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1, SKEY_SIZE1,
// field 160
{ 0, 1, 0, 2, 0, UNICODE, "Website", "User Website." },
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
// field 200
{
0, 1, 0, 2, 0, UNICODE,
"Alternate-Address",
"User alternate email address, semicolon used as optional separator."
},
// field 201
{ 0, 1, 0, 2, 0, UNICODE, "Resume", "User resume." },
// field 202
{ 0, 0, 0, 2, 0, UNICODE, "Endorsements", "User endorsements." },
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2, SKEY_SIZE2,
// field 251
{
0, 0, 1, 2, 0, UNICODE,
"Undefined-Field",
"User undefined field specified by a name."
},
// field 252
{ 0, 1, 0, 3, 0, PNG, "Photo", "User photo." },
// field 253
{
1, 1, 0, 0, ED25519_SIG_SIZE, B64,
"Organizational-Signature",
"HMAC of all the previous fields signed by the organization POK."
},
// field 254
{ 1, 1, 0, 1, 0, UNICODE, "Signet-Identifier", "User mail address." },
// field 255
{
1, 1, 0, 0, ED25519_SIG_SIZE, B64,
"Organizational-Signature",
"HMAC of all the previous fields including the Signet-Identifer "
"field signed by the organization POK."
},
};
// {
// .required,
// .unique,
// .bytes_name_size,
// .bytes_data_size,
// .data_size,
// .data_type,
// .name,
// .description
// }
signet_field_key_t
signet_ssr_field_keys[256] = {
SKEY_EMPTY,
// field 1
{ 1, 1, 0, 1, 0, B64, "User-Signing-Key", "User signing key." },
// field 2
{
1, 1, 0, 2, 0, B64,
"User-Encryption-Key",
"User encryption key which is used to encrypt messages to the "
"holder of the user signet."
},
// field 3
{
0, 0, 0, 1, 0, B64,
"Alternate-Encryption-Key",
"Alternative user encryption keys."
},
// field 4
{
0, 1, 0, 0, ED25519_SIG_SIZE, B64,
"Chain-Of-Custody-Signature",
"The 'Chain-of-custody' Signature. HMAC of the previous fields "
"signed by user's previous private signing key."
},
// field 5
{
1, 1, 0, 0, ED25519_SIG_SIZE, B64,
"User-Ssr-Signature",
"User's signature and the last field of the User's SSR. HMAC of "
"the previous fields signed by user's private Signing key."
},
SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY,
SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY,
SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY,
SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY,
SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY,
SKEY_EMPTY, SKEY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Y, SKEY_EMPTY,
SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY,
SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY,
SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY,
SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY,
SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY,
SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY, SKEY_EMPTY
};
/**
* @brief
* Returns a string from a dime_number_t enum type.
* @param number
* Dime number input.
* @return
* Null terminated string corresponding to the dime number.
*/
const char *
dime_number_to_str(dime_number_t number)
{
switch(number) {
case DIME_ORG_SIGNET:
return "organizational signet";
case DIME_USER_SIGNET:
return "user signet";
case DIME_SSR:
return "SSR";
case DIME_ORG_KEYS:
return "organizational signet keychain";
case DIME_USER_KEYS:
return "user signet keychain";
case DIME_MSG_TRACING:
return "message tracing";
case DIME_ENCRYPTED_MSG:
return "encrypted message";
}
return NULL;
}
|