-
Notifications
You must be signed in to change notification settings - Fork 8
/
test.cpp.lst
7705 lines (7375 loc) · 279 KB
/
test.cpp.lst
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
/var/folders/km/s_tzntf16nzg5bdh5n6g6lz40000gn/T/build6197327113182422462.tmp/test.cpp.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .data 00000026 00800100 0000384a 000038de 2**0
CONTENTS, ALLOC, LOAD, DATA
1 .text 0000384a 00000000 00000000 00000094 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .bss 000000b5 00800126 00800126 00003904 2**0
ALLOC
3 .debug_aranges 00000618 00000000 00000000 00003904 2**0
CONTENTS, READONLY, DEBUGGING
4 .debug_pubnames 00000cf8 00000000 00000000 00003f1c 2**0
CONTENTS, READONLY, DEBUGGING
5 .debug_info 0000865a 00000000 00000000 00004c14 2**0
CONTENTS, READONLY, DEBUGGING
6 .debug_abbrev 000017cb 00000000 00000000 0000d26e 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_line 000043db 00000000 00000000 0000ea39 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_frame 00000a90 00000000 00000000 00012e14 2**2
CONTENTS, READONLY, DEBUGGING
9 .debug_str 00001c04 00000000 00000000 000138a4 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_loc 00005932 00000000 00000000 000154a8 2**0
CONTENTS, READONLY, DEBUGGING
11 .debug_macinfo 00008959 00000000 00000000 0001adda 2**0
CONTENTS, READONLY, DEBUGGING
12 .debug_ranges 000005f8 00000000 00000000 00023733 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
00000000 <__vectors>:
int aes_gmac(
void *aes, // DHD20150614
const u8 *key, size_t key_len, const u8 *iv, size_t iv_len,
const u8 *aad, size_t aad_len, u8 *tag)
{
0: 0c 94 e8 04 jmp 0x9d0 ; 0x9d0 <__ctors_end>
timer0_millis = m;
timer0_overflow_count++;
}
unsigned long millis()
{
4: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
HardwareSerial::HardwareSerial(ring_buffer *rx_buffer, ring_buffer *tx_buffer,
volatile uint8_t *ubrrh, volatile uint8_t *ubrrl,
volatile uint8_t *ucsra, volatile uint8_t *ucsrb,
volatile uint8_t *ucsrc, volatile uint8_t *udr,
uint8_t rxen, uint8_t txen, uint8_t rxcie, uint8_t udrie, uint8_t u2x)
8: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
size_t Print::print(const char str[])
{
return write(str);
}
size_t Print::print(char c)
c: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
10: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
14: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
18: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
1c: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
20: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
24: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
28: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
2c: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
30: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
34: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
38: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
3c: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
40: 0c 94 8d 17 jmp 0x2f1a ; 0x2f1a <__vector_16>
44: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
48: 0c 94 6a 18 jmp 0x30d4 ; 0x30d4 <__vector_18>
4c: 0c 94 b8 18 jmp 0x3170 ; 0x3170 <__vector_19>
50: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
54: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
58: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
5c: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
60: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
64: 0c 94 10 05 jmp 0xa20 ; 0xa20 <__bad_interrupt>
00000068 <loop::__c>:
68: 25 25 25 20 41 6c 6c 20 74 65 73 74 73 20 63 6f %%% All tests co
78: 6d 70 6c 65 74 65 64 20 4f 4b 2c 20 72 6f 75 6e mpleted OK, roun
88: 64 20 00 d .
0000008b <loop::__c>:
8b: 54 65 73 74 73 20 73 74 61 72 74 69 6e 67 2e 2e Tests starting..
9b: 2e 20 00 . .
0000009e <error(int, int)::__c>:
9e: 20 61 74 20 6c 69 6e 65 20 00 at line .
000000a8 <error(int, int)::__c>:
a8: 20 3d 30 78 00 =0x.
000000ad <error(int, int)::__c>:
ad: 2a 2a 2a 54 65 73 74 20 46 41 49 4c 45 44 2a 2a ***Test FAILED**
bd: 2a 20 76 61 6c 3d 00 * val=.
000000c4 <Te0>:
c4: a5 63 63 c6 84 7c 7c f8 99 77 77 ee 8d 7b 7b f6 .cc..||..ww..{{.
d4: 0d f2 f2 ff bd 6b 6b d6 b1 6f 6f de 54 c5 c5 91 .....kk..oo.T...
e4: 50 30 30 60 03 01 01 02 a9 67 67 ce 7d 2b 2b 56 P00`.....gg.}++V
f4: 19 fe fe e7 62 d7 d7 b5 e6 ab ab 4d 9a 76 76 ec ....b......M.vv.
104: 45 ca ca 8f 9d 82 82 1f 40 c9 c9 89 87 7d 7d fa E.......@....}}.
114: 15 fa fa ef eb 59 59 b2 c9 47 47 8e 0b f0 f0 fb .....YY..GG.....
124: ec ad ad 41 67 d4 d4 b3 fd a2 a2 5f ea af af 45 ...Ag......_...E
134: bf 9c 9c 23 f7 a4 a4 53 96 72 72 e4 5b c0 c0 9b ...#...S.rr.[...
144: c2 b7 b7 75 1c fd fd e1 ae 93 93 3d 6a 26 26 4c ...u.......=j&&L
154: 5a 36 36 6c 41 3f 3f 7e 02 f7 f7 f5 4f cc cc 83 Z66lA??~....O...
164: 5c 34 34 68 f4 a5 a5 51 34 e5 e5 d1 08 f1 f1 f9 \44h...Q4.......
174: 93 71 71 e2 73 d8 d8 ab 53 31 31 62 3f 15 15 2a .qq.s...S11b?..*
184: 0c 04 04 08 52 c7 c7 95 65 23 23 46 5e c3 c3 9d ....R...e##F^...
194: 28 18 18 30 a1 96 96 37 0f 05 05 0a b5 9a 9a 2f (..0...7......./
1a4: 09 07 07 0e 36 12 12 24 9b 80 80 1b 3d e2 e2 df ....6..$....=...
1b4: 26 eb eb cd 69 27 27 4e cd b2 b2 7f 9f 75 75 ea &...i''N.....uu.
1c4: 1b 09 09 12 9e 83 83 1d 74 2c 2c 58 2e 1a 1a 34 ........t,,X...4
1d4: 2d 1b 1b 36 b2 6e 6e dc ee 5a 5a b4 fb a0 a0 5b -..6.nn..ZZ....[
1e4: f6 52 52 a4 4d 3b 3b 76 61 d6 d6 b7 ce b3 b3 7d .RR.M;;va......}
1f4: 7b 29 29 52 3e e3 e3 dd 71 2f 2f 5e 97 84 84 13 {))R>...q//^....
204: f5 53 53 a6 68 d1 d1 b9 00 00 00 00 2c ed ed c1 .SS.h.......,...
214: 60 20 20 40 1f fc fc e3 c8 b1 b1 79 ed 5b 5b b6 ` @.......y.[[.
224: be 6a 6a d4 46 cb cb 8d d9 be be 67 4b 39 39 72 .jj.F......gK99r
234: de 4a 4a 94 d4 4c 4c 98 e8 58 58 b0 4a cf cf 85 .JJ..LL..XX.J...
244: 6b d0 d0 bb 2a ef ef c5 e5 aa aa 4f 16 fb fb ed k...*......O....
254: c5 43 43 86 d7 4d 4d 9a 55 33 33 66 94 85 85 11 .CC..MM.U33f....
264: cf 45 45 8a 10 f9 f9 e9 06 02 02 04 81 7f 7f fe .EE.............
274: f0 50 50 a0 44 3c 3c 78 ba 9f 9f 25 e3 a8 a8 4b .PP.D<<x...%...K
284: f3 51 51 a2 fe a3 a3 5d c0 40 40 80 8a 8f 8f 05 .QQ....].@@.....
294: ad 92 92 3f bc 9d 9d 21 48 38 38 70 04 f5 f5 f1 ...?...!H88p....
2a4: df bc bc 63 c1 b6 b6 77 75 da da af 63 21 21 42 ...c...wu...c!!B
2b4: 30 10 10 20 1a ff ff e5 0e f3 f3 fd 6d d2 d2 bf 0.. ........m...
2c4: 4c cd cd 81 14 0c 0c 18 35 13 13 26 2f ec ec c3 L.......5..&/...
2d4: e1 5f 5f be a2 97 97 35 cc 44 44 88 39 17 17 2e .__....5.DD.9...
2e4: 57 c4 c4 93 f2 a7 a7 55 82 7e 7e fc 47 3d 3d 7a W......U.~~.G==z
2f4: ac 64 64 c8 e7 5d 5d ba 2b 19 19 32 95 73 73 e6 .dd..]].+..2.ss.
304: a0 60 60 c0 98 81 81 19 d1 4f 4f 9e 7f dc dc a3 .``......OO.....
314: 66 22 22 44 7e 2a 2a 54 ab 90 90 3b 83 88 88 0b f""D~**T...;....
324: ca 46 46 8c 29 ee ee c7 d3 b8 b8 6b 3c 14 14 28 .FF.)......k<..(
334: 79 de de a7 e2 5e 5e bc 1d 0b 0b 16 76 db db ad y....^^.....v...
344: 3b e0 e0 db 56 32 32 64 4e 3a 3a 74 1e 0a 0a 14 ;...V22dN::t....
354: db 49 49 92 0a 06 06 0c 6c 24 24 48 e4 5c 5c b8 .II.....l$$H.\\.
364: 5d c2 c2 9f 6e d3 d3 bd ef ac ac 43 a6 62 62 c4 ]...n......C.bb.
374: a8 91 91 39 a4 95 95 31 37 e4 e4 d3 8b 79 79 f2 ...9...17....yy.
384: 32 e7 e7 d5 43 c8 c8 8b 59 37 37 6e b7 6d 6d da 2...C...Y77n.mm.
394: 8c 8d 8d 01 64 d5 d5 b1 d2 4e 4e 9c e0 a9 a9 49 ....d....NN....I
3a4: b4 6c 6c d8 fa 56 56 ac 07 f4 f4 f3 25 ea ea cf .ll..VV.....%...
3b4: af 65 65 ca 8e 7a 7a f4 e9 ae ae 47 18 08 08 10 .ee..zz....G....
3c4: d5 ba ba 6f 88 78 78 f0 6f 25 25 4a 72 2e 2e 5c ...o.xx.o%%Jr..\
3d4: 24 1c 1c 38 f1 a6 a6 57 c7 b4 b4 73 51 c6 c6 97 $..8...W...sQ...
3e4: 23 e8 e8 cb 7c dd dd a1 9c 74 74 e8 21 1f 1f 3e #...|....tt.!..>
3f4: dd 4b 4b 96 dc bd bd 61 86 8b 8b 0d 85 8a 8a 0f .KK....a........
404: 90 70 70 e0 42 3e 3e 7c c4 b5 b5 71 aa 66 66 cc .pp.B>>|...q.ff.
414: d8 48 48 90 05 03 03 06 01 f6 f6 f7 12 0e 0e 1c .HH.............
424: a3 61 61 c2 5f 35 35 6a f9 57 57 ae d0 b9 b9 69 .aa._55j.WW....i
434: 91 86 86 17 58 c1 c1 99 27 1d 1d 3a b9 9e 9e 27 ....X...'..:...'
444: 38 e1 e1 d9 13 f8 f8 eb b3 98 98 2b 33 11 11 22 8..........+3.."
454: bb 69 69 d2 70 d9 d9 a9 89 8e 8e 07 a7 94 94 33 .ii.p..........3
464: b6 9b 9b 2d 22 1e 1e 3c 92 87 87 15 20 e9 e9 c9 ...-"..<.... ...
474: 49 ce ce 87 ff 55 55 aa 78 28 28 50 7a df df a5 I....UU.x((Pz...
484: 8f 8c 8c 03 f8 a1 a1 59 80 89 89 09 17 0d 0d 1a .......Y........
494: da bf bf 65 31 e6 e6 d7 c6 42 42 84 b8 68 68 d0 ...e1....BB..hh.
4a4: c3 41 41 82 b0 99 99 29 77 2d 2d 5a 11 0f 0f 1e .AA....)w--Z....
4b4: cb b0 b0 7b fc 54 54 a8 d6 bb bb 6d 3a 16 16 2c ...{.TT....m:..,
000004c4 <Td0>:
4c4: 50 a7 f4 51 53 65 41 7e c3 a4 17 1a 96 5e 27 3a P..QSeA~.....^':
4d4: cb 6b ab 3b f1 45 9d 1f ab 58 fa ac 93 03 e3 4b .k.;.E...X.....K
4e4: 55 fa 30 20 f6 6d 76 ad 91 76 cc 88 25 4c 02 f5 U.0 .mv..v..%L..
4f4: fc d7 e5 4f d7 cb 2a c5 80 44 35 26 8f a3 62 b5 ...O..*..D5&..b.
504: 49 5a b1 de 67 1b ba 25 98 0e ea 45 e1 c0 fe 5d IZ..g..%...E...]
514: 02 75 2f c3 12 f0 4c 81 a3 97 46 8d c6 f9 d3 6b .u/...L...F....k
524: e7 5f 8f 03 95 9c 92 15 eb 7a 6d bf da 59 52 95 ._.......zm..YR.
534: 2d 83 be d4 d3 21 74 58 29 69 e0 49 44 c8 c9 8e -....!tX)i.ID...
544: 6a 89 c2 75 78 79 8e f4 6b 3e 58 99 dd 71 b9 27 j..uxy..k>X..q.'
554: b6 4f e1 be 17 ad 88 f0 66 ac 20 c9 b4 3a ce 7d .O......f. ..:.}
564: 18 4a df 63 82 31 1a e5 60 33 51 97 45 7f 53 62 .J.c.1..`3Q.E.Sb
574: e0 77 64 b1 84 ae 6b bb 1c a0 81 fe 94 2b 08 f9 .wd...k......+..
584: 58 68 48 70 19 fd 45 8f 87 6c de 94 b7 f8 7b 52 XhHp..E..l....{R
594: 23 d3 73 ab e2 02 4b 72 57 8f 1f e3 2a ab 55 66 #.s...KrW...*.Uf
5a4: 07 28 eb b2 03 c2 b5 2f 9a 7b c5 86 a5 08 37 d3 .(...../.{....7.
5b4: f2 87 28 30 b2 a5 bf 23 ba 6a 03 02 5c 82 16 ed ..(0...#.j..\...
5c4: 2b 1c cf 8a 92 b4 79 a7 f0 f2 07 f3 a1 e2 69 4e +.....y.......iN
5d4: cd f4 da 65 d5 be 05 06 1f 62 34 d1 8a fe a6 c4 ...e.....b4.....
5e4: 9d 53 2e 34 a0 55 f3 a2 32 e1 8a 05 75 eb f6 a4 .S.4.U..2...u...
5f4: 39 ec 83 0b aa ef 60 40 06 9f 71 5e 51 10 6e bd 9.....`@..q^Q.n.
604: f9 8a 21 3e 3d 06 dd 96 ae 05 3e dd 46 bd e6 4d ..!>=.....>.F..M
614: b5 8d 54 91 05 5d c4 71 6f d4 06 04 ff 15 50 60 ..T..].qo.....P`
624: 24 fb 98 19 97 e9 bd d6 cc 43 40 89 77 9e d9 67 $........C@.w..g
634: bd 42 e8 b0 88 8b 89 07 38 5b 19 e7 db ee c8 79 .B......8[.....y
644: 47 0a 7c a1 e9 0f 42 7c c9 1e 84 f8 00 00 00 00 G.|...B|........
654: 83 86 80 09 48 ed 2b 32 ac 70 11 1e 4e 72 5a 6c ....H.+2.p..NrZl
664: fb ff 0e fd 56 38 85 0f 1e d5 ae 3d 27 39 2d 36 ....V8.....='9-6
674: 64 d9 0f 0a 21 a6 5c 68 d1 54 5b 9b 3a 2e 36 24 d...!.\h.T[.:.6$
684: b1 67 0a 0c 0f e7 57 93 d2 96 ee b4 9e 91 9b 1b .g....W.........
694: 4f c5 c0 80 a2 20 dc 61 69 4b 77 5a 16 1a 12 1c O.... .aiKwZ....
6a4: 0a ba 93 e2 e5 2a a0 c0 43 e0 22 3c 1d 17 1b 12 .....*..C."<....
6b4: 0b 0d 09 0e ad c7 8b f2 b9 a8 b6 2d c8 a9 1e 14 ...........-....
6c4: 85 19 f1 57 4c 07 75 af bb dd 99 ee fd 60 7f a3 ...WL.u......`..
6d4: 9f 26 01 f7 bc f5 72 5c c5 3b 66 44 34 7e fb 5b .&....r\.;fD4~.[
6e4: 76 29 43 8b dc c6 23 cb 68 fc ed b6 63 f1 e4 b8 v)C...#.h...c...
6f4: ca dc 31 d7 10 85 63 42 40 22 97 13 20 11 c6 84 ..1...cB@".. ...
704: 7d 24 4a 85 f8 3d bb d2 11 32 f9 ae 6d a1 29 c7 }$J..=...2..m.).
714: 4b 2f 9e 1d f3 30 b2 dc ec 52 86 0d d0 e3 c1 77 K/...0...R.....w
724: 6c 16 b3 2b 99 b9 70 a9 fa 48 94 11 22 64 e9 47 l..+..p..H.."d.G
734: c4 8c fc a8 1a 3f f0 a0 d8 2c 7d 56 ef 90 33 22 .....?...,}V..3"
744: c7 4e 49 87 c1 d1 38 d9 fe a2 ca 8c 36 0b d4 98 .NI...8.....6...
754: cf 81 f5 a6 28 de 7a a5 26 8e b7 da a4 bf ad 3f ....(.z.&......?
764: e4 9d 3a 2c 0d 92 78 50 9b cc 5f 6a 62 46 7e 54 ..:,..xP.._jbF~T
774: c2 13 8d f6 e8 b8 d8 90 5e f7 39 2e f5 af c3 82 ........^.9.....
784: be 80 5d 9f 7c 93 d0 69 a9 2d d5 6f b3 12 25 cf ..].|..i.-.o..%.
794: 3b 99 ac c8 a7 7d 18 10 6e 63 9c e8 7b bb 3b db ;....}..nc..{.;.
7a4: 09 78 26 cd f4 18 59 6e 01 b7 9a ec a8 9a 4f 83 .x&...Yn......O.
7b4: 65 6e 95 e6 7e e6 ff aa 08 cf bc 21 e6 e8 15 ef en..~......!....
7c4: d9 9b e7 ba ce 36 6f 4a d4 09 9f ea d6 7c b0 29 .....6oJ.....|.)
7d4: af b2 a4 31 31 23 3f 2a 30 94 a5 c6 c0 66 a2 35 ...11#?*0....f.5
7e4: 37 bc 4e 74 a6 ca 82 fc b0 d0 90 e0 15 d8 a7 33 7.Nt...........3
7f4: 4a 98 04 f1 f7 da ec 41 0e 50 cd 7f 2f f6 91 17 J......A.P../...
804: 8d d6 4d 76 4d b0 ef 43 54 4d aa cc df 04 96 e4 ..MvM..CTM......
814: e3 b5 d1 9e 1b 88 6a 4c b8 1f 2c c1 7f 51 65 46 ......jL..,..QeF
824: 04 ea 5e 9d 5d 35 8c 01 73 74 87 fa 2e 41 0b fb ..^.]5..st...A..
834: 5a 1d 67 b3 52 d2 db 92 33 56 10 e9 13 47 d6 6d Z.g.R...3V...G.m
844: 8c 61 d7 9a 7a 0c a1 37 8e 14 f8 59 89 3c 13 eb .a..z..7...Y.<..
854: ee 27 a9 ce 35 c9 61 b7 ed e5 1c e1 3c b1 47 7a .'..5.a.....<.Gz
864: 59 df d2 9c 3f 73 f2 55 79 ce 14 18 bf 37 c7 73 Y...?s.Uy....7.s
874: ea cd f7 53 5b aa fd 5f 14 6f 3d df 86 db 44 78 ...S[.._.o=...Dx
884: 81 f3 af ca 3e c4 68 b9 2c 34 24 38 5f 40 a3 c2 ....>.h.,4$8_@..
894: 72 c3 1d 16 0c 25 e2 bc 8b 49 3c 28 41 95 0d ff r....%...I<(A...
8a4: 71 01 a8 39 de b3 0c 08 9c e4 b4 d8 90 c1 56 64 q..9..........Vd
8b4: 61 84 cb 7b 70 b6 32 d5 74 5c 6c 48 42 57 b8 d0 a..{p.2.t\lHBW..
000008c4 <Td4s>:
8c4: 52 09 6a d5 30 36 a5 38 bf 40 a3 9e 81 f3 d7 fb R.j.06.8.@......
8d4: 7c e3 39 82 9b 2f ff 87 34 8e 43 44 c4 de e9 cb |.9../..4.CD....
8e4: 54 7b 94 32 a6 c2 23 3d ee 4c 95 0b 42 fa c3 4e T{.2..#=.L..B..N
8f4: 08 2e a1 66 28 d9 24 b2 76 5b a2 49 6d 8b d1 25 ...f(.$.v[.Im..%
904: 72 f8 f6 64 86 68 98 16 d4 a4 5c cc 5d 65 b6 92 r..d.h....\.]e..
914: 6c 70 48 50 fd ed b9 da 5e 15 46 57 a7 8d 9d 84 lpHP....^.FW....
924: 90 d8 ab 00 8c bc d3 0a f7 e4 58 05 b8 b3 45 06 ..........X...E.
934: d0 2c 1e 8f ca 3f 0f 02 c1 af bd 03 01 13 8a 6b .,...?.........k
944: 3a 91 11 41 4f 67 dc ea 97 f2 cf ce f0 b4 e6 73 :..AOg.........s
954: 96 ac 74 22 e7 ad 35 85 e2 f9 37 e8 1c 75 df 6e ..t"..5...7..u.n
964: 47 f1 1a 71 1d 29 c5 89 6f b7 62 0e aa 18 be 1b G..q.)..o.b.....
974: fc 56 3e 4b c6 d2 79 20 9a db c0 fe 78 cd 5a f4 .V>K..y ....x.Z.
984: 1f dd a8 33 88 07 c7 31 b1 12 10 59 27 80 ec 5f ...3...1...Y'.._
994: 60 51 7f a9 19 b5 4a 0d 2d e5 7a 9f 93 c9 9c ef `Q....J.-.z.....
9a4: a0 e0 3b 4d ae 2a f5 b0 c8 eb bb 3c 83 53 99 61 ..;M.*.....<.S.a
9b4: 17 2b 04 7e ba 77 d6 26 e1 69 14 63 55 21 0c 7d .+.~.w.&.i.cU!.}
000009c4 <rcons>:
9c4: 01 02 04 08 10 20 40 80 1b 36 ..... @..6
000009ce <__ctors_start>:
9ce: 24 1a sub r2, r20
000009d0 <__ctors_end>:
9d0: 11 24 eor r1, r1
9d2: 1f be out 0x3f, r1 ; 63
9d4: cf ef ldi r28, 0xFF ; 255
9d6: d8 e0 ldi r29, 0x08 ; 8
9d8: de bf out 0x3e, r29 ; 62
9da: cd bf out 0x3d, r28 ; 61
000009dc <__do_copy_data>:
9dc: 11 e0 ldi r17, 0x01 ; 1
9de: a0 e0 ldi r26, 0x00 ; 0
9e0: b1 e0 ldi r27, 0x01 ; 1
9e2: ea e4 ldi r30, 0x4A ; 74
9e4: f8 e3 ldi r31, 0x38 ; 56
9e6: 02 c0 rjmp .+4 ; 0x9ec <.do_copy_data_start>
000009e8 <.do_copy_data_loop>:
9e8: 05 90 lpm r0, Z+
9ea: 0d 92 st X+, r0
000009ec <.do_copy_data_start>:
9ec: a6 32 cpi r26, 0x26 ; 38
9ee: b1 07 cpc r27, r17
9f0: d9 f7 brne .-10 ; 0x9e8 <.do_copy_data_loop>
000009f2 <__do_clear_bss>:
9f2: 11 e0 ldi r17, 0x01 ; 1
9f4: a6 e2 ldi r26, 0x26 ; 38
9f6: b1 e0 ldi r27, 0x01 ; 1
9f8: 01 c0 rjmp .+2 ; 0x9fc <.do_clear_bss_start>
000009fa <.do_clear_bss_loop>:
9fa: 1d 92 st X+, r1
000009fc <.do_clear_bss_start>:
9fc: ab 3d cpi r26, 0xDB ; 219
9fe: b1 07 cpc r27, r17
a00: e1 f7 brne .-8 ; 0x9fa <.do_clear_bss_loop>
00000a02 <__do_global_ctors>:
a02: 19 e0 ldi r17, 0x09 ; 9
a04: c0 ed ldi r28, 0xD0 ; 208
a06: d9 e0 ldi r29, 0x09 ; 9
a08: 04 c0 rjmp .+8 ; 0xa12 <.do_global_ctors_start>
00000a0a <.do_global_ctors_loop>:
a0a: 22 97 sbiw r28, 0x02 ; 2
a0c: fe 01 movw r30, r28
a0e: 0e 94 1f 1c call 0x383e ; 0x383e <__tablejump__>
00000a12 <.do_global_ctors_start>:
a12: ce 3c cpi r28, 0xCE ; 206
a14: d1 07 cpc r29, r17
a16: c9 f7 brne .-14 ; 0xa0a <.do_global_ctors_loop>
a18: 0e 94 7a 1a call 0x34f4 ; 0x34f4 <main>
a1c: 0c 94 23 1c jmp 0x3846 ; 0x3846 <_exit>
00000a20 <__bad_interrupt>:
a20: 0c 94 00 00 jmp 0 ; 0x0 <__vectors>
00000a24 <memcmp>:
a24: fb 01 movw r30, r22
a26: dc 01 movw r26, r24
a28: 04 c0 rjmp .+8 ; 0xa32 <memcmp+0xe>
a2a: 8d 91 ld r24, X+
a2c: 01 90 ld r0, Z+
a2e: 80 19 sub r24, r0
a30: 21 f4 brne .+8 ; 0xa3a <memcmp+0x16>
a32: 41 50 subi r20, 0x01 ; 1
a34: 50 40 sbci r21, 0x00 ; 0
a36: c8 f7 brcc .-14 ; 0xa2a <memcmp+0x6>
a38: 88 1b sub r24, r24
a3a: 99 0b sbc r25, r25
a3c: 08 95 ret
00000a3e <memcpy>:
a3e: fb 01 movw r30, r22
a40: dc 01 movw r26, r24
a42: 02 c0 rjmp .+4 ; 0xa48 <memcpy+0xa>
a44: 01 90 ld r0, Z+
a46: 0d 92 st X+, r0
a48: 41 50 subi r20, 0x01 ; 1
a4a: 50 40 sbci r21, 0x00 ; 0
a4c: d8 f7 brcc .-10 ; 0xa44 <memcpy+0x6>
a4e: 08 95 ret
00000a50 <memset>:
a50: dc 01 movw r26, r24
a52: 01 c0 rjmp .+2 ; 0xa56 <memset+0x6>
a54: 6d 93 st X+, r22
a56: 41 50 subi r20, 0x01 ; 1
a58: 50 40 sbci r21, 0x00 ; 0
a5a: e0 f7 brcc .-8 ; 0xa54 <memset+0x4>
a5c: 08 95 ret
00000a5e <error(int, int)>:
// Error exit from failed unit test, one int parameter and the failing line number to print...
// Expects to terminate like panic() with flashing light can be detected by eye or in hardware if required.
static void error(int err, int line)
a5e: 0f 93 push r16
a60: 1f 93 push r17
a62: cf 93 push r28
a64: df 93 push r29
a66: 8c 01 movw r16, r24
a68: eb 01 movw r28, r22
{
for( ; ; )
{
Serial.print(F("***Test FAILED*** val="));
a6a: 89 eb ldi r24, 0xB9 ; 185
a6c: 91 e0 ldi r25, 0x01 ; 1
a6e: 6d ea ldi r22, 0xAD ; 173
a70: 70 e0 ldi r23, 0x00 ; 0
a72: 0e 94 b3 1a call 0x3566 ; 0x3566 <Print::print(__FlashStringHelper const*)>
Serial.print(err, DEC);
a76: 89 eb ldi r24, 0xB9 ; 185
a78: 91 e0 ldi r25, 0x01 ; 1
a7a: b8 01 movw r22, r16
a7c: 4a e0 ldi r20, 0x0A ; 10
a7e: 50 e0 ldi r21, 0x00 ; 0
a80: 0e 94 b6 1b call 0x376c ; 0x376c <Print::print(int, int)>
Serial.print(F(" =0x"));
a84: 89 eb ldi r24, 0xB9 ; 185
a86: 91 e0 ldi r25, 0x01 ; 1
a88: 68 ea ldi r22, 0xA8 ; 168
a8a: 70 e0 ldi r23, 0x00 ; 0
a8c: 0e 94 b3 1a call 0x3566 ; 0x3566 <Print::print(__FlashStringHelper const*)>
Serial.print(err, HEX);
a90: 89 eb ldi r24, 0xB9 ; 185
a92: 91 e0 ldi r25, 0x01 ; 1
a94: b8 01 movw r22, r16
a96: 40 e1 ldi r20, 0x10 ; 16
a98: 50 e0 ldi r21, 0x00 ; 0
a9a: 0e 94 b6 1b call 0x376c ; 0x376c <Print::print(int, int)>
if(0 != line)
a9e: 20 97 sbiw r28, 0x00 ; 0
aa0: 69 f0 breq .+26 ; 0xabc <error(int, int)+0x5e>
{
Serial.print(F(" at line "));
aa2: 89 eb ldi r24, 0xB9 ; 185
aa4: 91 e0 ldi r25, 0x01 ; 1
aa6: 6e e9 ldi r22, 0x9E ; 158
aa8: 70 e0 ldi r23, 0x00 ; 0
aaa: 0e 94 b3 1a call 0x3566 ; 0x3566 <Print::print(__FlashStringHelper const*)>
Serial.print(line);
aae: 89 eb ldi r24, 0xB9 ; 185
ab0: 91 e0 ldi r25, 0x01 ; 1
ab2: be 01 movw r22, r28
ab4: 4a e0 ldi r20, 0x0A ; 10
ab6: 50 e0 ldi r21, 0x00 ; 0
ab8: 0e 94 b6 1b call 0x376c ; 0x376c <Print::print(int, int)>
}
Serial.println();
abc: 89 eb ldi r24, 0xB9 ; 185
abe: 91 e0 ldi r25, 0x01 ; 1
ac0: 0e 94 d6 1a call 0x35ac ; 0x35ac <Print::println()>
// LED_HEATCALL_ON();
// tinyPause();
// LED_HEATCALL_OFF();
// sleepLowPowerMs(1000);
delay(1000);
ac4: 68 ee ldi r22, 0xE8 ; 232
ac6: 73 e0 ldi r23, 0x03 ; 3
ac8: 80 e0 ldi r24, 0x00 ; 0
aca: 90 e0 ldi r25, 0x00 ; 0
acc: 0e 94 d5 17 call 0x2faa ; 0x2faa <delay>
ad0: cc cf rjmp .-104 ; 0xa6a <error(int, int)+0xc>
00000ad2 <testAESGCMAll0()>:
// // Check that the decryption result matches.
// assertTrue((Arrays.equals(input, plainText)));
// }
// Check that all zeros key, plaintext and ADATA gives the correct result.
static void testAESGCMAll0()
ad2: 8f 92 push r8
ad4: 9f 92 push r9
ad6: af 92 push r10
ad8: bf 92 push r11
ada: cf 92 push r12
adc: df 92 push r13
ade: ef 92 push r14
ae0: ff 92 push r15
ae2: 0f 93 push r16
ae4: 1f 93 push r17
ae6: df 93 push r29
ae8: cf 93 push r28
aea: cd b7 in r28, 0x3d ; 61
aec: de b7 in r29, 0x3e ; 62
aee: ce 57 subi r28, 0x7E ; 126
af0: d1 40 sbci r29, 0x01 ; 1
af2: 0f b6 in r0, 0x3f ; 63
af4: f8 94 cli
af6: de bf out 0x3e, r29 ; 62
af8: 0f be out 0x3f, r0 ; 63
afa: cd bf out 0x3d, r28 ; 61
{
Serial.println("AESGCMAll0");
afc: 89 eb ldi r24, 0xB9 ; 185
afe: 91 e0 ldi r25, 0x01 ; 1
b00: 60 e0 ldi r22, 0x00 ; 0
b02: 71 e0 ldi r23, 0x01 ; 1
b04: 0e 94 c9 1b call 0x3792 ; 0x3792 <Print::println(char const*)>
// Inputs to encryption.
uint8_t input[30]; // All-zeros input, typical input size.
memset(input, 0, sizeof(input));
b08: f1 e3 ldi r31, 0x31 ; 49
b0a: ef 2e mov r14, r31
b0c: f1 2c mov r15, r1
b0e: ec 0e add r14, r28
b10: fd 1e adc r15, r29
b12: 8e e1 ldi r24, 0x1E ; 30
b14: f7 01 movw r30, r14
b16: 11 92 st Z+, r1
b18: 8a 95 dec r24
b1a: e9 f7 brne .-6 ; 0xb16 <testAESGCMAll0()+0x44>
uint8_t key[AES_KEY_SIZE/8];
memset(key, 0, sizeof(key)); // All-zeros key.
b1c: de 01 movw r26, r28
b1e: 51 96 adiw r26, 0x11 ; 17
b20: 80 e1 ldi r24, 0x10 ; 16
b22: fd 01 movw r30, r26
b24: 11 92 st Z+, r1
b26: 8a 95 dec r24
b28: e9 f7 brne .-6 ; 0xb24 <testAESGCMAll0()+0x52>
uint8_t nonce[GCM_NONCE_LENGTH];
memset(nonce, 0, sizeof(nonce)); // All-zeros nonce.
b2a: 9e 01 movw r18, r28
b2c: 2b 5f subi r18, 0xFB ; 251
b2e: 3f 4f sbci r19, 0xFF ; 255
b30: 8c e0 ldi r24, 0x0C ; 12
b32: f9 01 movw r30, r18
b34: 11 92 st Z+, r1
b36: 8a 95 dec r24
b38: e9 f7 brne .-6 ; 0xb34 <testAESGCMAll0()+0x62>
uint8_t aad[4];
memset(aad, 0, sizeof(aad)); // All-zeros ADATA.
b3a: 19 82 std Y+1, r1 ; 0x01
b3c: 1a 82 std Y+2, r1 ; 0x02
b3e: 1b 82 std Y+3, r1 ; 0x03
b40: 1c 82 std Y+4, r1 ; 0x04
uint8_t tag[GCM_TAG_LENGTH]; // Space for tag.
uint8_t cipherText[sizeof(input)]; // Space for encrypted text.
// Instance to perform enc/dec.
OpenTRV::AESGCM::AES128GCM16small eo;
// Do encryption.
AssertIsTrue(eo.encrypt(
b42: 00 d0 rcall .+0 ; 0xb44 <testAESGCMAll0()+0x72>
b44: 00 d0 rcall .+0 ; 0xb46 <testAESGCMAll0()+0x74>
b46: ce 01 movw r24, r28
b48: 81 5b subi r24, 0xB1 ; 177
b4a: 9f 4f sbci r25, 0xFF ; 255
b4c: ed b7 in r30, 0x3d ; 61
b4e: fe b7 in r31, 0x3e ; 62
b50: 92 83 std Z+2, r25 ; 0x02
b52: 81 83 std Z+1, r24 ; 0x01
b54: ce 01 movw r24, r28
b56: 81 96 adiw r24, 0x21 ; 33
b58: 94 83 std Z+4, r25 ; 0x04
b5a: 83 83 std Z+3, r24 ; 0x03
b5c: ce 01 movw r24, r28
b5e: 85 57 subi r24, 0x75 ; 117
b60: 9f 4f sbci r25, 0xFF ; 255
b62: bd 01 movw r22, r26
b64: 40 e1 ldi r20, 0x10 ; 16
b66: 50 e0 ldi r21, 0x00 ; 0
b68: 0c e0 ldi r16, 0x0C ; 12
b6a: 10 e0 ldi r17, 0x00 ; 0
b6c: ee e1 ldi r30, 0x1E ; 30
b6e: ce 2e mov r12, r30
b70: d1 2c mov r13, r1
b72: 5e 01 movw r10, r28
b74: 08 94 sec
b76: a1 1c adc r10, r1
b78: b1 1c adc r11, r1
b7a: b4 e0 ldi r27, 0x04 ; 4
b7c: 8b 2e mov r8, r27
b7e: 91 2c mov r9, r1
b80: 0e 94 15 07 call 0xe2a ; 0xe2a <OpenTRV::AESGCM::AES128GCM16small::encrypt(unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char*, unsigned char*)>
b84: 0f 90 pop r0
b86: 0f 90 pop r0
b88: 0f 90 pop r0
b8a: 0f 90 pop r0
b8c: 88 23 and r24, r24
b8e: 31 f4 brne .+12 ; 0xb9c <testAESGCMAll0()+0xca>
b90: 80 e0 ldi r24, 0x00 ; 0
b92: 90 e0 ldi r25, 0x00 ; 0
b94: 6e e8 ldi r22, 0x8E ; 142
b96: 70 e0 ldi r23, 0x00 ; 0
b98: 0e 94 2f 05 call 0xa5e ; 0xa5e <error(int, int)>
input, sizeof(input),
aad, sizeof(aad),
cipherText, tag));
// Check some of the cipher text and tag.
// "0388DACE60B6A392F328C2B971B2FE78F795AAAB494B5923F7FD89FF948B614772C7929CD0DD681BD8A37A656F33" :
AssertIsEqual(0x03, cipherText[0]);
b9c: fe 01 movw r30, r28
b9e: e1 5b subi r30, 0xB1 ; 177
ba0: ff 4f sbci r31, 0xFF ; 255
ba2: 80 81 ld r24, Z
ba4: 90 e0 ldi r25, 0x00 ; 0
delay(1000);
}
}
// Deal with common equality test.
static inline void errorIfNotEqual(int expected, int actual, int line) { if(expected != actual) { error(actual, line); } }
ba6: 83 30 cpi r24, 0x03 ; 3
ba8: 91 05 cpc r25, r1
baa: 21 f0 breq .+8 ; 0xbb4 <testAESGCMAll0()+0xe2>
bac: 61 e9 ldi r22, 0x91 ; 145
bae: 70 e0 ldi r23, 0x00 ; 0
bb0: 0e 94 2f 05 call 0xa5e ; 0xa5e <error(int, int)>
aad, sizeof(aad),
cipherText, tag));
// Check some of the cipher text and tag.
// "0388DACE60B6A392F328C2B971B2FE78F795AAAB494B5923F7FD89FF948B614772C7929CD0DD681BD8A37A656F33" :
AssertIsEqual(0x03, cipherText[0]);
AssertIsEqual(0x88, cipherText[1]);
bb4: fe 01 movw r30, r28
bb6: e1 5b subi r30, 0xB1 ; 177
bb8: ff 4f sbci r31, 0xFF ; 255
bba: 81 81 ldd r24, Z+1 ; 0x01
bbc: 90 e0 ldi r25, 0x00 ; 0
delay(1000);
}
}
// Deal with common equality test.
static inline void errorIfNotEqual(int expected, int actual, int line) { if(expected != actual) { error(actual, line); } }
bbe: 88 38 cpi r24, 0x88 ; 136
bc0: 91 05 cpc r25, r1
bc2: 21 f0 breq .+8 ; 0xbcc <testAESGCMAll0()+0xfa>
bc4: 62 e9 ldi r22, 0x92 ; 146
bc6: 70 e0 ldi r23, 0x00 ; 0
bc8: 0e 94 2f 05 call 0xa5e ; 0xa5e <error(int, int)>
cipherText, tag));
// Check some of the cipher text and tag.
// "0388DACE60B6A392F328C2B971B2FE78F795AAAB494B5923F7FD89FF948B614772C7929CD0DD681BD8A37A656F33" :
AssertIsEqual(0x03, cipherText[0]);
AssertIsEqual(0x88, cipherText[1]);
AssertIsEqual(0x8b, cipherText[sizeof(cipherText)-1]);
bcc: fe 01 movw r30, r28
bce: e1 5b subi r30, 0xB1 ; 177
bd0: ff 4f sbci r31, 0xFF ; 255
bd2: 85 8d ldd r24, Z+29 ; 0x1d
bd4: 90 e0 ldi r25, 0x00 ; 0
delay(1000);
}
}
// Deal with common equality test.
static inline void errorIfNotEqual(int expected, int actual, int line) { if(expected != actual) { error(actual, line); } }
bd6: 8b 38 cpi r24, 0x8B ; 139
bd8: 91 05 cpc r25, r1
bda: 21 f0 breq .+8 ; 0xbe4 <testAESGCMAll0()+0x112>
bdc: 63 e9 ldi r22, 0x93 ; 147
bde: 70 e0 ldi r23, 0x00 ; 0
be0: 0e 94 2f 05 call 0xa5e ; 0xa5e <error(int, int)>
// Check some of the cipher text and tag.
// "0388DACE60B6A392F328C2B971B2FE78F795AAAB494B5923F7FD89FF948B614772C7929CD0DD681BD8A37A656F33" :
AssertIsEqual(0x03, cipherText[0]);
AssertIsEqual(0x88, cipherText[1]);
AssertIsEqual(0x8b, cipherText[sizeof(cipherText)-1]);
AssertIsEqual(0x61, tag[0]);
be4: 89 a1 ldd r24, Y+33 ; 0x21
be6: 90 e0 ldi r25, 0x00 ; 0
delay(1000);
}
}
// Deal with common equality test.
static inline void errorIfNotEqual(int expected, int actual, int line) { if(expected != actual) { error(actual, line); } }
be8: 81 36 cpi r24, 0x61 ; 97
bea: 91 05 cpc r25, r1
bec: 21 f0 breq .+8 ; 0xbf6 <testAESGCMAll0()+0x124>
bee: 64 e9 ldi r22, 0x94 ; 148
bf0: 70 e0 ldi r23, 0x00 ; 0
bf2: 0e 94 2f 05 call 0xa5e ; 0xa5e <error(int, int)>
// "0388DACE60B6A392F328C2B971B2FE78F795AAAB494B5923F7FD89FF948B614772C7929CD0DD681BD8A37A656F33" :
AssertIsEqual(0x03, cipherText[0]);
AssertIsEqual(0x88, cipherText[1]);
AssertIsEqual(0x8b, cipherText[sizeof(cipherText)-1]);
AssertIsEqual(0x61, tag[0]);
AssertIsEqual(0x33, tag[15]);
bf6: 88 a9 ldd r24, Y+48 ; 0x30
bf8: 90 e0 ldi r25, 0x00 ; 0
delay(1000);
}
}
// Deal with common equality test.
static inline void errorIfNotEqual(int expected, int actual, int line) { if(expected != actual) { error(actual, line); } }
bfa: 83 33 cpi r24, 0x33 ; 51
bfc: 91 05 cpc r25, r1
bfe: 21 f0 breq .+8 ; 0xc08 <testAESGCMAll0()+0x136>
c00: 65 e9 ldi r22, 0x95 ; 149
c02: 70 e0 ldi r23, 0x00 ; 0
c04: 0e 94 2f 05 call 0xa5e ; 0xa5e <error(int, int)>
AssertIsEqual(0x61, tag[0]);
AssertIsEqual(0x33, tag[15]);
// Decrypt...
uint8_t plain[sizeof(cipherText)]; // Space for decrypted text.
AssertIsTrue(eo.decrypt(
c08: 00 d0 rcall .+0 ; 0xc0a <testAESGCMAll0()+0x138>
c0a: 00 d0 rcall .+0 ; 0xc0c <testAESGCMAll0()+0x13a>
c0c: ce 01 movw r24, r28
c0e: 81 96 adiw r24, 0x21 ; 33
c10: ed b7 in r30, 0x3d ; 61
c12: fe b7 in r31, 0x3e ; 62
c14: 92 83 std Z+2, r25 ; 0x02
c16: 81 83 std Z+1, r24 ; 0x01
c18: ce 01 movw r24, r28
c1a: 83 59 subi r24, 0x93 ; 147
c1c: 9f 4f sbci r25, 0xFF ; 255
c1e: 94 83 std Z+4, r25 ; 0x04
c20: 83 83 std Z+3, r24 ; 0x03
c22: ce 01 movw r24, r28
c24: 85 57 subi r24, 0x75 ; 117
c26: 9f 4f sbci r25, 0xFF ; 255
c28: be 01 movw r22, r28
c2a: 6f 5e subi r22, 0xEF ; 239
c2c: 7f 4f sbci r23, 0xFF ; 255
c2e: 40 e1 ldi r20, 0x10 ; 16
c30: 50 e0 ldi r21, 0x00 ; 0
c32: 9e 01 movw r18, r28
c34: 2b 5f subi r18, 0xFB ; 251
c36: 3f 4f sbci r19, 0xFF ; 255
c38: 0c e0 ldi r16, 0x0C ; 12
c3a: 10 e0 ldi r17, 0x00 ; 0
c3c: af e4 ldi r26, 0x4F ; 79
c3e: ea 2e mov r14, r26
c40: f1 2c mov r15, r1
c42: ec 0e add r14, r28
c44: fd 1e adc r15, r29
c46: fe e1 ldi r31, 0x1E ; 30
c48: cf 2e mov r12, r31
c4a: d1 2c mov r13, r1
c4c: 5e 01 movw r10, r28
c4e: 08 94 sec
c50: a1 1c adc r10, r1
c52: b1 1c adc r11, r1
c54: e4 e0 ldi r30, 0x04 ; 4
c56: 8e 2e mov r8, r30
c58: 91 2c mov r9, r1
c5a: 0e 94 c2 06 call 0xd84 ; 0xd84 <OpenTRV::AESGCM::AES128GCM16small::decrypt(unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned char*)>
c5e: 0f 90 pop r0
c60: 0f 90 pop r0
c62: 0f 90 pop r0
c64: 0f 90 pop r0
c66: 88 23 and r24, r24
c68: 31 f4 brne .+12 ; 0xc76 <testAESGCMAll0()+0x1a4>
c6a: 80 e0 ldi r24, 0x00 ; 0
c6c: 90 e0 ldi r25, 0x00 ; 0
c6e: 6e e9 ldi r22, 0x9E ; 158
c70: 70 e0 ldi r23, 0x00 ; 0
c72: 0e 94 2f 05 call 0xa5e ; 0xa5e <error(int, int)>
key, (size_t) sizeof(key),
nonce, sizeof(nonce),
cipherText, sizeof(cipherText),
aad, sizeof(aad), tag,
plain));
AssertIsEqual(0, memcmp(input, plain, sizeof(input))); // 0 indicates plain text recovered correctly.
c76: ce 01 movw r24, r28
c78: c1 96 adiw r24, 0x31 ; 49
c7a: be 01 movw r22, r28
c7c: 63 59 subi r22, 0x93 ; 147
c7e: 7f 4f sbci r23, 0xFF ; 255
c80: 4e e1 ldi r20, 0x1E ; 30
c82: 50 e0 ldi r21, 0x00 ; 0
c84: 0e 94 12 05 call 0xa24 ; 0xa24 <memcmp>
delay(1000);
}
}
// Deal with common equality test.
static inline void errorIfNotEqual(int expected, int actual, int line) { if(expected != actual) { error(actual, line); } }
c88: 00 97 sbiw r24, 0x00 ; 0
c8a: 21 f0 breq .+8 ; 0xc94 <testAESGCMAll0()+0x1c2>
c8c: 6f e9 ldi r22, 0x9F ; 159
c8e: 70 e0 ldi r23, 0x00 ; 0
c90: 0e 94 2f 05 call 0xa5e ; 0xa5e <error(int, int)>
nonce, sizeof(nonce),
cipherText, sizeof(cipherText),
aad, sizeof(aad), tag,
plain));
AssertIsEqual(0, memcmp(input, plain, sizeof(input))); // 0 indicates plain text recovered correctly.
}
c94: c2 58 subi r28, 0x82 ; 130
c96: de 4f sbci r29, 0xFE ; 254
c98: 0f b6 in r0, 0x3f ; 63
c9a: f8 94 cli
c9c: de bf out 0x3e, r29 ; 62
c9e: 0f be out 0x3f, r0 ; 63
ca0: cd bf out 0x3d, r28 ; 61
ca2: cf 91 pop r28
ca4: df 91 pop r29
ca6: 1f 91 pop r17
ca8: 0f 91 pop r16
caa: ff 90 pop r15
cac: ef 90 pop r14
cae: df 90 pop r13
cb0: cf 90 pop r12
cb2: bf 90 pop r11
cb4: af 90 pop r10
cb6: 9f 90 pop r9
cb8: 8f 90 pop r8
cba: 08 95 ret
00000cbc <loop>:
// To be called from loop() instead of main code when running unit tests.
// Tests generally flag an error and stop the test cycle with a call to panic() or error().
void loop()
cbc: cf 93 push r28
cbe: df 93 push r29
cc0: c3 e0 ldi r28, 0x03 ; 3
cc2: d0 e0 ldi r29, 0x00 ; 0
static int loopCount = 0;
// Allow the terminal console to be brought up.
for(int i = 3; i > 0; --i)
{
Serial.print(F("Tests starting... "));
cc4: 89 eb ldi r24, 0xB9 ; 185
cc6: 91 e0 ldi r25, 0x01 ; 1
cc8: 6b e8 ldi r22, 0x8B ; 139
cca: 70 e0 ldi r23, 0x00 ; 0
ccc: 0e 94 b3 1a call 0x3566 ; 0x3566 <Print::print(__FlashStringHelper const*)>
Serial.print(i);
cd0: 89 eb ldi r24, 0xB9 ; 185
cd2: 91 e0 ldi r25, 0x01 ; 1
cd4: be 01 movw r22, r28
cd6: 4a e0 ldi r20, 0x0A ; 10
cd8: 50 e0 ldi r21, 0x00 ; 0
cda: 0e 94 b6 1b call 0x376c ; 0x376c <Print::print(int, int)>
Serial.println();
cde: 89 eb ldi r24, 0xB9 ; 185
ce0: 91 e0 ldi r25, 0x01 ; 1
ce2: 0e 94 d6 1a call 0x35ac ; 0x35ac <Print::println()>
delay(1000);
ce6: 68 ee ldi r22, 0xE8 ; 232
ce8: 73 e0 ldi r23, 0x03 ; 3
cea: 80 e0 ldi r24, 0x00 ; 0
cec: 90 e0 ldi r25, 0x00 ; 0
cee: 0e 94 d5 17 call 0x2faa ; 0x2faa <delay>
void loop()
{
static int loopCount = 0;
// Allow the terminal console to be brought up.
for(int i = 3; i > 0; --i)
cf2: 21 97 sbiw r28, 0x01 ; 1
cf4: 39 f7 brne .-50 ; 0xcc4 <loop+0x8>
Serial.print(F("Tests starting... "));
Serial.print(i);
Serial.println();
delay(1000);
}
Serial.println();
cf6: 89 eb ldi r24, 0xB9 ; 185
cf8: 91 e0 ldi r25, 0x01 ; 1
cfa: 0e 94 d6 1a call 0x35ac ; 0x35ac <Print::println()>
// Check that correct version of library is under test.
static void testLibVersion()
{
Serial.println("LibVersion");
cfe: 89 eb ldi r24, 0xB9 ; 185
d00: 91 e0 ldi r25, 0x01 ; 1
d02: 6b e0 ldi r22, 0x0B ; 11
d04: 71 e0 ldi r23, 0x01 ; 1
d06: 0e 94 c9 1b call 0x3792 ; 0x3792 <Print::println(char const*)>
Serial.println();
// Run the tests, fastest / newest / most-fragile / most-interesting first...
testLibVersion();
testAESGCMAll0();
d0a: 0e 94 69 05 call 0xad2 ; 0xad2 <testAESGCMAll0()>
// Announce successful loop completion and count.
++loopCount;
d0e: 80 91 26 01 lds r24, 0x0126
d12: 90 91 27 01 lds r25, 0x0127
d16: 01 96 adiw r24, 0x01 ; 1
d18: 90 93 27 01 sts 0x0127, r25
d1c: 80 93 26 01 sts 0x0126, r24
Serial.println();
d20: 89 eb ldi r24, 0xB9 ; 185
d22: 91 e0 ldi r25, 0x01 ; 1
d24: 0e 94 d6 1a call 0x35ac ; 0x35ac <Print::println()>
Serial.print(F("%%% All tests completed OK, round "));
d28: 89 eb ldi r24, 0xB9 ; 185
d2a: 91 e0 ldi r25, 0x01 ; 1
d2c: 68 e6 ldi r22, 0x68 ; 104
d2e: 70 e0 ldi r23, 0x00 ; 0
d30: 0e 94 b3 1a call 0x3566 ; 0x3566 <Print::print(__FlashStringHelper const*)>
Serial.print(loopCount);
d34: 60 91 26 01 lds r22, 0x0126
d38: 70 91 27 01 lds r23, 0x0127
d3c: 89 eb ldi r24, 0xB9 ; 185
d3e: 91 e0 ldi r25, 0x01 ; 1
d40: 4a e0 ldi r20, 0x0A ; 10
d42: 50 e0 ldi r21, 0x00 ; 0
d44: 0e 94 b6 1b call 0x376c ; 0x376c <Print::print(int, int)>
Serial.println();
d48: 89 eb ldi r24, 0xB9 ; 185
d4a: 91 e0 ldi r25, 0x01 ; 1
d4c: 0e 94 d6 1a call 0x35ac ; 0x35ac <Print::println()>
Serial.println();
d50: 89 eb ldi r24, 0xB9 ; 185
d52: 91 e0 ldi r25, 0x01 ; 1
d54: 0e 94 d6 1a call 0x35ac ; 0x35ac <Print::println()>
Serial.println();
d58: 89 eb ldi r24, 0xB9 ; 185
d5a: 91 e0 ldi r25, 0x01 ; 1
d5c: 0e 94 d6 1a call 0x35ac ; 0x35ac <Print::println()>
delay(2000);
d60: 60 ed ldi r22, 0xD0 ; 208
d62: 77 e0 ldi r23, 0x07 ; 7
d64: 80 e0 ldi r24, 0x00 ; 0
d66: 90 e0 ldi r25, 0x00 ; 0
d68: 0e 94 d5 17 call 0x2faa ; 0x2faa <delay>
}
d6c: df 91 pop r29
d6e: cf 91 pop r28
d70: 08 95 ret
00000d72 <setup>:
void setup()
{
// initialize serial communications at 9600 bps.
Serial.begin(9600);
d72: 89 eb ldi r24, 0xB9 ; 185
d74: 91 e0 ldi r25, 0x01 ; 1
d76: 40 e8 ldi r20, 0x80 ; 128
d78: 55 e2 ldi r21, 0x25 ; 37
d7a: 60 e0 ldi r22, 0x00 ; 0
d7c: 70 e0 ldi r23, 0x00 ; 0
d7e: 0e 94 f3 18 call 0x31e6 ; 0x31e6 <HardwareSerial::begin(unsigned long)>
}
d82: 08 95 ret
00000d84 <OpenTRV::AESGCM::AES128GCM16small::decrypt(unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned char*)>:
bool OpenTRV::AESGCM::AES128GCM16small::decrypt(
const uint8_t *const key, const size_t key_len,
const uint8_t *const iv, const size_t iv_len,
const uint8_t *const crypt, const size_t crypt_len,
const uint8_t *const aad, const size_t aad_len, const uint8_t *const tag,
uint8_t *const plain)
d84: 6f 92 push r6
d86: 7f 92 push r7
d88: 8f 92 push r8
d8a: 9f 92 push r9
d8c: af 92 push r10
d8e: bf 92 push r11
d90: cf 92 push r12
d92: df 92 push r13
d94: ef 92 push r14
d96: ff 92 push r15
d98: 0f 93 push r16
d9a: 1f 93 push r17
d9c: df 93 push r29
d9e: cf 93 push r28
da0: cd b7 in r28, 0x3d ; 61
da2: de b7 in r29, 0x3e ; 62
da4: 69 88 ldd r6, Y+17 ; 0x11
da6: 7a 88 ldd r7, Y+18 ; 0x12
da8: ab 89 ldd r26, Y+19 ; 0x13
daa: bc 89 ldd r27, Y+20 ; 0x14
{
// Some parameter validation.
// Only expecting 16-byte (128-bit) key for AES-128.
if((NULL == key) || (16 != key_len)) { return(false); }
dac: 61 15 cp r22, r1
dae: 71 05 cpc r23, r1
db0: 59 f1 breq .+86 ; 0xe08 <OpenTRV::AESGCM::AES128GCM16small::decrypt(unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned char*)+0x84>
db2: 40 31 cpi r20, 0x10 ; 16
db4: 51 05 cpc r21, r1
db6: 41 f5 brne .+80 ; 0xe08 <OpenTRV::AESGCM::AES128GCM16small::decrypt(unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned char*)+0x84>
// Only expecting 12-byte (96-bit) IV/nonce for AES-128.
if((NULL == iv) || (12 != iv_len)) { return(false); }
db8: 21 15 cp r18, r1
dba: 31 05 cpc r19, r1
dbc: 29 f1 breq .+74 ; 0xe08 <OpenTRV::AESGCM::AES128GCM16small::decrypt(unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned char*)+0x84>
dbe: 0c 30 cpi r16, 0x0C ; 12
dc0: 11 05 cpc r17, r1
dc2: 11 f5 brne .+68 ; 0xe08 <OpenTRV::AESGCM::AES128GCM16small::decrypt(unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned char*)+0x84>
// For now insist on both plain and ADATA parts, possibly length zero.
if(NULL == crypt) { return(false); }
dc4: e1 14 cp r14, r1
dc6: f1 04 cpc r15, r1
dc8: f9 f0 breq .+62 ; 0xe08 <OpenTRV::AESGCM::AES128GCM16small::decrypt(unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned char*)+0x84>
if(NULL == aad) { return(false); }
dca: a1 14 cp r10, r1
dcc: b1 04 cpc r11, r1
dce: e1 f0 breq .+56 ; 0xe08 <OpenTRV::AESGCM::AES128GCM16small::decrypt(unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned char*)+0x84>
if(NULL == tag) { return(false); }
dd0: 61 14 cp r6, r1
dd2: 71 04 cpc r7, r1
dd4: c9 f0 breq .+50 ; 0xe08 <OpenTRV::AESGCM::AES128GCM16small::decrypt(unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned char*)+0x84>
// Must have targets to write results to.
if(NULL == plain) { return(false); }
dd6: 10 97 sbiw r26, 0x00 ; 0
dd8: b9 f0 breq .+46 ; 0xe08 <OpenTRV::AESGCM::AES128GCM16small::decrypt(unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned char*)+0x84>
return(0 == aes_gcm_ad(context,
key, key_len,
iv, iv_len,
crypt, crypt_len,
aad, aad_len, tag,
plain));
dda: 00 d0 rcall .+0 ; 0xddc <OpenTRV::AESGCM::AES128GCM16small::decrypt(unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned char*)+0x58>
ddc: 00 d0 rcall .+0 ; 0xdde <OpenTRV::AESGCM::AES128GCM16small::decrypt(unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned int, unsigned char const*, unsigned char*)+0x5a>
dde: ed b7 in r30, 0x3d ; 61
de0: fe b7 in r31, 0x3e ; 62
de2: 72 82 std Z+2, r7 ; 0x02
de4: 61 82 std Z+1, r6 ; 0x01
de6: b4 83 std Z+4, r27 ; 0x04
de8: a3 83 std Z+3, r26 ; 0x03
dea: 40 e1 ldi r20, 0x10 ; 16
dec: 50 e0 ldi r21, 0x00 ; 0
dee: 0c e0 ldi r16, 0x0C ; 12
df0: 10 e0 ldi r17, 0x00 ; 0
df2: 0e 94 03 0d call 0x1a06 ; 0x1a06 <aes_gcm_ad>
df6: 20 e0 ldi r18, 0x00 ; 0
df8: 0f 90 pop r0