-
Notifications
You must be signed in to change notification settings - Fork 0
/
otrv4_nobrace.pv.out
2226 lines (1953 loc) · 192 KB
/
otrv4_nobrace.pv.out
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
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Linear part:
ec_mul(x,ec_base(y)) = ec_mul(y,ec_base(x))
Completing equations...
Completed equations:
ec_mul(x,ec_base(y)) = ec_mul(y,ec_base(x))
Convergent part:
Completing equations...
Completed equations:
Process:
{1}new h_a: eddsa_private_key;
{2}let H_a: ec_point = ec_base(eddsa_scalar(h_a)) in
{3}new f_a: ec_scalar;
{4}let F_a: ec_point = ec_base(f_a) in
{5}let cp_a: eddsa_signature = eddsa_sign(h_a,(H_a,F_a)) in
{6}new h_b: eddsa_private_key;
{7}let H_b: ec_point = ec_base(eddsa_scalar(h_b)) in
{8}new f_b: ec_scalar;
{9}let F_b: ec_point = ec_base(f_b) in
{10}let cp_b: eddsa_signature = eddsa_sign(h_b,(H_b,F_b)) in
{11}out(c, (cp_a,cp_b));
{12}new d_a: ec_scalar;
{13}let D_a: ec_point = ec_base(d_a) in
{14}let pkp_a: eddsa_signature = eddsa_sign(h_a,ec_point_as_bits(D_a)) in
{15}new d_b: ec_scalar;
{16}let D_b: ec_point = ec_base(d_b) in
{17}let pkp_b: eddsa_signature = eddsa_sign(h_b,ec_point_as_bits(D_b)) in
{18}out(c, (pkp_a,pkp_b));
(
{19}!
{20}new y_dakez: ec_scalar;
{21}in(c, id_i: identity);
{22}let v_75: bool = (id_i = id_alice) in
(
{23}if v_75 then
(
{24}let (cp_i: eddsa_signature,h_i: eddsa_private_key,F_i: ec_point) = (cp_a,h_a,F_a) in
{25}let Y: ec_point = ec_base(y_dakez) in
{26}out(c, Y);
{27}in(c, sigma_r: ring_signature);
{28}let (=zero,=cp_i,cp_r: eddsa_signature,=Y,X: ec_point,=id_i,id_r: identity) = ring_get_msg(sigma_r) in
{29}let (H_r: ec_point,F_r: ec_point) = eddsa_get_msg(cp_r) in
{30}let (=H_r,=F_r) = eddsa_verify(cp_r,H_r) in
{31}let (=zero,=cp_i,=cp_r,=Y,=X,=id_i,=id_r) = ring_verify(sigma_r,H_r,F_i,Y) in
{32}let t_i: bitstring = (one,cp_i,cp_r,Y,X,id_i,id_r) in
{33}let k_76: bitstring = kdf(usageSharedSecret,ec_point_as_bits(ec_mul(y_dakez,X))) in
{34}event term_dakez_init(id_i,id_r,k_76);
{35}let ssid: bitstring = kdf(usageSSID,k_76) in
{36}out(c, ssid);
{37}let sigma_i: ring_signature = ring_sign(eddsa_scalar(h_i),F_r,X,t_i) in
{38}event accept_dakez_init(id_i,id_r,k_76);
{39}out(c, sigma_i);
{40}out(ac, (fp_dakez_init,kdf(usageFingerprint,eddsa_get_msg(cp_i))));
{41}in(ac, (=fp_dakez_resp,=kdf(usageFingerprint,eddsa_get_msg(cp_r))));
{42}if ((id_r = id_alice) || (id_r = id_bob)) then
{43}event correct_dakez_init;
{44}let k_dakez_init: bitstring = k_76 in
0
)
else
{45}let =true = (id_i = id_bob) in
(
{46}let (cp_i_77: eddsa_signature,h_i_78: eddsa_private_key,F_i_79: ec_point) = (cp_b,h_b,F_b) in
{47}let Y_80: ec_point = ec_base(y_dakez) in
{48}out(c, Y_80);
{49}in(c, sigma_r_81: ring_signature);
{50}let (=zero,=cp_i_77,cp_r_82: eddsa_signature,=Y_80,X_83: ec_point,=id_i,id_r_84: identity) = ring_get_msg(sigma_r_81) in
{51}let (H_r_85: ec_point,F_r_86: ec_point) = eddsa_get_msg(cp_r_82) in
{52}let (=H_r_85,=F_r_86) = eddsa_verify(cp_r_82,H_r_85) in
{53}let (=zero,=cp_i_77,=cp_r_82,=Y_80,=X_83,=id_i,=id_r_84) = ring_verify(sigma_r_81,H_r_85,F_i_79,Y_80) in
{54}let t_i_87: bitstring = (one,cp_i_77,cp_r_82,Y_80,X_83,id_i,id_r_84) in
{55}let k_88: bitstring = kdf(usageSharedSecret,ec_point_as_bits(ec_mul(y_dakez,X_83))) in
{56}event term_dakez_init(id_i,id_r_84,k_88);
{57}let ssid_89: bitstring = kdf(usageSSID,k_88) in
{58}out(c, ssid_89);
{59}let sigma_i_90: ring_signature = ring_sign(eddsa_scalar(h_i_78),F_r_86,X_83,t_i_87) in
{60}event accept_dakez_init(id_i,id_r_84,k_88);
{61}out(c, sigma_i_90);
{62}out(ac, (fp_dakez_init,kdf(usageFingerprint,eddsa_get_msg(cp_i_77))));
{63}in(ac, (=fp_dakez_resp,=kdf(usageFingerprint,eddsa_get_msg(cp_r_82))));
{64}if ((id_r_84 = id_alice) || (id_r_84 = id_bob)) then
{65}event correct_dakez_init;
{66}let k_dakez_init_91: bitstring = k_88 in
0
)
else
{67}let (cp_i_92: eddsa_signature,h_i_93: eddsa_private_key,F_i_94: ec_point) = fail-bitstring in
{68}let Y_95: ec_point = ec_base(y_dakez) in
{69}out(c, Y_95);
{70}in(c, sigma_r_96: ring_signature);
{71}let (=zero,=cp_i_92,cp_r_97: eddsa_signature,=Y_95,X_98: ec_point,=id_i,id_r_99: identity) = ring_get_msg(sigma_r_96) in
{72}let (H_r_100: ec_point,F_r_101: ec_point) = eddsa_get_msg(cp_r_97) in
{73}let (=H_r_100,=F_r_101) = eddsa_verify(cp_r_97,H_r_100) in
{74}let (=zero,=cp_i_92,=cp_r_97,=Y_95,=X_98,=id_i,=id_r_99) = ring_verify(sigma_r_96,H_r_100,F_i_94,Y_95) in
{75}let t_i_102: bitstring = (one,cp_i_92,cp_r_97,Y_95,X_98,id_i,id_r_99) in
{76}let k_103: bitstring = kdf(usageSharedSecret,ec_point_as_bits(ec_mul(y_dakez,X_98))) in
{77}event term_dakez_init(id_i,id_r_99,k_103);
{78}let ssid_104: bitstring = kdf(usageSSID,k_103) in
{79}out(c, ssid_104);
{80}let sigma_i_105: ring_signature = ring_sign(eddsa_scalar(h_i_93),F_r_101,X_98,t_i_102) in
{81}event accept_dakez_init(id_i,id_r_99,k_103);
{82}out(c, sigma_i_105);
{83}out(ac, (fp_dakez_init,kdf(usageFingerprint,eddsa_get_msg(cp_i_92))));
{84}in(ac, (=fp_dakez_resp,=kdf(usageFingerprint,eddsa_get_msg(cp_r_97))));
{85}if ((id_r_99 = id_alice) || (id_r_99 = id_bob)) then
{86}event correct_dakez_init;
{87}let k_dakez_init_106: bitstring = k_103 in
0
)
else
{88}let (cp_i_107: eddsa_signature,h_i_108: eddsa_private_key,F_i_109: ec_point) = fail-bitstring in
{89}let Y_110: ec_point = ec_base(y_dakez) in
{90}out(c, Y_110);
{91}in(c, sigma_r_111: ring_signature);
{92}let (=zero,=cp_i_107,cp_r_112: eddsa_signature,=Y_110,X_113: ec_point,=id_i,id_r_114: identity) = ring_get_msg(sigma_r_111) in
{93}let (H_r_115: ec_point,F_r_116: ec_point) = eddsa_get_msg(cp_r_112) in
{94}let (=H_r_115,=F_r_116) = eddsa_verify(cp_r_112,H_r_115) in
{95}let (=zero,=cp_i_107,=cp_r_112,=Y_110,=X_113,=id_i,=id_r_114) = ring_verify(sigma_r_111,H_r_115,F_i_109,Y_110) in
{96}let t_i_117: bitstring = (one,cp_i_107,cp_r_112,Y_110,X_113,id_i,id_r_114) in
{97}let k_118: bitstring = kdf(usageSharedSecret,ec_point_as_bits(ec_mul(y_dakez,X_113))) in
{98}event term_dakez_init(id_i,id_r_114,k_118);
{99}let ssid_119: bitstring = kdf(usageSSID,k_118) in
{100}out(c, ssid_119);
{101}let sigma_i_120: ring_signature = ring_sign(eddsa_scalar(h_i_108),F_r_116,X_113,t_i_117) in
{102}event accept_dakez_init(id_i,id_r_114,k_118);
{103}out(c, sigma_i_120);
{104}out(ac, (fp_dakez_init,kdf(usageFingerprint,eddsa_get_msg(cp_i_107))));
{105}in(ac, (=fp_dakez_resp,=kdf(usageFingerprint,eddsa_get_msg(cp_r_112))));
{106}if ((id_r_114 = id_alice) || (id_r_114 = id_bob)) then
{107}event correct_dakez_init;
{108}let k_dakez_init_121: bitstring = k_118 in
0
) | (
{109}!
{110}new x_dakez: ec_scalar;
{111}in(c, id_r_122: identity);
{112}let v_123: bool = (id_r_122 = id_alice) in
(
{113}if v_123 then
(
{114}let (cp_r_124: eddsa_signature,h_r: eddsa_private_key,F_r_125: ec_point) = (cp_a,h_a,F_a) in
{115}in(c, (id_i_126: identity,cp_i_127: eddsa_signature,Y_128: ec_point));
{116}let (H_i: ec_point,F_i_129: ec_point) = eddsa_get_msg(cp_i_127) in
{117}let (=H_i,=F_i_129) = eddsa_verify(cp_i_127,H_i) in
{118}let X_130: ec_point = ec_base(x_dakez) in
{119}let t_r: bitstring = (zero,cp_i_127,cp_r_124,Y_128,X_130,id_i_126,id_r_122) in
{120}let k_131: bitstring = kdf(usageSharedSecret,ec_point_as_bits(ec_mul(x_dakez,Y_128))) in
{121}let ssid_132: bitstring = kdf(usageSSID,k_131) in
{122}out(c, ssid_132);
{123}let sigma_r_133: ring_signature = ring_sign(eddsa_scalar(h_r),F_i_129,Y_128,t_r) in
{124}event accept_dakez_resp(id_i_126,id_r_122,k_131);
{125}out(c, sigma_r_133);
{126}in(c, sigma_i_134: ring_signature);
{127}let (=one,=cp_i_127,=cp_r_124,=Y_128,=X_130,=id_i_126,=id_r_122) = ring_verify(sigma_i_134,H_i,F_r_125,X_130) in
{128}event term_dakez_resp(id_i_126,id_r_122,k_131);
{129}in(ac, (=fp_dakez_init,=kdf(usageFingerprint,eddsa_get_msg(cp_i_127))));
{130}out(ac, (fp_dakez_resp,kdf(usageFingerprint,eddsa_get_msg(cp_r_124))));
{131}if ((id_i_126 = id_alice) || (id_i_126 = id_bob)) then
{132}event correct_dakez_resp;
{133}let k_dakez_resp: bitstring = k_131 in
0
)
else
{134}let =true = (id_r_122 = id_bob) in
(
{135}let (cp_r_135: eddsa_signature,h_r_136: eddsa_private_key,F_r_137: ec_point) = (cp_b,h_b,F_b) in
{136}in(c, (id_i_138: identity,cp_i_139: eddsa_signature,Y_140: ec_point));
{137}let (H_i_141: ec_point,F_i_142: ec_point) = eddsa_get_msg(cp_i_139) in
{138}let (=H_i_141,=F_i_142) = eddsa_verify(cp_i_139,H_i_141) in
{139}let X_143: ec_point = ec_base(x_dakez) in
{140}let t_r_144: bitstring = (zero,cp_i_139,cp_r_135,Y_140,X_143,id_i_138,id_r_122) in
{141}let k_145: bitstring = kdf(usageSharedSecret,ec_point_as_bits(ec_mul(x_dakez,Y_140))) in
{142}let ssid_146: bitstring = kdf(usageSSID,k_145) in
{143}out(c, ssid_146);
{144}let sigma_r_147: ring_signature = ring_sign(eddsa_scalar(h_r_136),F_i_142,Y_140,t_r_144) in
{145}event accept_dakez_resp(id_i_138,id_r_122,k_145);
{146}out(c, sigma_r_147);
{147}in(c, sigma_i_148: ring_signature);
{148}let (=one,=cp_i_139,=cp_r_135,=Y_140,=X_143,=id_i_138,=id_r_122) = ring_verify(sigma_i_148,H_i_141,F_r_137,X_143) in
{149}event term_dakez_resp(id_i_138,id_r_122,k_145);
{150}in(ac, (=fp_dakez_init,=kdf(usageFingerprint,eddsa_get_msg(cp_i_139))));
{151}out(ac, (fp_dakez_resp,kdf(usageFingerprint,eddsa_get_msg(cp_r_135))));
{152}if ((id_i_138 = id_alice) || (id_i_138 = id_bob)) then
{153}event correct_dakez_resp;
{154}let k_dakez_resp_149: bitstring = k_145 in
0
)
else
{155}let (cp_r_150: eddsa_signature,h_r_151: eddsa_private_key,F_r_152: ec_point) = fail-bitstring in
{156}in(c, (id_i_153: identity,cp_i_154: eddsa_signature,Y_155: ec_point));
{157}let (H_i_156: ec_point,F_i_157: ec_point) = eddsa_get_msg(cp_i_154) in
{158}let (=H_i_156,=F_i_157) = eddsa_verify(cp_i_154,H_i_156) in
{159}let X_158: ec_point = ec_base(x_dakez) in
{160}let t_r_159: bitstring = (zero,cp_i_154,cp_r_150,Y_155,X_158,id_i_153,id_r_122) in
{161}let k_160: bitstring = kdf(usageSharedSecret,ec_point_as_bits(ec_mul(x_dakez,Y_155))) in
{162}let ssid_161: bitstring = kdf(usageSSID,k_160) in
{163}out(c, ssid_161);
{164}let sigma_r_162: ring_signature = ring_sign(eddsa_scalar(h_r_151),F_i_157,Y_155,t_r_159) in
{165}event accept_dakez_resp(id_i_153,id_r_122,k_160);
{166}out(c, sigma_r_162);
{167}in(c, sigma_i_163: ring_signature);
{168}let (=one,=cp_i_154,=cp_r_150,=Y_155,=X_158,=id_i_153,=id_r_122) = ring_verify(sigma_i_163,H_i_156,F_r_152,X_158) in
{169}event term_dakez_resp(id_i_153,id_r_122,k_160);
{170}in(ac, (=fp_dakez_init,=kdf(usageFingerprint,eddsa_get_msg(cp_i_154))));
{171}out(ac, (fp_dakez_resp,kdf(usageFingerprint,eddsa_get_msg(cp_r_150))));
{172}if ((id_i_153 = id_alice) || (id_i_153 = id_bob)) then
{173}event correct_dakez_resp;
{174}let k_dakez_resp_164: bitstring = k_160 in
0
)
else
{175}let (cp_r_165: eddsa_signature,h_r_166: eddsa_private_key,F_r_167: ec_point) = fail-bitstring in
{176}in(c, (id_i_168: identity,cp_i_169: eddsa_signature,Y_170: ec_point));
{177}let (H_i_171: ec_point,F_i_172: ec_point) = eddsa_get_msg(cp_i_169) in
{178}let (=H_i_171,=F_i_172) = eddsa_verify(cp_i_169,H_i_171) in
{179}let X_173: ec_point = ec_base(x_dakez) in
{180}let t_r_174: bitstring = (zero,cp_i_169,cp_r_165,Y_170,X_173,id_i_168,id_r_122) in
{181}let k_175: bitstring = kdf(usageSharedSecret,ec_point_as_bits(ec_mul(x_dakez,Y_170))) in
{182}let ssid_176: bitstring = kdf(usageSSID,k_175) in
{183}out(c, ssid_176);
{184}let sigma_r_177: ring_signature = ring_sign(eddsa_scalar(h_r_166),F_i_172,Y_170,t_r_174) in
{185}event accept_dakez_resp(id_i_168,id_r_122,k_175);
{186}out(c, sigma_r_177);
{187}in(c, sigma_i_178: ring_signature);
{188}let (=one,=cp_i_169,=cp_r_165,=Y_170,=X_173,=id_i_168,=id_r_122) = ring_verify(sigma_i_178,H_i_171,F_r_167,X_173) in
{189}event term_dakez_resp(id_i_168,id_r_122,k_175);
{190}in(ac, (=fp_dakez_init,=kdf(usageFingerprint,eddsa_get_msg(cp_i_169))));
{191}out(ac, (fp_dakez_resp,kdf(usageFingerprint,eddsa_get_msg(cp_r_165))));
{192}if ((id_i_168 = id_alice) || (id_i_168 = id_bob)) then
{193}event correct_dakez_resp;
{194}let k_dakez_resp_179: bitstring = k_175 in
0
) | (
{195}!
{196}new y_xzdh: ec_scalar;
{197}in(c, id_i_180: identity);
{198}let v_181: bool = (id_i_180 = id_alice) in
(
{199}if v_181 then
(
{200}let (cp_i_182: eddsa_signature,h_i_183: eddsa_private_key,F_i_184: ec_point,d: ec_scalar) = (cp_a,h_a,F_a,d_a) in
{201}let Y_185: ec_point = ec_base(y_xzdh) in
{202}out(c, Y_185);
{203}in(c, (sigma: ring_signature,xzdh_mac: bitstring));
{204}let t: bitstring = ring_get_msg(sigma) in
{205}let (=cp_i_182,cp_r_186: eddsa_signature,=Y_185,X_187: ec_point,=ec_base(d),=id_i_180,id_r_188: identity) = t in
{206}let (H_r_189: ec_point,F_r_190: ec_point) = eddsa_get_msg(cp_r_186) in
{207}let (=H_r_189,=F_r_190) = eddsa_verify(cp_r_186,H_r_189) in
{208}let (=cp_i_182,=cp_r_186,=Y_185,=X_187,=ec_base(d),=id_i_180,=id_r_188) = ring_verify(sigma,H_r_189,F_i_184,Y_185) in
{209}let k_tmp: bitstring = kdf(usageTmpKey,(ec_mul(y_xzdh,X_187),ec_mul(d,X_187),ec_mul(eddsa_scalar(h_i_183),X_187))) in
{210}let xzdh_mac_key: bitstring = kdf(usageAuthMACKey,k_tmp) in
{211}if (xzdh_mac = kdf(usageAuthMAC,(xzdh_mac_key,t))) then
{212}let k_191: bitstring = kdf(usageSharedSecret,k_tmp) in
{213}let ssid_192: bitstring = kdf(usageSSID,k_191) in
{214}out(c, ssid_192);
{215}event term_xzdh_init(id_i_180,id_r_188,k_191);
{216}out(ac, (fp_xzdh_init,kdf(usageFingerprint,eddsa_get_msg(cp_i_182))));
{217}in(ac, (=fp_xzdh_resp,=kdf(usageFingerprint,eddsa_get_msg(cp_r_186))));
{218}if ((id_r_188 = id_alice) || (id_r_188 = id_bob)) then
{219}event correct_xzdh_init;
{220}let k_xzdh_init: bitstring = k_191 in
0
)
else
{221}let =true = (id_i_180 = id_bob) in
(
{222}let (cp_i_193: eddsa_signature,h_i_194: eddsa_private_key,F_i_195: ec_point,d_196: ec_scalar) = (cp_b,h_b,F_b,d_b) in
{223}let Y_197: ec_point = ec_base(y_xzdh) in
{224}out(c, Y_197);
{225}in(c, (sigma_198: ring_signature,xzdh_mac_199: bitstring));
{226}let t_200: bitstring = ring_get_msg(sigma_198) in
{227}let (=cp_i_193,cp_r_201: eddsa_signature,=Y_197,X_202: ec_point,=ec_base(d_196),=id_i_180,id_r_203: identity) = t_200 in
{228}let (H_r_204: ec_point,F_r_205: ec_point) = eddsa_get_msg(cp_r_201) in
{229}let (=H_r_204,=F_r_205) = eddsa_verify(cp_r_201,H_r_204) in
{230}let (=cp_i_193,=cp_r_201,=Y_197,=X_202,=ec_base(d_196),=id_i_180,=id_r_203) = ring_verify(sigma_198,H_r_204,F_i_195,Y_197) in
{231}let k_tmp_206: bitstring = kdf(usageTmpKey,(ec_mul(y_xzdh,X_202),ec_mul(d_196,X_202),ec_mul(eddsa_scalar(h_i_194),X_202))) in
{232}let xzdh_mac_key_207: bitstring = kdf(usageAuthMACKey,k_tmp_206) in
{233}if (xzdh_mac_199 = kdf(usageAuthMAC,(xzdh_mac_key_207,t_200))) then
{234}let k_208: bitstring = kdf(usageSharedSecret,k_tmp_206) in
{235}let ssid_209: bitstring = kdf(usageSSID,k_208) in
{236}out(c, ssid_209);
{237}event term_xzdh_init(id_i_180,id_r_203,k_208);
{238}out(ac, (fp_xzdh_init,kdf(usageFingerprint,eddsa_get_msg(cp_i_193))));
{239}in(ac, (=fp_xzdh_resp,=kdf(usageFingerprint,eddsa_get_msg(cp_r_201))));
{240}if ((id_r_203 = id_alice) || (id_r_203 = id_bob)) then
{241}event correct_xzdh_init;
{242}let k_xzdh_init_210: bitstring = k_208 in
0
)
else
{243}let (cp_i_211: eddsa_signature,h_i_212: eddsa_private_key,F_i_213: ec_point,d_214: ec_scalar) = fail-bitstring in
{244}let Y_215: ec_point = ec_base(y_xzdh) in
{245}out(c, Y_215);
{246}in(c, (sigma_216: ring_signature,xzdh_mac_217: bitstring));
{247}let t_218: bitstring = ring_get_msg(sigma_216) in
{248}let (=cp_i_211,cp_r_219: eddsa_signature,=Y_215,X_220: ec_point,=ec_base(d_214),=id_i_180,id_r_221: identity) = t_218 in
{249}let (H_r_222: ec_point,F_r_223: ec_point) = eddsa_get_msg(cp_r_219) in
{250}let (=H_r_222,=F_r_223) = eddsa_verify(cp_r_219,H_r_222) in
{251}let (=cp_i_211,=cp_r_219,=Y_215,=X_220,=ec_base(d_214),=id_i_180,=id_r_221) = ring_verify(sigma_216,H_r_222,F_i_213,Y_215) in
{252}let k_tmp_224: bitstring = kdf(usageTmpKey,(ec_mul(y_xzdh,X_220),ec_mul(d_214,X_220),ec_mul(eddsa_scalar(h_i_212),X_220))) in
{253}let xzdh_mac_key_225: bitstring = kdf(usageAuthMACKey,k_tmp_224) in
{254}if (xzdh_mac_217 = kdf(usageAuthMAC,(xzdh_mac_key_225,t_218))) then
{255}let k_226: bitstring = kdf(usageSharedSecret,k_tmp_224) in
{256}let ssid_227: bitstring = kdf(usageSSID,k_226) in
{257}out(c, ssid_227);
{258}event term_xzdh_init(id_i_180,id_r_221,k_226);
{259}out(ac, (fp_xzdh_init,kdf(usageFingerprint,eddsa_get_msg(cp_i_211))));
{260}in(ac, (=fp_xzdh_resp,=kdf(usageFingerprint,eddsa_get_msg(cp_r_219))));
{261}if ((id_r_221 = id_alice) || (id_r_221 = id_bob)) then
{262}event correct_xzdh_init;
{263}let k_xzdh_init_228: bitstring = k_226 in
0
)
else
{264}let (cp_i_229: eddsa_signature,h_i_230: eddsa_private_key,F_i_231: ec_point,d_232: ec_scalar) = fail-bitstring in
{265}let Y_233: ec_point = ec_base(y_xzdh) in
{266}out(c, Y_233);
{267}in(c, (sigma_234: ring_signature,xzdh_mac_235: bitstring));
{268}let t_236: bitstring = ring_get_msg(sigma_234) in
{269}let (=cp_i_229,cp_r_237: eddsa_signature,=Y_233,X_238: ec_point,=ec_base(d_232),=id_i_180,id_r_239: identity) = t_236 in
{270}let (H_r_240: ec_point,F_r_241: ec_point) = eddsa_get_msg(cp_r_237) in
{271}let (=H_r_240,=F_r_241) = eddsa_verify(cp_r_237,H_r_240) in
{272}let (=cp_i_229,=cp_r_237,=Y_233,=X_238,=ec_base(d_232),=id_i_180,=id_r_239) = ring_verify(sigma_234,H_r_240,F_i_231,Y_233) in
{273}let k_tmp_242: bitstring = kdf(usageTmpKey,(ec_mul(y_xzdh,X_238),ec_mul(d_232,X_238),ec_mul(eddsa_scalar(h_i_230),X_238))) in
{274}let xzdh_mac_key_243: bitstring = kdf(usageAuthMACKey,k_tmp_242) in
{275}if (xzdh_mac_235 = kdf(usageAuthMAC,(xzdh_mac_key_243,t_236))) then
{276}let k_244: bitstring = kdf(usageSharedSecret,k_tmp_242) in
{277}let ssid_245: bitstring = kdf(usageSSID,k_244) in
{278}out(c, ssid_245);
{279}event term_xzdh_init(id_i_180,id_r_239,k_244);
{280}out(ac, (fp_xzdh_init,kdf(usageFingerprint,eddsa_get_msg(cp_i_229))));
{281}in(ac, (=fp_xzdh_resp,=kdf(usageFingerprint,eddsa_get_msg(cp_r_237))));
{282}if ((id_r_239 = id_alice) || (id_r_239 = id_bob)) then
{283}event correct_xzdh_init;
{284}let k_xzdh_init_246: bitstring = k_244 in
0
) | (
{285}!
{286}new x_xzdh: ec_scalar;
{287}in(c, id_r_247: identity);
{288}let v_248: bool = (id_r_247 = id_alice) in
(
{289}if v_248 then
(
{290}let (cp_r_249: eddsa_signature,h_r_250: eddsa_private_key) = (cp_a,h_a) in
{291}in(c, (id_i_251: identity,cp_i_252: eddsa_signature,pkp: eddsa_signature,Y_253: ec_point));
{292}let (H_i_254: ec_point,F_i_255: ec_point) = eddsa_get_msg(cp_i_252) in
{293}let (=H_i_254,=F_i_255) = eddsa_verify(cp_i_252,H_i_254) in
{294}let ec_point_as_bits(D: ec_point) = eddsa_verify(pkp,H_i_254) in
{295}let X_256: ec_point = ec_base(x_xzdh) in
{296}let k_tmp_257: bitstring = kdf(usageTmpKey,(ec_mul(x_xzdh,Y_253),ec_mul(x_xzdh,D),ec_mul(x_xzdh,H_i_254))) in
{297}let t_258: bitstring = (cp_i_252,cp_r_249,Y_253,X_256,D,id_i_251,id_r_247) in
{298}let k_259: bitstring = kdf(usageSharedSecret,k_tmp_257) in
{299}let ssid_260: bitstring = kdf(usageSSID,k_259) in
{300}out(c, ssid_260);
{301}let sigma_261: ring_signature = ring_sign(eddsa_scalar(h_r_250),F_i_255,Y_253,t_258) in
{302}let xzdh_mac_key_262: bitstring = kdf(usageAuthMACKey,k_tmp_257) in
{303}let xzdh_mac_263: bitstring = kdf(usageAuthMAC,(xzdh_mac_key_262,t_258)) in
{304}event accept_xzdh_resp(id_i_251,id_r_247,k_259);
{305}out(c, (sigma_261,xzdh_mac_263));
{306}in(ac, (=fp_xzdh_init,=kdf(usageFingerprint,eddsa_get_msg(cp_i_252))));
{307}out(ac, (fp_xzdh_resp,kdf(usageFingerprint,eddsa_get_msg(cp_r_249))));
{308}if ((id_i_251 = id_alice) || (id_i_251 = id_bob)) then
{309}event correct_xzdh_resp;
{310}out(c, enc(k_259,k_xzdh_resp))
)
else
{311}let =true = (id_r_247 = id_bob) in
(
{312}let (cp_r_264: eddsa_signature,h_r_265: eddsa_private_key) = (cp_b,h_b) in
{313}in(c, (id_i_266: identity,cp_i_267: eddsa_signature,pkp_268: eddsa_signature,Y_269: ec_point));
{314}let (H_i_270: ec_point,F_i_271: ec_point) = eddsa_get_msg(cp_i_267) in
{315}let (=H_i_270,=F_i_271) = eddsa_verify(cp_i_267,H_i_270) in
{316}let ec_point_as_bits(D_272: ec_point) = eddsa_verify(pkp_268,H_i_270) in
{317}let X_273: ec_point = ec_base(x_xzdh) in
{318}let k_tmp_274: bitstring = kdf(usageTmpKey,(ec_mul(x_xzdh,Y_269),ec_mul(x_xzdh,D_272),ec_mul(x_xzdh,H_i_270))) in
{319}let t_275: bitstring = (cp_i_267,cp_r_264,Y_269,X_273,D_272,id_i_266,id_r_247) in
{320}let k_276: bitstring = kdf(usageSharedSecret,k_tmp_274) in
{321}let ssid_277: bitstring = kdf(usageSSID,k_276) in
{322}out(c, ssid_277);
{323}let sigma_278: ring_signature = ring_sign(eddsa_scalar(h_r_265),F_i_271,Y_269,t_275) in
{324}let xzdh_mac_key_279: bitstring = kdf(usageAuthMACKey,k_tmp_274) in
{325}let xzdh_mac_280: bitstring = kdf(usageAuthMAC,(xzdh_mac_key_279,t_275)) in
{326}event accept_xzdh_resp(id_i_266,id_r_247,k_276);
{327}out(c, (sigma_278,xzdh_mac_280));
{328}in(ac, (=fp_xzdh_init,=kdf(usageFingerprint,eddsa_get_msg(cp_i_267))));
{329}out(ac, (fp_xzdh_resp,kdf(usageFingerprint,eddsa_get_msg(cp_r_264))));
{330}if ((id_i_266 = id_alice) || (id_i_266 = id_bob)) then
{331}event correct_xzdh_resp;
{332}out(c, enc(k_276,k_xzdh_resp))
)
else
{333}let (cp_r_281: eddsa_signature,h_r_282: eddsa_private_key) = fail-bitstring in
{334}in(c, (id_i_283: identity,cp_i_284: eddsa_signature,pkp_285: eddsa_signature,Y_286: ec_point));
{335}let (H_i_287: ec_point,F_i_288: ec_point) = eddsa_get_msg(cp_i_284) in
{336}let (=H_i_287,=F_i_288) = eddsa_verify(cp_i_284,H_i_287) in
{337}let ec_point_as_bits(D_289: ec_point) = eddsa_verify(pkp_285,H_i_287) in
{338}let X_290: ec_point = ec_base(x_xzdh) in
{339}let k_tmp_291: bitstring = kdf(usageTmpKey,(ec_mul(x_xzdh,Y_286),ec_mul(x_xzdh,D_289),ec_mul(x_xzdh,H_i_287))) in
{340}let t_292: bitstring = (cp_i_284,cp_r_281,Y_286,X_290,D_289,id_i_283,id_r_247) in
{341}let k_293: bitstring = kdf(usageSharedSecret,k_tmp_291) in
{342}let ssid_294: bitstring = kdf(usageSSID,k_293) in
{343}out(c, ssid_294);
{344}let sigma_295: ring_signature = ring_sign(eddsa_scalar(h_r_282),F_i_288,Y_286,t_292) in
{345}let xzdh_mac_key_296: bitstring = kdf(usageAuthMACKey,k_tmp_291) in
{346}let xzdh_mac_297: bitstring = kdf(usageAuthMAC,(xzdh_mac_key_296,t_292)) in
{347}event accept_xzdh_resp(id_i_283,id_r_247,k_293);
{348}out(c, (sigma_295,xzdh_mac_297));
{349}in(ac, (=fp_xzdh_init,=kdf(usageFingerprint,eddsa_get_msg(cp_i_284))));
{350}out(ac, (fp_xzdh_resp,kdf(usageFingerprint,eddsa_get_msg(cp_r_281))));
{351}if ((id_i_283 = id_alice) || (id_i_283 = id_bob)) then
{352}event correct_xzdh_resp;
{353}out(c, enc(k_293,k_xzdh_resp))
)
else
{354}let (cp_r_298: eddsa_signature,h_r_299: eddsa_private_key) = fail-bitstring in
{355}in(c, (id_i_300: identity,cp_i_301: eddsa_signature,pkp_302: eddsa_signature,Y_303: ec_point));
{356}let (H_i_304: ec_point,F_i_305: ec_point) = eddsa_get_msg(cp_i_301) in
{357}let (=H_i_304,=F_i_305) = eddsa_verify(cp_i_301,H_i_304) in
{358}let ec_point_as_bits(D_306: ec_point) = eddsa_verify(pkp_302,H_i_304) in
{359}let X_307: ec_point = ec_base(x_xzdh) in
{360}let k_tmp_308: bitstring = kdf(usageTmpKey,(ec_mul(x_xzdh,Y_303),ec_mul(x_xzdh,D_306),ec_mul(x_xzdh,H_i_304))) in
{361}let t_309: bitstring = (cp_i_301,cp_r_298,Y_303,X_307,D_306,id_i_300,id_r_247) in
{362}let k_310: bitstring = kdf(usageSharedSecret,k_tmp_308) in
{363}let ssid_311: bitstring = kdf(usageSSID,k_310) in
{364}out(c, ssid_311);
{365}let sigma_312: ring_signature = ring_sign(eddsa_scalar(h_r_299),F_i_305,Y_303,t_309) in
{366}let xzdh_mac_key_313: bitstring = kdf(usageAuthMACKey,k_tmp_308) in
{367}let xzdh_mac_314: bitstring = kdf(usageAuthMAC,(xzdh_mac_key_313,t_309)) in
{368}event accept_xzdh_resp(id_i_300,id_r_247,k_310);
{369}out(c, (sigma_312,xzdh_mac_314));
{370}in(ac, (=fp_xzdh_init,=kdf(usageFingerprint,eddsa_get_msg(cp_i_301))));
{371}out(ac, (fp_xzdh_resp,kdf(usageFingerprint,eddsa_get_msg(cp_r_298))));
{372}if ((id_i_300 = id_alice) || (id_i_300 = id_bob)) then
{373}event correct_xzdh_resp;
{374}out(c, enc(k_310,k_xzdh_resp))
) | (
{375}!
{376}in(ac, x_315: bitstring);
{377}out(c, x_315);
{378}out(ac, x_315)
) | (
{379}phase 1;
{380}out(c, (h_a,f_a,h_b,f_b))
) | (
{381}phase 2;
{382}out(c, (d_a,d_b))
)
-- Encoded process for Query not event(correct_dakez_init); Query not event(correct_dakez_resp); Query not event(correct_xzdh_init); Query not event(correct_xzdh_resp); Query secret k_dakez_init_121,k_dakez_init_106,k_dakez_init_91,k_dakez_init; secret k_dakez_resp_179,k_dakez_resp_164,k_dakez_resp_149,k_dakez_resp; secret k_xzdh_init_246,k_xzdh_init_228,k_xzdh_init_210,k_xzdh_init; Query not attacker_bitstring_p1(k_xzdh_resp[]); Query not attacker_bitstring_p2(k_xzdh_resp[]); Query inj-event(term_dakez_init(id1,id2,k_410)) ==> inj-event(accept_dakez_resp(id1,id2,k_410)); Query inj-event(term_dakez_resp(id1_411,id2_412,k_413)) ==> inj-event(accept_dakez_init(id1_411,id2_412,k_413)); Query inj-event(term_xzdh_init(id1_414,id2_415,k_416)) ==> inj-event(accept_xzdh_resp(id1_414,id2_415,k_416))
Process 1:
{1}new h_a: eddsa_private_key;
{2}let H_a: ec_point = ec_base(eddsa_scalar(h_a)) in
{3}new f_a: ec_scalar;
{4}let F_a: ec_point = ec_base(f_a) in
{5}let cp_a: eddsa_signature = eddsa_sign(h_a,(H_a,F_a)) in
{6}new h_b: eddsa_private_key;
{7}let H_b: ec_point = ec_base(eddsa_scalar(h_b)) in
{8}new f_b: ec_scalar;
{9}let F_b: ec_point = ec_base(f_b) in
{10}let cp_b: eddsa_signature = eddsa_sign(h_b,(H_b,F_b)) in
{11}out(c, (cp_a,cp_b));
{12}new d_a: ec_scalar;
{13}let D_a: ec_point = ec_base(d_a) in
{14}let pkp_a: eddsa_signature = eddsa_sign(h_a,ec_point_as_bits(D_a)) in
{15}new d_b: ec_scalar;
{16}let D_b: ec_point = ec_base(d_b) in
{17}let pkp_b: eddsa_signature = eddsa_sign(h_b,ec_point_as_bits(D_b)) in
{18}out(c, (pkp_a,pkp_b));
(
{19}!
{20}new y_dakez: ec_scalar;
{21}in(c, id_i: identity);
{22}let v_75: bool = (id_i = id_alice) in
(
{23}if v_75 then
(
{24}let (cp_i: eddsa_signature,h_i: eddsa_private_key,F_i: ec_point) = (cp_a,h_a,F_a) in
{25}let Y: ec_point = ec_base(y_dakez) in
{26}out(c, Y);
{27}in(c, sigma_r: ring_signature);
{28}let (=zero,=cp_i,cp_r: eddsa_signature,=Y,X: ec_point,=id_i,id_r: identity) = ring_get_msg(sigma_r) in
{29}let (H_r: ec_point,F_r: ec_point) = eddsa_get_msg(cp_r) in
{30}let (=H_r,=F_r) = eddsa_verify(cp_r,H_r) in
{31}let (=zero,=cp_i,=cp_r,=Y,=X,=id_i,=id_r) = ring_verify(sigma_r,H_r,F_i,Y) in
{32}let t_i: bitstring = (one,cp_i,cp_r,Y,X,id_i,id_r) in
{33}let k_76: bitstring = kdf(usageSharedSecret,ec_point_as_bits(ec_mul(y_dakez,X))) in
{34}event term_dakez_init(id_i,id_r,k_76);
{35}let ssid: bitstring = kdf(usageSSID,k_76) in
{36}out(c, ssid);
{37}let sigma_i: ring_signature = ring_sign(eddsa_scalar(h_i),F_r,X,t_i) in
{38}event accept_dakez_init(id_i,id_r,k_76);
{39}out(c, sigma_i);
{40}out(ac, (fp_dakez_init,kdf(usageFingerprint,eddsa_get_msg(cp_i))));
{41}in(ac, (=fp_dakez_resp,=kdf(usageFingerprint,eddsa_get_msg(cp_r))));
{42}if ((id_r = id_alice) || (id_r = id_bob)) then
{43}event correct_dakez_init;
{44}let k_dakez_init: bitstring = k_76 in
{45}event k_dakez_init_contains(k_dakez_init)
)
else
{46}let =true = (id_i = id_bob) in
(
{47}let (cp_i_77: eddsa_signature,h_i_78: eddsa_private_key,F_i_79: ec_point) = (cp_b,h_b,F_b) in
{48}let Y_80: ec_point = ec_base(y_dakez) in
{49}out(c, Y_80);
{50}in(c, sigma_r_81: ring_signature);
{51}let (=zero,=cp_i_77,cp_r_82: eddsa_signature,=Y_80,X_83: ec_point,=id_i,id_r_84: identity) = ring_get_msg(sigma_r_81) in
{52}let (H_r_85: ec_point,F_r_86: ec_point) = eddsa_get_msg(cp_r_82) in
{53}let (=H_r_85,=F_r_86) = eddsa_verify(cp_r_82,H_r_85) in
{54}let (=zero,=cp_i_77,=cp_r_82,=Y_80,=X_83,=id_i,=id_r_84) = ring_verify(sigma_r_81,H_r_85,F_i_79,Y_80) in
{55}let t_i_87: bitstring = (one,cp_i_77,cp_r_82,Y_80,X_83,id_i,id_r_84) in
{56}let k_88: bitstring = kdf(usageSharedSecret,ec_point_as_bits(ec_mul(y_dakez,X_83))) in
{57}event term_dakez_init(id_i,id_r_84,k_88);
{58}let ssid_89: bitstring = kdf(usageSSID,k_88) in
{59}out(c, ssid_89);
{60}let sigma_i_90: ring_signature = ring_sign(eddsa_scalar(h_i_78),F_r_86,X_83,t_i_87) in
{61}event accept_dakez_init(id_i,id_r_84,k_88);
{62}out(c, sigma_i_90);
{63}out(ac, (fp_dakez_init,kdf(usageFingerprint,eddsa_get_msg(cp_i_77))));
{64}in(ac, (=fp_dakez_resp,=kdf(usageFingerprint,eddsa_get_msg(cp_r_82))));
{65}if ((id_r_84 = id_alice) || (id_r_84 = id_bob)) then
{66}event correct_dakez_init;
{67}let k_dakez_init_91: bitstring = k_88 in
{68}event k_dakez_init_contains(k_dakez_init_91)
)
else
{69}let (cp_i_92: eddsa_signature,h_i_93: eddsa_private_key,F_i_94: ec_point) = fail-bitstring in
{70}let Y_95: ec_point = ec_base(y_dakez) in
{71}out(c, Y_95);
{72}in(c, sigma_r_96: ring_signature);
{73}let (=zero,=cp_i_92,cp_r_97: eddsa_signature,=Y_95,X_98: ec_point,=id_i,id_r_99: identity) = ring_get_msg(sigma_r_96) in
{74}let (H_r_100: ec_point,F_r_101: ec_point) = eddsa_get_msg(cp_r_97) in
{75}let (=H_r_100,=F_r_101) = eddsa_verify(cp_r_97,H_r_100) in
{76}let (=zero,=cp_i_92,=cp_r_97,=Y_95,=X_98,=id_i,=id_r_99) = ring_verify(sigma_r_96,H_r_100,F_i_94,Y_95) in
{77}let t_i_102: bitstring = (one,cp_i_92,cp_r_97,Y_95,X_98,id_i,id_r_99) in
{78}let k_103: bitstring = kdf(usageSharedSecret,ec_point_as_bits(ec_mul(y_dakez,X_98))) in
{79}event term_dakez_init(id_i,id_r_99,k_103);
{80}let ssid_104: bitstring = kdf(usageSSID,k_103) in
{81}out(c, ssid_104);
{82}let sigma_i_105: ring_signature = ring_sign(eddsa_scalar(h_i_93),F_r_101,X_98,t_i_102) in
{83}event accept_dakez_init(id_i,id_r_99,k_103);
{84}out(c, sigma_i_105);
{85}out(ac, (fp_dakez_init,kdf(usageFingerprint,eddsa_get_msg(cp_i_92))));
{86}in(ac, (=fp_dakez_resp,=kdf(usageFingerprint,eddsa_get_msg(cp_r_97))));
{87}if ((id_r_99 = id_alice) || (id_r_99 = id_bob)) then
{88}event correct_dakez_init;
{89}let k_dakez_init_106: bitstring = k_103 in
{90}event k_dakez_init_contains(k_dakez_init_106)
)
else
{91}let (cp_i_107: eddsa_signature,h_i_108: eddsa_private_key,F_i_109: ec_point) = fail-bitstring in
{92}let Y_110: ec_point = ec_base(y_dakez) in
{93}out(c, Y_110);
{94}in(c, sigma_r_111: ring_signature);
{95}let (=zero,=cp_i_107,cp_r_112: eddsa_signature,=Y_110,X_113: ec_point,=id_i,id_r_114: identity) = ring_get_msg(sigma_r_111) in
{96}let (H_r_115: ec_point,F_r_116: ec_point) = eddsa_get_msg(cp_r_112) in
{97}let (=H_r_115,=F_r_116) = eddsa_verify(cp_r_112,H_r_115) in
{98}let (=zero,=cp_i_107,=cp_r_112,=Y_110,=X_113,=id_i,=id_r_114) = ring_verify(sigma_r_111,H_r_115,F_i_109,Y_110) in
{99}let t_i_117: bitstring = (one,cp_i_107,cp_r_112,Y_110,X_113,id_i,id_r_114) in
{100}let k_118: bitstring = kdf(usageSharedSecret,ec_point_as_bits(ec_mul(y_dakez,X_113))) in
{101}event term_dakez_init(id_i,id_r_114,k_118);
{102}let ssid_119: bitstring = kdf(usageSSID,k_118) in
{103}out(c, ssid_119);
{104}let sigma_i_120: ring_signature = ring_sign(eddsa_scalar(h_i_108),F_r_116,X_113,t_i_117) in
{105}event accept_dakez_init(id_i,id_r_114,k_118);
{106}out(c, sigma_i_120);
{107}out(ac, (fp_dakez_init,kdf(usageFingerprint,eddsa_get_msg(cp_i_107))));
{108}in(ac, (=fp_dakez_resp,=kdf(usageFingerprint,eddsa_get_msg(cp_r_112))));
{109}if ((id_r_114 = id_alice) || (id_r_114 = id_bob)) then
{110}event correct_dakez_init;
{111}let k_dakez_init_121: bitstring = k_118 in
{112}event k_dakez_init_contains(k_dakez_init_121)
) | (
{113}!
{114}new x_dakez: ec_scalar;
{115}in(c, id_r_122: identity);
{116}let v_123: bool = (id_r_122 = id_alice) in
(
{117}if v_123 then
(
{118}let (cp_r_124: eddsa_signature,h_r: eddsa_private_key,F_r_125: ec_point) = (cp_a,h_a,F_a) in
{119}in(c, (id_i_126: identity,cp_i_127: eddsa_signature,Y_128: ec_point));
{120}let (H_i: ec_point,F_i_129: ec_point) = eddsa_get_msg(cp_i_127) in
{121}let (=H_i,=F_i_129) = eddsa_verify(cp_i_127,H_i) in
{122}let X_130: ec_point = ec_base(x_dakez) in
{123}let t_r: bitstring = (zero,cp_i_127,cp_r_124,Y_128,X_130,id_i_126,id_r_122) in
{124}let k_131: bitstring = kdf(usageSharedSecret,ec_point_as_bits(ec_mul(x_dakez,Y_128))) in
{125}let ssid_132: bitstring = kdf(usageSSID,k_131) in
{126}out(c, ssid_132);
{127}let sigma_r_133: ring_signature = ring_sign(eddsa_scalar(h_r),F_i_129,Y_128,t_r) in
{128}event accept_dakez_resp(id_i_126,id_r_122,k_131);
{129}out(c, sigma_r_133);
{130}in(c, sigma_i_134: ring_signature);
{131}let (=one,=cp_i_127,=cp_r_124,=Y_128,=X_130,=id_i_126,=id_r_122) = ring_verify(sigma_i_134,H_i,F_r_125,X_130) in
{132}event term_dakez_resp(id_i_126,id_r_122,k_131);
{133}in(ac, (=fp_dakez_init,=kdf(usageFingerprint,eddsa_get_msg(cp_i_127))));
{134}out(ac, (fp_dakez_resp,kdf(usageFingerprint,eddsa_get_msg(cp_r_124))));
{135}if ((id_i_126 = id_alice) || (id_i_126 = id_bob)) then
{136}event correct_dakez_resp;
{137}let k_dakez_resp: bitstring = k_131 in
{138}event k_dakez_resp_contains(k_dakez_resp)
)
else
{139}let =true = (id_r_122 = id_bob) in
(
{140}let (cp_r_135: eddsa_signature,h_r_136: eddsa_private_key,F_r_137: ec_point) = (cp_b,h_b,F_b) in
{141}in(c, (id_i_138: identity,cp_i_139: eddsa_signature,Y_140: ec_point));
{142}let (H_i_141: ec_point,F_i_142: ec_point) = eddsa_get_msg(cp_i_139) in
{143}let (=H_i_141,=F_i_142) = eddsa_verify(cp_i_139,H_i_141) in
{144}let X_143: ec_point = ec_base(x_dakez) in
{145}let t_r_144: bitstring = (zero,cp_i_139,cp_r_135,Y_140,X_143,id_i_138,id_r_122) in
{146}let k_145: bitstring = kdf(usageSharedSecret,ec_point_as_bits(ec_mul(x_dakez,Y_140))) in
{147}let ssid_146: bitstring = kdf(usageSSID,k_145) in
{148}out(c, ssid_146);
{149}let sigma_r_147: ring_signature = ring_sign(eddsa_scalar(h_r_136),F_i_142,Y_140,t_r_144) in
{150}event accept_dakez_resp(id_i_138,id_r_122,k_145);
{151}out(c, sigma_r_147);
{152}in(c, sigma_i_148: ring_signature);
{153}let (=one,=cp_i_139,=cp_r_135,=Y_140,=X_143,=id_i_138,=id_r_122) = ring_verify(sigma_i_148,H_i_141,F_r_137,X_143) in
{154}event term_dakez_resp(id_i_138,id_r_122,k_145);
{155}in(ac, (=fp_dakez_init,=kdf(usageFingerprint,eddsa_get_msg(cp_i_139))));
{156}out(ac, (fp_dakez_resp,kdf(usageFingerprint,eddsa_get_msg(cp_r_135))));
{157}if ((id_i_138 = id_alice) || (id_i_138 = id_bob)) then
{158}event correct_dakez_resp;
{159}let k_dakez_resp_149: bitstring = k_145 in
{160}event k_dakez_resp_contains(k_dakez_resp_149)
)
else
{161}let (cp_r_150: eddsa_signature,h_r_151: eddsa_private_key,F_r_152: ec_point) = fail-bitstring in
{162}in(c, (id_i_153: identity,cp_i_154: eddsa_signature,Y_155: ec_point));
{163}let (H_i_156: ec_point,F_i_157: ec_point) = eddsa_get_msg(cp_i_154) in
{164}let (=H_i_156,=F_i_157) = eddsa_verify(cp_i_154,H_i_156) in
{165}let X_158: ec_point = ec_base(x_dakez) in
{166}let t_r_159: bitstring = (zero,cp_i_154,cp_r_150,Y_155,X_158,id_i_153,id_r_122) in
{167}let k_160: bitstring = kdf(usageSharedSecret,ec_point_as_bits(ec_mul(x_dakez,Y_155))) in
{168}let ssid_161: bitstring = kdf(usageSSID,k_160) in
{169}out(c, ssid_161);
{170}let sigma_r_162: ring_signature = ring_sign(eddsa_scalar(h_r_151),F_i_157,Y_155,t_r_159) in
{171}event accept_dakez_resp(id_i_153,id_r_122,k_160);
{172}out(c, sigma_r_162);
{173}in(c, sigma_i_163: ring_signature);
{174}let (=one,=cp_i_154,=cp_r_150,=Y_155,=X_158,=id_i_153,=id_r_122) = ring_verify(sigma_i_163,H_i_156,F_r_152,X_158) in
{175}event term_dakez_resp(id_i_153,id_r_122,k_160);
{176}in(ac, (=fp_dakez_init,=kdf(usageFingerprint,eddsa_get_msg(cp_i_154))));
{177}out(ac, (fp_dakez_resp,kdf(usageFingerprint,eddsa_get_msg(cp_r_150))));
{178}if ((id_i_153 = id_alice) || (id_i_153 = id_bob)) then
{179}event correct_dakez_resp;
{180}let k_dakez_resp_164: bitstring = k_160 in
{181}event k_dakez_resp_contains(k_dakez_resp_164)
)
else
{182}let (cp_r_165: eddsa_signature,h_r_166: eddsa_private_key,F_r_167: ec_point) = fail-bitstring in
{183}in(c, (id_i_168: identity,cp_i_169: eddsa_signature,Y_170: ec_point));
{184}let (H_i_171: ec_point,F_i_172: ec_point) = eddsa_get_msg(cp_i_169) in
{185}let (=H_i_171,=F_i_172) = eddsa_verify(cp_i_169,H_i_171) in
{186}let X_173: ec_point = ec_base(x_dakez) in
{187}let t_r_174: bitstring = (zero,cp_i_169,cp_r_165,Y_170,X_173,id_i_168,id_r_122) in
{188}let k_175: bitstring = kdf(usageSharedSecret,ec_point_as_bits(ec_mul(x_dakez,Y_170))) in
{189}let ssid_176: bitstring = kdf(usageSSID,k_175) in
{190}out(c, ssid_176);
{191}let sigma_r_177: ring_signature = ring_sign(eddsa_scalar(h_r_166),F_i_172,Y_170,t_r_174) in
{192}event accept_dakez_resp(id_i_168,id_r_122,k_175);
{193}out(c, sigma_r_177);
{194}in(c, sigma_i_178: ring_signature);
{195}let (=one,=cp_i_169,=cp_r_165,=Y_170,=X_173,=id_i_168,=id_r_122) = ring_verify(sigma_i_178,H_i_171,F_r_167,X_173) in
{196}event term_dakez_resp(id_i_168,id_r_122,k_175);
{197}in(ac, (=fp_dakez_init,=kdf(usageFingerprint,eddsa_get_msg(cp_i_169))));
{198}out(ac, (fp_dakez_resp,kdf(usageFingerprint,eddsa_get_msg(cp_r_165))));
{199}if ((id_i_168 = id_alice) || (id_i_168 = id_bob)) then
{200}event correct_dakez_resp;
{201}let k_dakez_resp_179: bitstring = k_175 in
{202}event k_dakez_resp_contains(k_dakez_resp_179)
) | (
{203}!
{204}new y_xzdh: ec_scalar;
{205}in(c, id_i_180: identity);
{206}let v_181: bool = (id_i_180 = id_alice) in
(
{207}if v_181 then
(
{208}let (cp_i_182: eddsa_signature,h_i_183: eddsa_private_key,F_i_184: ec_point,d: ec_scalar) = (cp_a,h_a,F_a,d_a) in
{209}let Y_185: ec_point = ec_base(y_xzdh) in
{210}out(c, Y_185);
{211}in(c, (sigma: ring_signature,xzdh_mac: bitstring));
{212}let t: bitstring = ring_get_msg(sigma) in
{213}let (=cp_i_182,cp_r_186: eddsa_signature,=Y_185,X_187: ec_point,=ec_base(d),=id_i_180,id_r_188: identity) = t in
{214}let (H_r_189: ec_point,F_r_190: ec_point) = eddsa_get_msg(cp_r_186) in
{215}let (=H_r_189,=F_r_190) = eddsa_verify(cp_r_186,H_r_189) in
{216}let (=cp_i_182,=cp_r_186,=Y_185,=X_187,=ec_base(d),=id_i_180,=id_r_188) = ring_verify(sigma,H_r_189,F_i_184,Y_185) in
{217}let k_tmp: bitstring = kdf(usageTmpKey,(ec_mul(y_xzdh,X_187),ec_mul(d,X_187),ec_mul(eddsa_scalar(h_i_183),X_187))) in
{218}let xzdh_mac_key: bitstring = kdf(usageAuthMACKey,k_tmp) in
{219}if (xzdh_mac = kdf(usageAuthMAC,(xzdh_mac_key,t))) then
{220}let k_191: bitstring = kdf(usageSharedSecret,k_tmp) in
{221}let ssid_192: bitstring = kdf(usageSSID,k_191) in
{222}out(c, ssid_192);
{223}event term_xzdh_init(id_i_180,id_r_188,k_191);
{224}out(ac, (fp_xzdh_init,kdf(usageFingerprint,eddsa_get_msg(cp_i_182))));
{225}in(ac, (=fp_xzdh_resp,=kdf(usageFingerprint,eddsa_get_msg(cp_r_186))));
{226}if ((id_r_188 = id_alice) || (id_r_188 = id_bob)) then
{227}event correct_xzdh_init;
{228}let k_xzdh_init: bitstring = k_191 in
{229}event k_xzdh_init_contains(k_xzdh_init)
)
else
{230}let =true = (id_i_180 = id_bob) in
(
{231}let (cp_i_193: eddsa_signature,h_i_194: eddsa_private_key,F_i_195: ec_point,d_196: ec_scalar) = (cp_b,h_b,F_b,d_b) in
{232}let Y_197: ec_point = ec_base(y_xzdh) in
{233}out(c, Y_197);
{234}in(c, (sigma_198: ring_signature,xzdh_mac_199: bitstring));
{235}let t_200: bitstring = ring_get_msg(sigma_198) in
{236}let (=cp_i_193,cp_r_201: eddsa_signature,=Y_197,X_202: ec_point,=ec_base(d_196),=id_i_180,id_r_203: identity) = t_200 in
{237}let (H_r_204: ec_point,F_r_205: ec_point) = eddsa_get_msg(cp_r_201) in
{238}let (=H_r_204,=F_r_205) = eddsa_verify(cp_r_201,H_r_204) in
{239}let (=cp_i_193,=cp_r_201,=Y_197,=X_202,=ec_base(d_196),=id_i_180,=id_r_203) = ring_verify(sigma_198,H_r_204,F_i_195,Y_197) in
{240}let k_tmp_206: bitstring = kdf(usageTmpKey,(ec_mul(y_xzdh,X_202),ec_mul(d_196,X_202),ec_mul(eddsa_scalar(h_i_194),X_202))) in
{241}let xzdh_mac_key_207: bitstring = kdf(usageAuthMACKey,k_tmp_206) in
{242}if (xzdh_mac_199 = kdf(usageAuthMAC,(xzdh_mac_key_207,t_200))) then
{243}let k_208: bitstring = kdf(usageSharedSecret,k_tmp_206) in
{244}let ssid_209: bitstring = kdf(usageSSID,k_208) in
{245}out(c, ssid_209);
{246}event term_xzdh_init(id_i_180,id_r_203,k_208);
{247}out(ac, (fp_xzdh_init,kdf(usageFingerprint,eddsa_get_msg(cp_i_193))));
{248}in(ac, (=fp_xzdh_resp,=kdf(usageFingerprint,eddsa_get_msg(cp_r_201))));
{249}if ((id_r_203 = id_alice) || (id_r_203 = id_bob)) then
{250}event correct_xzdh_init;
{251}let k_xzdh_init_210: bitstring = k_208 in
{252}event k_xzdh_init_contains(k_xzdh_init_210)
)
else
{253}let (cp_i_211: eddsa_signature,h_i_212: eddsa_private_key,F_i_213: ec_point,d_214: ec_scalar) = fail-bitstring in
{254}let Y_215: ec_point = ec_base(y_xzdh) in
{255}out(c, Y_215);
{256}in(c, (sigma_216: ring_signature,xzdh_mac_217: bitstring));
{257}let t_218: bitstring = ring_get_msg(sigma_216) in
{258}let (=cp_i_211,cp_r_219: eddsa_signature,=Y_215,X_220: ec_point,=ec_base(d_214),=id_i_180,id_r_221: identity) = t_218 in
{259}let (H_r_222: ec_point,F_r_223: ec_point) = eddsa_get_msg(cp_r_219) in
{260}let (=H_r_222,=F_r_223) = eddsa_verify(cp_r_219,H_r_222) in
{261}let (=cp_i_211,=cp_r_219,=Y_215,=X_220,=ec_base(d_214),=id_i_180,=id_r_221) = ring_verify(sigma_216,H_r_222,F_i_213,Y_215) in
{262}let k_tmp_224: bitstring = kdf(usageTmpKey,(ec_mul(y_xzdh,X_220),ec_mul(d_214,X_220),ec_mul(eddsa_scalar(h_i_212),X_220))) in
{263}let xzdh_mac_key_225: bitstring = kdf(usageAuthMACKey,k_tmp_224) in
{264}if (xzdh_mac_217 = kdf(usageAuthMAC,(xzdh_mac_key_225,t_218))) then
{265}let k_226: bitstring = kdf(usageSharedSecret,k_tmp_224) in
{266}let ssid_227: bitstring = kdf(usageSSID,k_226) in
{267}out(c, ssid_227);
{268}event term_xzdh_init(id_i_180,id_r_221,k_226);
{269}out(ac, (fp_xzdh_init,kdf(usageFingerprint,eddsa_get_msg(cp_i_211))));
{270}in(ac, (=fp_xzdh_resp,=kdf(usageFingerprint,eddsa_get_msg(cp_r_219))));
{271}if ((id_r_221 = id_alice) || (id_r_221 = id_bob)) then
{272}event correct_xzdh_init;
{273}let k_xzdh_init_228: bitstring = k_226 in
{274}event k_xzdh_init_contains(k_xzdh_init_228)
)
else
{275}let (cp_i_229: eddsa_signature,h_i_230: eddsa_private_key,F_i_231: ec_point,d_232: ec_scalar) = fail-bitstring in
{276}let Y_233: ec_point = ec_base(y_xzdh) in
{277}out(c, Y_233);
{278}in(c, (sigma_234: ring_signature,xzdh_mac_235: bitstring));
{279}let t_236: bitstring = ring_get_msg(sigma_234) in
{280}let (=cp_i_229,cp_r_237: eddsa_signature,=Y_233,X_238: ec_point,=ec_base(d_232),=id_i_180,id_r_239: identity) = t_236 in
{281}let (H_r_240: ec_point,F_r_241: ec_point) = eddsa_get_msg(cp_r_237) in
{282}let (=H_r_240,=F_r_241) = eddsa_verify(cp_r_237,H_r_240) in
{283}let (=cp_i_229,=cp_r_237,=Y_233,=X_238,=ec_base(d_232),=id_i_180,=id_r_239) = ring_verify(sigma_234,H_r_240,F_i_231,Y_233) in
{284}let k_tmp_242: bitstring = kdf(usageTmpKey,(ec_mul(y_xzdh,X_238),ec_mul(d_232,X_238),ec_mul(eddsa_scalar(h_i_230),X_238))) in
{285}let xzdh_mac_key_243: bitstring = kdf(usageAuthMACKey,k_tmp_242) in
{286}if (xzdh_mac_235 = kdf(usageAuthMAC,(xzdh_mac_key_243,t_236))) then
{287}let k_244: bitstring = kdf(usageSharedSecret,k_tmp_242) in
{288}let ssid_245: bitstring = kdf(usageSSID,k_244) in
{289}out(c, ssid_245);
{290}event term_xzdh_init(id_i_180,id_r_239,k_244);
{291}out(ac, (fp_xzdh_init,kdf(usageFingerprint,eddsa_get_msg(cp_i_229))));
{292}in(ac, (=fp_xzdh_resp,=kdf(usageFingerprint,eddsa_get_msg(cp_r_237))));
{293}if ((id_r_239 = id_alice) || (id_r_239 = id_bob)) then
{294}event correct_xzdh_init;
{295}let k_xzdh_init_246: bitstring = k_244 in
{296}event k_xzdh_init_contains(k_xzdh_init_246)
) | (
{297}!
{298}new x_xzdh: ec_scalar;
{299}in(c, id_r_247: identity);
{300}let v_248: bool = (id_r_247 = id_alice) in
(
{301}if v_248 then
(
{302}let (cp_r_249: eddsa_signature,h_r_250: eddsa_private_key) = (cp_a,h_a) in
{303}in(c, (id_i_251: identity,cp_i_252: eddsa_signature,pkp: eddsa_signature,Y_253: ec_point));
{304}let (H_i_254: ec_point,F_i_255: ec_point) = eddsa_get_msg(cp_i_252) in
{305}let (=H_i_254,=F_i_255) = eddsa_verify(cp_i_252,H_i_254) in
{306}let ec_point_as_bits(D: ec_point) = eddsa_verify(pkp,H_i_254) in
{307}let X_256: ec_point = ec_base(x_xzdh) in
{308}let k_tmp_257: bitstring = kdf(usageTmpKey,(ec_mul(x_xzdh,Y_253),ec_mul(x_xzdh,D),ec_mul(x_xzdh,H_i_254))) in
{309}let t_258: bitstring = (cp_i_252,cp_r_249,Y_253,X_256,D,id_i_251,id_r_247) in
{310}let k_259: bitstring = kdf(usageSharedSecret,k_tmp_257) in
{311}let ssid_260: bitstring = kdf(usageSSID,k_259) in
{312}out(c, ssid_260);
{313}let sigma_261: ring_signature = ring_sign(eddsa_scalar(h_r_250),F_i_255,Y_253,t_258) in
{314}let xzdh_mac_key_262: bitstring = kdf(usageAuthMACKey,k_tmp_257) in
{315}let xzdh_mac_263: bitstring = kdf(usageAuthMAC,(xzdh_mac_key_262,t_258)) in
{316}event accept_xzdh_resp(id_i_251,id_r_247,k_259);
{317}out(c, (sigma_261,xzdh_mac_263));
{318}in(ac, (=fp_xzdh_init,=kdf(usageFingerprint,eddsa_get_msg(cp_i_252))));
{319}out(ac, (fp_xzdh_resp,kdf(usageFingerprint,eddsa_get_msg(cp_r_249))));
{320}if ((id_i_251 = id_alice) || (id_i_251 = id_bob)) then
{321}event correct_xzdh_resp;
{322}out(c, enc(k_259,k_xzdh_resp))
)
else
{323}let =true = (id_r_247 = id_bob) in
(
{324}let (cp_r_264: eddsa_signature,h_r_265: eddsa_private_key) = (cp_b,h_b) in
{325}in(c, (id_i_266: identity,cp_i_267: eddsa_signature,pkp_268: eddsa_signature,Y_269: ec_point));
{326}let (H_i_270: ec_point,F_i_271: ec_point) = eddsa_get_msg(cp_i_267) in
{327}let (=H_i_270,=F_i_271) = eddsa_verify(cp_i_267,H_i_270) in
{328}let ec_point_as_bits(D_272: ec_point) = eddsa_verify(pkp_268,H_i_270) in
{329}let X_273: ec_point = ec_base(x_xzdh) in
{330}let k_tmp_274: bitstring = kdf(usageTmpKey,(ec_mul(x_xzdh,Y_269),ec_mul(x_xzdh,D_272),ec_mul(x_xzdh,H_i_270))) in
{331}let t_275: bitstring = (cp_i_267,cp_r_264,Y_269,X_273,D_272,id_i_266,id_r_247) in
{332}let k_276: bitstring = kdf(usageSharedSecret,k_tmp_274) in
{333}let ssid_277: bitstring = kdf(usageSSID,k_276) in
{334}out(c, ssid_277);
{335}let sigma_278: ring_signature = ring_sign(eddsa_scalar(h_r_265),F_i_271,Y_269,t_275) in
{336}let xzdh_mac_key_279: bitstring = kdf(usageAuthMACKey,k_tmp_274) in
{337}let xzdh_mac_280: bitstring = kdf(usageAuthMAC,(xzdh_mac_key_279,t_275)) in
{338}event accept_xzdh_resp(id_i_266,id_r_247,k_276);
{339}out(c, (sigma_278,xzdh_mac_280));
{340}in(ac, (=fp_xzdh_init,=kdf(usageFingerprint,eddsa_get_msg(cp_i_267))));
{341}out(ac, (fp_xzdh_resp,kdf(usageFingerprint,eddsa_get_msg(cp_r_264))));
{342}if ((id_i_266 = id_alice) || (id_i_266 = id_bob)) then
{343}event correct_xzdh_resp;
{344}out(c, enc(k_276,k_xzdh_resp))
)
else
{345}let (cp_r_281: eddsa_signature,h_r_282: eddsa_private_key) = fail-bitstring in
{346}in(c, (id_i_283: identity,cp_i_284: eddsa_signature,pkp_285: eddsa_signature,Y_286: ec_point));
{347}let (H_i_287: ec_point,F_i_288: ec_point) = eddsa_get_msg(cp_i_284) in
{348}let (=H_i_287,=F_i_288) = eddsa_verify(cp_i_284,H_i_287) in
{349}let ec_point_as_bits(D_289: ec_point) = eddsa_verify(pkp_285,H_i_287) in
{350}let X_290: ec_point = ec_base(x_xzdh) in
{351}let k_tmp_291: bitstring = kdf(usageTmpKey,(ec_mul(x_xzdh,Y_286),ec_mul(x_xzdh,D_289),ec_mul(x_xzdh,H_i_287))) in
{352}let t_292: bitstring = (cp_i_284,cp_r_281,Y_286,X_290,D_289,id_i_283,id_r_247) in
{353}let k_293: bitstring = kdf(usageSharedSecret,k_tmp_291) in
{354}let ssid_294: bitstring = kdf(usageSSID,k_293) in
{355}out(c, ssid_294);
{356}let sigma_295: ring_signature = ring_sign(eddsa_scalar(h_r_282),F_i_288,Y_286,t_292) in
{357}let xzdh_mac_key_296: bitstring = kdf(usageAuthMACKey,k_tmp_291) in
{358}let xzdh_mac_297: bitstring = kdf(usageAuthMAC,(xzdh_mac_key_296,t_292)) in
{359}event accept_xzdh_resp(id_i_283,id_r_247,k_293);
{360}out(c, (sigma_295,xzdh_mac_297));
{361}in(ac, (=fp_xzdh_init,=kdf(usageFingerprint,eddsa_get_msg(cp_i_284))));
{362}out(ac, (fp_xzdh_resp,kdf(usageFingerprint,eddsa_get_msg(cp_r_281))));
{363}if ((id_i_283 = id_alice) || (id_i_283 = id_bob)) then
{364}event correct_xzdh_resp;
{365}out(c, enc(k_293,k_xzdh_resp))
)
else
{366}let (cp_r_298: eddsa_signature,h_r_299: eddsa_private_key) = fail-bitstring in
{367}in(c, (id_i_300: identity,cp_i_301: eddsa_signature,pkp_302: eddsa_signature,Y_303: ec_point));
{368}let (H_i_304: ec_point,F_i_305: ec_point) = eddsa_get_msg(cp_i_301) in
{369}let (=H_i_304,=F_i_305) = eddsa_verify(cp_i_301,H_i_304) in
{370}let ec_point_as_bits(D_306: ec_point) = eddsa_verify(pkp_302,H_i_304) in
{371}let X_307: ec_point = ec_base(x_xzdh) in
{372}let k_tmp_308: bitstring = kdf(usageTmpKey,(ec_mul(x_xzdh,Y_303),ec_mul(x_xzdh,D_306),ec_mul(x_xzdh,H_i_304))) in
{373}let t_309: bitstring = (cp_i_301,cp_r_298,Y_303,X_307,D_306,id_i_300,id_r_247) in
{374}let k_310: bitstring = kdf(usageSharedSecret,k_tmp_308) in
{375}let ssid_311: bitstring = kdf(usageSSID,k_310) in
{376}out(c, ssid_311);
{377}let sigma_312: ring_signature = ring_sign(eddsa_scalar(h_r_299),F_i_305,Y_303,t_309) in
{378}let xzdh_mac_key_313: bitstring = kdf(usageAuthMACKey,k_tmp_308) in
{379}let xzdh_mac_314: bitstring = kdf(usageAuthMAC,(xzdh_mac_key_313,t_309)) in
{380}event accept_xzdh_resp(id_i_300,id_r_247,k_310);
{381}out(c, (sigma_312,xzdh_mac_314));
{382}in(ac, (=fp_xzdh_init,=kdf(usageFingerprint,eddsa_get_msg(cp_i_301))));
{383}out(ac, (fp_xzdh_resp,kdf(usageFingerprint,eddsa_get_msg(cp_r_298))));
{384}if ((id_i_300 = id_alice) || (id_i_300 = id_bob)) then
{385}event correct_xzdh_resp;
{386}out(c, enc(k_310,k_xzdh_resp))
) | (
{387}!
{388}in(ac, x_315: bitstring);
{389}out(c, x_315);
{390}out(ac, x_315)
) | (
{391}phase 1;
{392}out(c, (h_a,f_a,h_b,f_b))
) | (
{393}phase 2;
{394}out(c, (d_a,d_b))
)
-- Query not event(correct_dakez_init)
Completing...
200 rules inserted. The rule base contains 200 rules. 613 rules in the queue.
400 rules inserted. The rule base contains 400 rules. 418 rules in the queue.
600 rules inserted. The rule base contains 594 rules. 292 rules in the queue.
800 rules inserted. The rule base contains 794 rules. 358 rules in the queue.
1000 rules inserted. The rule base contains 978 rules. 242 rules in the queue.
1200 rules inserted. The rule base contains 1164 rules. 231 rules in the queue.
1400 rules inserted. The rule base contains 1301 rules. 482 rules in the queue.
1600 rules inserted. The rule base contains 1364 rules. 476 rules in the queue.
1800 rules inserted. The rule base contains 1388 rules. 452 rules in the queue.
2000 rules inserted. The rule base contains 1359 rules. 430 rules in the queue.
2200 rules inserted. The rule base contains 1541 rules. 454 rules in the queue.
2400 rules inserted. The rule base contains 1506 rules. 433 rules in the queue.
2600 rules inserted. The rule base contains 1591 rules. 1285 rules in the queue.
2800 rules inserted. The rule base contains 1755 rules. 1149 rules in the queue.
3000 rules inserted. The rule base contains 1793 rules. 990 rules in the queue.
3200 rules inserted. The rule base contains 1795 rules. 870 rules in the queue.
3400 rules inserted. The rule base contains 1854 rules. 808 rules in the queue.
3600 rules inserted. The rule base contains 1856 rules. 806 rules in the queue.
3800 rules inserted. The rule base contains 1967 rules. 756 rules in the queue.
4000 rules inserted. The rule base contains 2165 rules. 556 rules in the queue.
4200 rules inserted. The rule base contains 2363 rules. 356 rules in the queue.
4400 rules inserted. The rule base contains 2562 rules. 156 rules in the queue.
4600 rules inserted. The rule base contains 2558 rules. 89 rules in the queue.
4800 rules inserted. The rule base contains 2575 rules. 167 rules in the queue.
5000 rules inserted. The rule base contains 2687 rules. 328 rules in the queue.
5200 rules inserted. The rule base contains 2867 rules. 496 rules in the queue.
5400 rules inserted. The rule base contains 3027 rules. 561 rules in the queue.
5600 rules inserted. The rule base contains 3227 rules. 487 rules in the queue.
5800 rules inserted. The rule base contains 3427 rules. 421 rules in the queue.
6000 rules inserted. The rule base contains 3603 rules. 322 rules in the queue.
6200 rules inserted. The rule base contains 3803 rules. 227 rules in the queue.
6400 rules inserted. The rule base contains 3987 rules. 250 rules in the queue.
6600 rules inserted. The rule base contains 4177 rules. 222 rules in the queue.
6800 rules inserted. The rule base contains 4373 rules. 153 rules in the queue.
7000 rules inserted. The rule base contains 4569 rules. 38 rules in the queue.
ok, secrecy assumption verified: fact unreachable attacker_eddsa_private_key(h_a[])
ok, secrecy assumption verified: fact unreachable attacker_eddsa_private_key(h_b[])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar(f_a[])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar(f_b[])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar_p1(d_a[])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar(d_a[])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar_p1(d_b[])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar(d_b[])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar_p1(d_a[])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar(d_a[])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar_p1(d_b[])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar(d_b[])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar_p2(y_dakez[!1 = v_41342])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar_p1(y_dakez[!1 = v_41342])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar(y_dakez[!1 = v_41342])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar_p2(x_dakez[!1 = v_41341])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar_p1(x_dakez[!1 = v_41341])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar(x_dakez[!1 = v_41341])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar_p2(y_xzdh[!1 = v_41340])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar_p1(y_xzdh[!1 = v_41340])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar(y_xzdh[!1 = v_41340])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar_p2(x_xzdh[!1 = v_41339])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar_p1(x_xzdh[!1 = v_41339])
ok, secrecy assumption verified: fact unreachable attacker_ec_scalar(x_xzdh[!1 = v_41339])
Starting query not event(correct_dakez_init)
goal reachable: end(correct_dakez_init)
Abbreviations:
y_1919827 = y_dakez[!1 = @sid_1919785]
x_1919828 = x_dakez[!1 = @sid_1919783]
x_1919829 = x_dakez[!1 = @sid_1919810]
y_1919830 = y_dakez[!1 = @sid_1919801]
y_1919831 = y_dakez[!1 = @sid_1919825]
x_1919832 = x_dakez[!1 = @sid_1919822]
1. The attacker initially knows id_alice[].
attacker_identity(id_alice[]).
2. The message id_alice[] that the attacker may have by 1 may be received at input {21}.
So the message ec_base(y_1919831) may be sent to the attacker at output {26}.
attacker_ec_point(ec_base(y_1919831)).
3. The message (eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[]))),eddsa_sign(h_b[],(ec_base(eddsa_scalar(h_b[])),ec_base(f_b[])))) may be sent to the attacker at output {11}.
attacker_bitstring((eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[]))),eddsa_sign(h_b[],(ec_base(eddsa_scalar(h_b[])),ec_base(f_b[]))))).
4. By 3, the attacker may know (eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[]))),eddsa_sign(h_b[],(ec_base(eddsa_scalar(h_b[])),ec_base(f_b[])))).
Using the function 1-proj-eddsa_signature-eddsa_signature-tuple the attacker may obtain eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[]))).
attacker_eddsa_signature(eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[])))).
5. By 1, the attacker may know id_alice[].
By 4, the attacker may know eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[]))).
By 2, the attacker may know ec_base(y_1919831).
Using the function identity-eddsa_signature-ec_point-tuple the attacker may obtain (id_alice[],eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[]))),ec_base(y_1919831)).
attacker_bitstring((id_alice[],eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[]))),ec_base(y_1919831))).
6. The message id_alice[] that the attacker may have by 1 may be received at input {115}.
The message (id_alice[],eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[]))),ec_base(y_1919831)) that the attacker may have by 5 may be received at input {119}.
So the message ring_sign(eddsa_scalar(h_a[]),ec_base(f_a[]),ec_base(y_1919831),(zero,eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[]))),eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[]))),ec_base(y_1919831),ec_base(x_1919832),id_alice[],id_alice[])) may be sent to the attacker at output {129}.
attacker_ring_signature(ring_sign(eddsa_scalar(h_a[]),ec_base(f_a[]),ec_base(y_1919831),(zero,eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[]))),eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[]))),ec_base(y_1919831),ec_base(x_1919832),id_alice[],id_alice[]))).
7. The message id_alice[] that the attacker may have by 1 may be received at input {21}.
So the message ec_base(y_1919830) may be sent to the attacker at output {26}.
attacker_ec_point(ec_base(y_1919830)).
8. By 1, the attacker may know id_alice[].
By 4, the attacker may know eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[]))).
By 7, the attacker may know ec_base(y_1919830).
Using the function identity-eddsa_signature-ec_point-tuple the attacker may obtain (id_alice[],eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[]))),ec_base(y_1919830)).
attacker_bitstring((id_alice[],eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[]))),ec_base(y_1919830))).
9. The message id_alice[] that the attacker may have by 1 may be received at input {115}.
The message (id_alice[],eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[]))),ec_base(y_1919830)) that the attacker may have by 8 may be received at input {119}.
So the message ring_sign(eddsa_scalar(h_a[]),ec_base(f_a[]),ec_base(y_1919830),(zero,eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[]))),eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[]))),ec_base(y_1919830),ec_base(x_1919829),id_alice[],id_alice[])) may be sent to the attacker at output {129}.
attacker_ring_signature(ring_sign(eddsa_scalar(h_a[]),ec_base(f_a[]),ec_base(y_1919830),(zero,eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[]))),eddsa_sign(h_a[],(ec_base(eddsa_scalar(h_a[])),ec_base(f_a[]))),ec_base(y_1919830),ec_base(x_1919829),id_alice[],id_alice[]))).