Hans Martin vor 3 Jahren
Ursprung
Commit
4857f11876

Datei-Diff unterdrückt, da er zu groß ist
+ 834 - 26
Speck-Analysis.ipynb


+ 19 - 19
cw_firmware/objdir-CWLITEARM/simple-speck.lst

@@ -488,25 +488,25 @@
  375              		.file 8 "<built-in>"
 DEFINED SYMBOLS
                             *ABS*:0000000000000000 simple-speck.c
-     /tmp/ccMYqZ7t.s:16     .text.set_key:0000000000000000 $t
-     /tmp/ccMYqZ7t.s:24     .text.set_key:0000000000000000 set_key
-     /tmp/ccMYqZ7t.s:48     .text.set_key:0000000000000010 $d
-     /tmp/ccMYqZ7t.s:53     .text.get_key:0000000000000000 $t
-     /tmp/ccMYqZ7t.s:60     .text.get_key:0000000000000000 get_key
-     /tmp/ccMYqZ7t.s:91     .text.get_key:0000000000000010 $d
-     /tmp/ccMYqZ7t.s:96     .text.reset:0000000000000000 $t
-     /tmp/ccMYqZ7t.s:103    .text.reset:0000000000000000 reset
-     /tmp/ccMYqZ7t.s:138    .text.get_pt:0000000000000000 $t
-     /tmp/ccMYqZ7t.s:145    .text.get_pt:0000000000000000 get_pt
-     /tmp/ccMYqZ7t.s:199    .text.get_pt:0000000000000034 $d
-     /tmp/ccMYqZ7t.s:204    .text.encrypt_block:0000000000000000 $t
-     /tmp/ccMYqZ7t.s:211    .text.encrypt_block:0000000000000000 encrypt_block
-     /tmp/ccMYqZ7t.s:274    .text.encrypt_block:0000000000000038 $d
-     /tmp/ccMYqZ7t.s:279    .text.startup.main:0000000000000000 $t
-     /tmp/ccMYqZ7t.s:286    .text.startup.main:0000000000000000 main
-     /tmp/ccMYqZ7t.s:352    .text.startup.main:000000000000004c $d
-     /tmp/ccMYqZ7t.s:365    .bss:0000000000000000 gkey
-     /tmp/ccMYqZ7t.s:366    .bss:0000000000000000 $d
+     /tmp/cczMXntb.s:16     .text.set_key:0000000000000000 $t
+     /tmp/cczMXntb.s:24     .text.set_key:0000000000000000 set_key
+     /tmp/cczMXntb.s:48     .text.set_key:0000000000000010 $d
+     /tmp/cczMXntb.s:53     .text.get_key:0000000000000000 $t
+     /tmp/cczMXntb.s:60     .text.get_key:0000000000000000 get_key
+     /tmp/cczMXntb.s:91     .text.get_key:0000000000000010 $d
+     /tmp/cczMXntb.s:96     .text.reset:0000000000000000 $t
+     /tmp/cczMXntb.s:103    .text.reset:0000000000000000 reset
+     /tmp/cczMXntb.s:138    .text.get_pt:0000000000000000 $t
+     /tmp/cczMXntb.s:145    .text.get_pt:0000000000000000 get_pt
+     /tmp/cczMXntb.s:199    .text.get_pt:0000000000000034 $d
+     /tmp/cczMXntb.s:204    .text.encrypt_block:0000000000000000 $t
+     /tmp/cczMXntb.s:211    .text.encrypt_block:0000000000000000 encrypt_block
+     /tmp/cczMXntb.s:274    .text.encrypt_block:0000000000000038 $d
+     /tmp/cczMXntb.s:279    .text.startup.main:0000000000000000 $t
+     /tmp/cczMXntb.s:286    .text.startup.main:0000000000000000 main
+     /tmp/cczMXntb.s:352    .text.startup.main:000000000000004c $d
+     /tmp/cczMXntb.s:365    .bss:0000000000000000 gkey
+     /tmp/cczMXntb.s:366    .bss:0000000000000000 $d
 
 UNDEFINED SYMBOLS
 simpleserial_put

+ 30 - 30
cw_firmware/objdir-CWLITEARM/simpleserial.lst

@@ -1526,36 +1526,36 @@
  925              		.file 4 "deps//hal/stm32f3/stm32f3_hal.h"
 DEFINED SYMBOLS
                             *ABS*:0000000000000000 simpleserial.c
-     /tmp/ccQc6f4w.s:16     .text.check_version:0000000000000000 $t
-     /tmp/ccQc6f4w.s:24     .text.check_version:0000000000000000 check_version
-     /tmp/ccQc6f4w.s:43     .text.ss_crc:0000000000000000 $t
-     /tmp/ccQc6f4w.s:50     .text.ss_crc:0000000000000000 ss_crc
-     /tmp/ccQc6f4w.s:116    .text.hex_decode:0000000000000000 $t
-     /tmp/ccQc6f4w.s:123    .text.hex_decode:0000000000000000 hex_decode
-     /tmp/ccQc6f4w.s:289    .text.simpleserial_addcmd_flags:0000000000000000 $t
-     /tmp/ccQc6f4w.s:296    .text.simpleserial_addcmd_flags:0000000000000000 simpleserial_addcmd_flags
-     /tmp/ccQc6f4w.s:355    .text.simpleserial_addcmd_flags:0000000000000028 $d
-     /tmp/ccQc6f4w.s:360    .text.simpleserial_addcmd:0000000000000000 $t
-     /tmp/ccQc6f4w.s:367    .text.simpleserial_addcmd:0000000000000000 simpleserial_addcmd
-     /tmp/ccQc6f4w.s:385    .text.simpleserial_init:0000000000000000 $t
-     /tmp/ccQc6f4w.s:392    .text.simpleserial_init:0000000000000000 simpleserial_init
-     /tmp/ccQc6f4w.s:431    .text.simpleserial_init:0000000000000020 $d
-     /tmp/ccQc6f4w.s:590    .text.ss_get_commands:0000000000000000 ss_get_commands
-     /tmp/ccQc6f4w.s:538    .text.ss_num_commands:0000000000000000 ss_num_commands
-     /tmp/ccQc6f4w.s:438    .text.simpleserial_put:0000000000000000 $t
-     /tmp/ccQc6f4w.s:445    .text.simpleserial_put:0000000000000000 simpleserial_put
-     /tmp/ccQc6f4w.s:525    .text.simpleserial_put:000000000000003c $d
-     /tmp/ccQc6f4w.s:531    .text.ss_num_commands:0000000000000000 $t
-     /tmp/ccQc6f4w.s:578    .text.ss_num_commands:0000000000000020 $d
-     /tmp/ccQc6f4w.s:583    .text.ss_get_commands:0000000000000000 $t
-     /tmp/ccQc6f4w.s:686    .text.ss_get_commands:000000000000004c $d
-     /tmp/ccQc6f4w.s:692    .text.simpleserial_get:0000000000000000 $t
-     /tmp/ccQc6f4w.s:699    .text.simpleserial_get:0000000000000000 simpleserial_get
-     /tmp/ccQc6f4w.s:899    .text.simpleserial_get:00000000000000bc $d
-     /tmp/ccQc6f4w.s:908    .rodata:0000000000000000 hex_lookup
-     /tmp/ccQc6f4w.s:911    .bss:0000000000000000 $d
-     /tmp/ccQc6f4w.s:915    .bss:0000000000000000 num_commands
-     /tmp/ccQc6f4w.s:919    .bss:0000000000000004 commands
+     /tmp/ccs4vduc.s:16     .text.check_version:0000000000000000 $t
+     /tmp/ccs4vduc.s:24     .text.check_version:0000000000000000 check_version
+     /tmp/ccs4vduc.s:43     .text.ss_crc:0000000000000000 $t
+     /tmp/ccs4vduc.s:50     .text.ss_crc:0000000000000000 ss_crc
+     /tmp/ccs4vduc.s:116    .text.hex_decode:0000000000000000 $t
+     /tmp/ccs4vduc.s:123    .text.hex_decode:0000000000000000 hex_decode
+     /tmp/ccs4vduc.s:289    .text.simpleserial_addcmd_flags:0000000000000000 $t
+     /tmp/ccs4vduc.s:296    .text.simpleserial_addcmd_flags:0000000000000000 simpleserial_addcmd_flags
+     /tmp/ccs4vduc.s:355    .text.simpleserial_addcmd_flags:0000000000000028 $d
+     /tmp/ccs4vduc.s:360    .text.simpleserial_addcmd:0000000000000000 $t
+     /tmp/ccs4vduc.s:367    .text.simpleserial_addcmd:0000000000000000 simpleserial_addcmd
+     /tmp/ccs4vduc.s:385    .text.simpleserial_init:0000000000000000 $t
+     /tmp/ccs4vduc.s:392    .text.simpleserial_init:0000000000000000 simpleserial_init
+     /tmp/ccs4vduc.s:431    .text.simpleserial_init:0000000000000020 $d
+     /tmp/ccs4vduc.s:590    .text.ss_get_commands:0000000000000000 ss_get_commands
+     /tmp/ccs4vduc.s:538    .text.ss_num_commands:0000000000000000 ss_num_commands
+     /tmp/ccs4vduc.s:438    .text.simpleserial_put:0000000000000000 $t
+     /tmp/ccs4vduc.s:445    .text.simpleserial_put:0000000000000000 simpleserial_put
+     /tmp/ccs4vduc.s:525    .text.simpleserial_put:000000000000003c $d
+     /tmp/ccs4vduc.s:531    .text.ss_num_commands:0000000000000000 $t
+     /tmp/ccs4vduc.s:578    .text.ss_num_commands:0000000000000020 $d
+     /tmp/ccs4vduc.s:583    .text.ss_get_commands:0000000000000000 $t
+     /tmp/ccs4vduc.s:686    .text.ss_get_commands:000000000000004c $d
+     /tmp/ccs4vduc.s:692    .text.simpleserial_get:0000000000000000 $t
+     /tmp/ccs4vduc.s:699    .text.simpleserial_get:0000000000000000 simpleserial_get
+     /tmp/ccs4vduc.s:899    .text.simpleserial_get:00000000000000bc $d
+     /tmp/ccs4vduc.s:908    .rodata:0000000000000000 hex_lookup
+     /tmp/ccs4vduc.s:911    .bss:0000000000000000 $d
+     /tmp/ccs4vduc.s:915    .bss:0000000000000000 num_commands
+     /tmp/ccs4vduc.s:919    .bss:0000000000000004 commands
 
 UNDEFINED SYMBOLS
 putch

+ 12 - 12
cw_firmware/objdir-CWLITEARM/speck3264.lst

@@ -648,18 +648,18 @@
  504              		.file 4 "<built-in>"
 DEFINED SYMBOLS
                             *ABS*:0000000000000000 speck3264.c
-     /tmp/cc7R0eC4.s:16     .text.Words16ToBytes:0000000000000000 $t
-     /tmp/cc7R0eC4.s:24     .text.Words16ToBytes:0000000000000000 Words16ToBytes
-     /tmp/cc7R0eC4.s:77     .text.BytesToWords16:0000000000000000 $t
-     /tmp/cc7R0eC4.s:84     .text.BytesToWords16:0000000000000000 BytesToWords16
-     /tmp/cc7R0eC4.s:138    .text.Speck3264KeySchedule:0000000000000000 $t
-     /tmp/cc7R0eC4.s:145    .text.Speck3264KeySchedule:0000000000000000 Speck3264KeySchedule
-     /tmp/cc7R0eC4.s:272    .text.Speck3264Encrypt:0000000000000000 $t
-     /tmp/cc7R0eC4.s:279    .text.Speck3264Encrypt:0000000000000000 Speck3264Encrypt
-     /tmp/cc7R0eC4.s:341    .text.Speck3264Decrypt:0000000000000000 $t
-     /tmp/cc7R0eC4.s:348    .text.Speck3264Decrypt:0000000000000000 Speck3264Decrypt
-     /tmp/cc7R0eC4.s:405    .text.Speck3264_EncryptBlock:0000000000000000 $t
-     /tmp/cc7R0eC4.s:412    .text.Speck3264_EncryptBlock:0000000000000000 Speck3264_EncryptBlock
+     /tmp/cc1zOjum.s:16     .text.Words16ToBytes:0000000000000000 $t
+     /tmp/cc1zOjum.s:24     .text.Words16ToBytes:0000000000000000 Words16ToBytes
+     /tmp/cc1zOjum.s:77     .text.BytesToWords16:0000000000000000 $t
+     /tmp/cc1zOjum.s:84     .text.BytesToWords16:0000000000000000 BytesToWords16
+     /tmp/cc1zOjum.s:138    .text.Speck3264KeySchedule:0000000000000000 $t
+     /tmp/cc1zOjum.s:145    .text.Speck3264KeySchedule:0000000000000000 Speck3264KeySchedule
+     /tmp/cc1zOjum.s:272    .text.Speck3264Encrypt:0000000000000000 $t
+     /tmp/cc1zOjum.s:279    .text.Speck3264Encrypt:0000000000000000 Speck3264Encrypt
+     /tmp/cc1zOjum.s:341    .text.Speck3264Decrypt:0000000000000000 $t
+     /tmp/cc1zOjum.s:348    .text.Speck3264Decrypt:0000000000000000 Speck3264Decrypt
+     /tmp/cc1zOjum.s:405    .text.Speck3264_EncryptBlock:0000000000000000 $t
+     /tmp/cc1zOjum.s:412    .text.Speck3264_EncryptBlock:0000000000000000 Speck3264_EncryptBlock
 
 UNDEFINED SYMBOLS
 memset

+ 27 - 27
cw_firmware/objdir-CWLITEARM/stm32f3_hal.lst

@@ -783,33 +783,33 @@
  613              		.file 10 "deps//hal/stm32f3/stm32f3xx_hal_uart.h"
 DEFINED SYMBOLS
                             *ABS*:0000000000000000 stm32f3_hal.c
-     /tmp/ccvE87fY.s:16     .text.platform_init:0000000000000000 $t
-     /tmp/ccvE87fY.s:24     .text.platform_init:0000000000000000 platform_init
-     /tmp/ccvE87fY.s:145    .text.platform_init:0000000000000078 $d
-     /tmp/ccvE87fY.s:151    .text.init_uart:0000000000000000 $t
-     /tmp/ccvE87fY.s:158    .text.init_uart:0000000000000000 init_uart
-     /tmp/ccvE87fY.s:267    .text.init_uart:0000000000000070 $d
-     /tmp/ccvE87fY.s:274    .text.trigger_setup:0000000000000000 $t
-     /tmp/ccvE87fY.s:281    .text.trigger_setup:0000000000000000 trigger_setup
-     /tmp/ccvE87fY.s:353    .text.trigger_setup:0000000000000044 $d
-     /tmp/ccvE87fY.s:358    .text.trigger_high:0000000000000000 $t
-     /tmp/ccvE87fY.s:365    .text.trigger_high:0000000000000000 trigger_high
-     /tmp/ccvE87fY.s:382    .text.trigger_low:0000000000000000 $t
-     /tmp/ccvE87fY.s:389    .text.trigger_low:0000000000000000 trigger_low
-     /tmp/ccvE87fY.s:406    .text.getch:0000000000000000 $t
-     /tmp/ccvE87fY.s:413    .text.getch:0000000000000000 getch
-     /tmp/ccvE87fY.s:464    .text.getch:000000000000002c $d
-     /tmp/ccvE87fY.s:470    .text.putch:0000000000000000 $t
-     /tmp/ccvE87fY.s:477    .text.putch:0000000000000000 putch
-     /tmp/ccvE87fY.s:511    .text.putch:000000000000001c $d
-     /tmp/ccvE87fY.s:516    .text.change_err_led:0000000000000000 $t
-     /tmp/ccvE87fY.s:523    .text.change_err_led:0000000000000000 change_err_led
-     /tmp/ccvE87fY.s:551    .text.change_err_led:0000000000000014 $d
-     /tmp/ccvE87fY.s:556    .text.change_ok_led:0000000000000000 $t
-     /tmp/ccvE87fY.s:563    .text.change_ok_led:0000000000000000 change_ok_led
-     /tmp/ccvE87fY.s:591    .text.change_ok_led:0000000000000014 $d
-     /tmp/ccvE87fY.s:601    .bss:0000000000000000 UartHandle
-     /tmp/ccvE87fY.s:597    .bss:0000000000000000 $d
+     /tmp/ccGHe83A.s:16     .text.platform_init:0000000000000000 $t
+     /tmp/ccGHe83A.s:24     .text.platform_init:0000000000000000 platform_init
+     /tmp/ccGHe83A.s:145    .text.platform_init:0000000000000078 $d
+     /tmp/ccGHe83A.s:151    .text.init_uart:0000000000000000 $t
+     /tmp/ccGHe83A.s:158    .text.init_uart:0000000000000000 init_uart
+     /tmp/ccGHe83A.s:267    .text.init_uart:0000000000000070 $d
+     /tmp/ccGHe83A.s:274    .text.trigger_setup:0000000000000000 $t
+     /tmp/ccGHe83A.s:281    .text.trigger_setup:0000000000000000 trigger_setup
+     /tmp/ccGHe83A.s:353    .text.trigger_setup:0000000000000044 $d
+     /tmp/ccGHe83A.s:358    .text.trigger_high:0000000000000000 $t
+     /tmp/ccGHe83A.s:365    .text.trigger_high:0000000000000000 trigger_high
+     /tmp/ccGHe83A.s:382    .text.trigger_low:0000000000000000 $t
+     /tmp/ccGHe83A.s:389    .text.trigger_low:0000000000000000 trigger_low
+     /tmp/ccGHe83A.s:406    .text.getch:0000000000000000 $t
+     /tmp/ccGHe83A.s:413    .text.getch:0000000000000000 getch
+     /tmp/ccGHe83A.s:464    .text.getch:000000000000002c $d
+     /tmp/ccGHe83A.s:470    .text.putch:0000000000000000 $t
+     /tmp/ccGHe83A.s:477    .text.putch:0000000000000000 putch
+     /tmp/ccGHe83A.s:511    .text.putch:000000000000001c $d
+     /tmp/ccGHe83A.s:516    .text.change_err_led:0000000000000000 $t
+     /tmp/ccGHe83A.s:523    .text.change_err_led:0000000000000000 change_err_led
+     /tmp/ccGHe83A.s:551    .text.change_err_led:0000000000000014 $d
+     /tmp/ccGHe83A.s:556    .text.change_ok_led:0000000000000000 $t
+     /tmp/ccGHe83A.s:563    .text.change_ok_led:0000000000000000 change_ok_led
+     /tmp/ccGHe83A.s:591    .text.change_ok_led:0000000000000014 $d
+     /tmp/ccGHe83A.s:601    .bss:0000000000000000 UartHandle
+     /tmp/ccGHe83A.s:597    .bss:0000000000000000 $d
 
 UNDEFINED SYMBOLS
 HAL_RCC_OscConfig

+ 54 - 54
cw_firmware/objdir-CWLITEARM/stm32f3_hal_lowlevel.lst

@@ -8184,59 +8184,59 @@
  3846              		.file 13 "deps//hal/stm32f3/CMSIS/device/system_stm32f3xx.h"
 DEFINED SYMBOLS
                             *ABS*:0000000000000000 stm32f3_hal_lowlevel.c
-     /tmp/ccPMGH5L.s:16     .text.HAL_NVIC_SetPriority:0000000000000000 $t
-     /tmp/ccPMGH5L.s:24     .text.HAL_NVIC_SetPriority:0000000000000000 HAL_NVIC_SetPriority
-     /tmp/ccPMGH5L.s:167    .text.HAL_NVIC_SetPriority:000000000000005c $d
-     /tmp/ccPMGH5L.s:173    .text.HAL_InitTick:0000000000000000 $t
-     /tmp/ccPMGH5L.s:180    .text.HAL_InitTick:0000000000000000 HAL_InitTick
-     /tmp/ccPMGH5L.s:201    .text.HAL_InitTick:0000000000000008 $d
-     /tmp/ccPMGH5L.s:206    .text.HAL_GetTick:0000000000000000 $t
-     /tmp/ccPMGH5L.s:213    .text.HAL_GetTick:0000000000000000 HAL_GetTick
-     /tmp/ccPMGH5L.s:231    .text.HAL_GetTick:000000000000000c $d
-     /tmp/ccPMGH5L.s:236    .text.HAL_IncTick:0000000000000000 $t
-     /tmp/ccPMGH5L.s:243    .text.HAL_IncTick:0000000000000000 HAL_IncTick
-     /tmp/ccPMGH5L.s:256    .text.HAL_RCC_GetSysClockFreq:0000000000000000 $t
-     /tmp/ccPMGH5L.s:263    .text.HAL_RCC_GetSysClockFreq:0000000000000000 HAL_RCC_GetSysClockFreq
-     /tmp/ccPMGH5L.s:278    .text.HAL_RCC_GetPCLK1Freq:0000000000000000 $t
-     /tmp/ccPMGH5L.s:285    .text.HAL_RCC_GetPCLK1Freq:0000000000000000 HAL_RCC_GetPCLK1Freq
-     /tmp/ccPMGH5L.s:297    .text.HAL_RCC_OscConfig:0000000000000000 $t
-     /tmp/ccPMGH5L.s:304    .text.HAL_RCC_OscConfig:0000000000000000 HAL_RCC_OscConfig
-     /tmp/ccPMGH5L.s:1376   .text.HAL_RCC_OscConfig:000000000000030c $d
-     /tmp/ccPMGH5L.s:1382   .text.HAL_RCC_OscConfig:0000000000000318 $t
-     /tmp/ccPMGH5L.s:1884   .text.HAL_RCC_OscConfig:00000000000004bc $d
-     /tmp/ccPMGH5L.s:1890   .text.HAL_RCC_ClockConfig:0000000000000000 $t
-     /tmp/ccPMGH5L.s:1897   .text.HAL_RCC_ClockConfig:0000000000000000 HAL_RCC_ClockConfig
-     /tmp/ccPMGH5L.s:2254   .text.HAL_RCC_ClockConfig:0000000000000144 $d
-     /tmp/ccPMGH5L.s:2260   .text.HAL_RCC_GetPCLK2Freq:0000000000000000 $t
-     /tmp/ccPMGH5L.s:2267   .text.HAL_RCC_GetPCLK2Freq:0000000000000000 HAL_RCC_GetPCLK2Freq
-     /tmp/ccPMGH5L.s:2279   .text.HAL_GPIO_Init:0000000000000000 $t
-     /tmp/ccPMGH5L.s:2286   .text.HAL_GPIO_Init:0000000000000000 HAL_GPIO_Init
-     /tmp/ccPMGH5L.s:2660   .text.HAL_GPIO_Init:0000000000000178 $d
-     /tmp/ccPMGH5L.s:2667   .text.HAL_GPIO_WritePin:0000000000000000 $t
-     /tmp/ccPMGH5L.s:2674   .text.HAL_GPIO_WritePin:0000000000000000 HAL_GPIO_WritePin
-     /tmp/ccPMGH5L.s:2701   .text.UART_SetConfig:0000000000000000 $t
-     /tmp/ccPMGH5L.s:2708   .text.UART_SetConfig:0000000000000000 UART_SetConfig
-     /tmp/ccPMGH5L.s:2811   .text.UART_SetConfig:0000000000000066 $d
-     /tmp/ccPMGH5L.s:2979   .text.UART_SetConfig:0000000000000158 $d
-     /tmp/ccPMGH5L.s:2989   .text.UART_SetConfig:000000000000017c $t
-     /tmp/ccPMGH5L.s:3058   .text.UART_SetConfig:00000000000001c8 $d
-     /tmp/ccPMGH5L.s:3068   .text.UART_WaitOnFlagUntilTimeout:0000000000000000 $t
-     /tmp/ccPMGH5L.s:3075   .text.UART_WaitOnFlagUntilTimeout:0000000000000000 UART_WaitOnFlagUntilTimeout
-     /tmp/ccPMGH5L.s:3168   .text.UART_CheckIdleState:0000000000000000 $t
-     /tmp/ccPMGH5L.s:3175   .text.UART_CheckIdleState:0000000000000000 UART_CheckIdleState
-     /tmp/ccPMGH5L.s:3284   .text.HAL_UART_Init:0000000000000000 $t
-     /tmp/ccPMGH5L.s:3291   .text.HAL_UART_Init:0000000000000000 HAL_UART_Init
-     /tmp/ccPMGH5L.s:3383   .text.HAL_UART_Transmit:0000000000000000 $t
-     /tmp/ccPMGH5L.s:3390   .text.HAL_UART_Transmit:0000000000000000 HAL_UART_Transmit
-     /tmp/ccPMGH5L.s:3576   .text.HAL_UART_Receive:0000000000000000 $t
-     /tmp/ccPMGH5L.s:3583   .text.HAL_UART_Receive:0000000000000000 HAL_UART_Receive
-     /tmp/ccPMGH5L.s:3822   .data:0000000000000000 SystemCoreClock
-     /tmp/ccPMGH5L.s:3833   .bss:0000000000000004 uwTick
-     /tmp/ccPMGH5L.s:3829   .bss:0000000000000000 hal_sys_tick
-     /tmp/ccPMGH5L.s:3814   .rodata:0000000000000000 CSWTCH.77
-     /tmp/ccPMGH5L.s:3819   .data:0000000000000000 $d
-     /tmp/ccPMGH5L.s:3825   .bss:0000000000000000 $d
-     /tmp/ccPMGH5L.s:2821   .text.UART_SetConfig:000000000000006f $d
-     /tmp/ccPMGH5L.s:2821   .text.UART_SetConfig:0000000000000070 $t
+     /tmp/ccfDtv1L.s:16     .text.HAL_NVIC_SetPriority:0000000000000000 $t
+     /tmp/ccfDtv1L.s:24     .text.HAL_NVIC_SetPriority:0000000000000000 HAL_NVIC_SetPriority
+     /tmp/ccfDtv1L.s:167    .text.HAL_NVIC_SetPriority:000000000000005c $d
+     /tmp/ccfDtv1L.s:173    .text.HAL_InitTick:0000000000000000 $t
+     /tmp/ccfDtv1L.s:180    .text.HAL_InitTick:0000000000000000 HAL_InitTick
+     /tmp/ccfDtv1L.s:201    .text.HAL_InitTick:0000000000000008 $d
+     /tmp/ccfDtv1L.s:206    .text.HAL_GetTick:0000000000000000 $t
+     /tmp/ccfDtv1L.s:213    .text.HAL_GetTick:0000000000000000 HAL_GetTick
+     /tmp/ccfDtv1L.s:231    .text.HAL_GetTick:000000000000000c $d
+     /tmp/ccfDtv1L.s:236    .text.HAL_IncTick:0000000000000000 $t
+     /tmp/ccfDtv1L.s:243    .text.HAL_IncTick:0000000000000000 HAL_IncTick
+     /tmp/ccfDtv1L.s:256    .text.HAL_RCC_GetSysClockFreq:0000000000000000 $t
+     /tmp/ccfDtv1L.s:263    .text.HAL_RCC_GetSysClockFreq:0000000000000000 HAL_RCC_GetSysClockFreq
+     /tmp/ccfDtv1L.s:278    .text.HAL_RCC_GetPCLK1Freq:0000000000000000 $t
+     /tmp/ccfDtv1L.s:285    .text.HAL_RCC_GetPCLK1Freq:0000000000000000 HAL_RCC_GetPCLK1Freq
+     /tmp/ccfDtv1L.s:297    .text.HAL_RCC_OscConfig:0000000000000000 $t
+     /tmp/ccfDtv1L.s:304    .text.HAL_RCC_OscConfig:0000000000000000 HAL_RCC_OscConfig
+     /tmp/ccfDtv1L.s:1376   .text.HAL_RCC_OscConfig:000000000000030c $d
+     /tmp/ccfDtv1L.s:1382   .text.HAL_RCC_OscConfig:0000000000000318 $t
+     /tmp/ccfDtv1L.s:1884   .text.HAL_RCC_OscConfig:00000000000004bc $d
+     /tmp/ccfDtv1L.s:1890   .text.HAL_RCC_ClockConfig:0000000000000000 $t
+     /tmp/ccfDtv1L.s:1897   .text.HAL_RCC_ClockConfig:0000000000000000 HAL_RCC_ClockConfig
+     /tmp/ccfDtv1L.s:2254   .text.HAL_RCC_ClockConfig:0000000000000144 $d
+     /tmp/ccfDtv1L.s:2260   .text.HAL_RCC_GetPCLK2Freq:0000000000000000 $t
+     /tmp/ccfDtv1L.s:2267   .text.HAL_RCC_GetPCLK2Freq:0000000000000000 HAL_RCC_GetPCLK2Freq
+     /tmp/ccfDtv1L.s:2279   .text.HAL_GPIO_Init:0000000000000000 $t
+     /tmp/ccfDtv1L.s:2286   .text.HAL_GPIO_Init:0000000000000000 HAL_GPIO_Init
+     /tmp/ccfDtv1L.s:2660   .text.HAL_GPIO_Init:0000000000000178 $d
+     /tmp/ccfDtv1L.s:2667   .text.HAL_GPIO_WritePin:0000000000000000 $t
+     /tmp/ccfDtv1L.s:2674   .text.HAL_GPIO_WritePin:0000000000000000 HAL_GPIO_WritePin
+     /tmp/ccfDtv1L.s:2701   .text.UART_SetConfig:0000000000000000 $t
+     /tmp/ccfDtv1L.s:2708   .text.UART_SetConfig:0000000000000000 UART_SetConfig
+     /tmp/ccfDtv1L.s:2811   .text.UART_SetConfig:0000000000000066 $d
+     /tmp/ccfDtv1L.s:2979   .text.UART_SetConfig:0000000000000158 $d
+     /tmp/ccfDtv1L.s:2989   .text.UART_SetConfig:000000000000017c $t
+     /tmp/ccfDtv1L.s:3058   .text.UART_SetConfig:00000000000001c8 $d
+     /tmp/ccfDtv1L.s:3068   .text.UART_WaitOnFlagUntilTimeout:0000000000000000 $t
+     /tmp/ccfDtv1L.s:3075   .text.UART_WaitOnFlagUntilTimeout:0000000000000000 UART_WaitOnFlagUntilTimeout
+     /tmp/ccfDtv1L.s:3168   .text.UART_CheckIdleState:0000000000000000 $t
+     /tmp/ccfDtv1L.s:3175   .text.UART_CheckIdleState:0000000000000000 UART_CheckIdleState
+     /tmp/ccfDtv1L.s:3284   .text.HAL_UART_Init:0000000000000000 $t
+     /tmp/ccfDtv1L.s:3291   .text.HAL_UART_Init:0000000000000000 HAL_UART_Init
+     /tmp/ccfDtv1L.s:3383   .text.HAL_UART_Transmit:0000000000000000 $t
+     /tmp/ccfDtv1L.s:3390   .text.HAL_UART_Transmit:0000000000000000 HAL_UART_Transmit
+     /tmp/ccfDtv1L.s:3576   .text.HAL_UART_Receive:0000000000000000 $t
+     /tmp/ccfDtv1L.s:3583   .text.HAL_UART_Receive:0000000000000000 HAL_UART_Receive
+     /tmp/ccfDtv1L.s:3822   .data:0000000000000000 SystemCoreClock
+     /tmp/ccfDtv1L.s:3833   .bss:0000000000000004 uwTick
+     /tmp/ccfDtv1L.s:3829   .bss:0000000000000000 hal_sys_tick
+     /tmp/ccfDtv1L.s:3814   .rodata:0000000000000000 CSWTCH.77
+     /tmp/ccfDtv1L.s:3819   .data:0000000000000000 $d
+     /tmp/ccfDtv1L.s:3825   .bss:0000000000000000 $d
+     /tmp/ccfDtv1L.s:2821   .text.UART_SetConfig:000000000000006f $d
+     /tmp/ccfDtv1L.s:2821   .text.UART_SetConfig:0000000000000070 $t
 
 NO UNDEFINED SYMBOLS

BIN
cw_firmware/objdir-CWLITEARM/stm32f3_startup.o


+ 5 - 5
cw_firmware/objdir-CWLITEARM/stm32f3_sysmem.lst

@@ -190,11 +190,11 @@
  106              		.file 3 "/usr/arm-none-eabi/include/sys/errno.h"
 DEFINED SYMBOLS
                             *ABS*:0000000000000000 stm32f3_sysmem.c
-     /tmp/ccyPWE3t.s:16     .text._sbrk:0000000000000000 $t
-     /tmp/ccyPWE3t.s:24     .text._sbrk:0000000000000000 _sbrk
-     /tmp/ccyPWE3t.s:91     .text._sbrk:000000000000002c $d
-     /tmp/ccyPWE3t.s:97     .bss:0000000000000000 $d
-     /tmp/ccyPWE3t.s:101    .bss:0000000000000000 heap_end.0
+     /tmp/ccGKHttk.s:16     .text._sbrk:0000000000000000 $t
+     /tmp/ccGKHttk.s:24     .text._sbrk:0000000000000000 _sbrk
+     /tmp/ccGKHttk.s:91     .text._sbrk:000000000000002c $d
+     /tmp/ccGKHttk.s:97     .bss:0000000000000000 $d
+     /tmp/ccGKHttk.s:101    .bss:0000000000000000 heap_end.0
 
 UNDEFINED SYMBOLS
 __errno

+ 6 - 4
presentation/Makefile

@@ -2,14 +2,16 @@ outdir=./html
 theme=night
 file=slides.md
 
+debug:
+	pandoc --css ./css/custom.css -t revealjs -s -o $(basename $(file)).html $(file) -V revealjs-url=./reveal.js -V theme=$(theme) -V slideNumber=true
+
 standalone:
 	pandoc --css ./css/custom.css -t revealjs -s -o $(basename $(file)).html $(file) -V revealjs-url=./reveal.js -V theme=$(theme) --self-contained -V slideNumber=true
 	mv $(basename $(file)).html $(outdir)/
 
-debug:
-#	pandoc --css ./css/custom.css -t revealjs -s --template=template.pandoc -o $(basename $(file)).html $(file) -V revealjs-url=./reveal.js -V theme=$(theme) -V slideNumber=true -V center=true -V touch=true
-	pandoc --css ./css/custom.css -t revealjs -s -o $(basename $(file)).html $(file) -V revealjs-url=./reveal.js -V theme=$(theme) -V slideNumber=true
-	#Original: pandoc --css ./css/custom.css -t revealjs -s --template=template.pandoc -o $(basename $(file)).html $(file) -V revealjs-url=./reveal.js -V theme=$(theme) -V slideNumber=true -V center=true -V touch=true
 
 clean:
 	rm -f $(outdir)/*.html
+
+push:
+	scp html/slides.html pserv:/var/www/static/slides/impl.html

Datei-Diff unterdrückt, da er zu groß ist
+ 64 - 1
presentation/html/slides.html


BIN
presentation/img/er16_annot.png


BIN
presentation/img/rundenfunktion.png


+ 465 - 0
presentation/slides.html

@@ -0,0 +1,465 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <meta charset="utf-8">
+  <meta name="generator" content="pandoc">
+  <meta name="author" content="Robin Dietrich &amp; Marius Schwarz">
+  <title>Implementation Attacks</title>
+  <meta name="apple-mobile-web-app-capable" content="yes">
+  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
+  <link rel="stylesheet" href="./reveal.js/dist/reset.css">
+  <link rel="stylesheet" href="./reveal.js/dist/reveal.css">
+  <style>
+    code{white-space: pre-wrap;}
+    span.smallcaps{font-variant: small-caps;}
+    span.underline{text-decoration: underline;}
+    div.column{display: inline-block; vertical-align: top; width: 50%;}
+    div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+    ul.task-list{list-style: none;}
+    pre > code.sourceCode { white-space: pre; position: relative; }
+    pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
+    pre > code.sourceCode > span:empty { height: 1.2em; }
+    .sourceCode { overflow: visible; }
+    code.sourceCode > span { color: inherit; text-decoration: inherit; }
+    div.sourceCode { margin: 1em 0; }
+    pre.sourceCode { margin: 0; }
+    @media screen {
+    div.sourceCode { overflow: auto; }
+    }
+    @media print {
+    pre > code.sourceCode { white-space: pre-wrap; }
+    pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+    }
+    pre.numberSource code
+      { counter-reset: source-line 0; }
+    pre.numberSource code > span
+      { position: relative; left: -4em; counter-increment: source-line; }
+    pre.numberSource code > span > a:first-child::before
+      { content: counter(source-line);
+        position: relative; left: -1em; text-align: right; vertical-align: baseline;
+        border: none; display: inline-block;
+        -webkit-touch-callout: none; -webkit-user-select: none;
+        -khtml-user-select: none; -moz-user-select: none;
+        -ms-user-select: none; user-select: none;
+        padding: 0 4px; width: 4em;
+        color: #aaaaaa;
+      }
+    pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+    div.sourceCode
+      {   }
+    @media screen {
+    pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+    }
+    code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+    code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+    code span.at { color: #7d9029; } /* Attribute */
+    code span.bn { color: #40a070; } /* BaseN */
+    code span.bu { } /* BuiltIn */
+    code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+    code span.ch { color: #4070a0; } /* Char */
+    code span.cn { color: #880000; } /* Constant */
+    code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+    code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+    code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+    code span.dt { color: #902000; } /* DataType */
+    code span.dv { color: #40a070; } /* DecVal */
+    code span.er { color: #ff0000; font-weight: bold; } /* Error */
+    code span.ex { } /* Extension */
+    code span.fl { color: #40a070; } /* Float */
+    code span.fu { color: #06287e; } /* Function */
+    code span.im { } /* Import */
+    code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+    code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+    code span.op { color: #666666; } /* Operator */
+    code span.ot { color: #007020; } /* Other */
+    code span.pp { color: #bc7a00; } /* Preprocessor */
+    code span.sc { color: #4070a0; } /* SpecialChar */
+    code span.ss { color: #bb6688; } /* SpecialString */
+    code span.st { color: #4070a0; } /* String */
+    code span.va { color: #19177c; } /* Variable */
+    code span.vs { color: #4070a0; } /* VerbatimString */
+    code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+    .display.math{display: block; text-align: center; margin: 0.5rem auto;}
+  </style>
+  <link rel="stylesheet" href="./reveal.js/dist/theme/night.css" id="theme">
+  <link rel="stylesheet" href="./css/custom.css"/>
+</head>
+<body>
+  <div class="reveal">
+    <div class="slides">
+
+<section id="title-slide">
+  <h1 class="title">Implementation Attacks</h1>
+  <p class="author">Robin Dietrich &amp; Marius Schwarz</p>
+</section>
+
+<section id="agenda" class="slide level1">
+<h1>Agenda</h1>
+<ul>
+<li>Einleitung</li>
+<li>Seitenkanalangriffe</li>
+<li>Speck</li>
+<li>CPA Angriffe</li>
+<li>CPA auf Speck</li>
+<li>Gegenmaßnahmen</li>
+<li>Hiding</li>
+</ul>
+</section>
+<section id="bedeutung-von-seitenkanalangriffen" class="slide level1">
+<h1>Bedeutung von Seitenkanalangriffen</h1>
+</section>
+<section id="voraussetzungen-für-erfolgreichen-angriff" class="slide level1">
+<h1>Voraussetzungen für erfolgreichen Angriff</h1>
+</section>
+<section id="speck" class="slide level1">
+<h1>Speck</h1>
+<ul>
+<li>Symmentrische ARX Schiffre</li>
+<li>Entworfen von der NSA (Zusammen mit Simon)</li>
+<li>Performant in Hard-/Software</li>
+<li>Speck bietet mehrere mögliche Modis
+<ul>
+<li>Runden, Schlüssellänge, …</li>
+</ul></li>
+</ul>
+</section>
+<section id="speck---setups" class="slide level1">
+<h1>Speck - Setups</h1>
+<table>
+<thead>
+<tr class="header">
+<th>Speck</th>
+<th>Blocklänge</th>
+<th>Schlüssellänge</th>
+<th>Runden</th>
+</tr>
+</thead>
+<tbody>
+<tr class="odd">
+<td><span style="color:#d08a1d"><strong>Speck3264</strong></span></td>
+<td><span style="color:#d08a1d"><strong>32 Bit</strong></span></td>
+<td><span style="color:#d08a1d"><strong>64 Bit</strong></span></td>
+<td><span style="color:#d08a1d"><strong>22</strong></span></td>
+</tr>
+<tr class="even">
+<td>Speck4872</td>
+<td>48 Bit</td>
+<td>72 Bit</td>
+<td>22</td>
+</tr>
+<tr class="odd">
+<td>Speck4896</td>
+<td>48 Bit</td>
+<td>96 Bit</td>
+<td>23</td>
+</tr>
+<tr class="even">
+<td>Speck6496</td>
+<td>64 Bit</td>
+<td>96 Bit</td>
+<td>26</td>
+</tr>
+<tr class="odd">
+<td>Speck64128</td>
+<td>64 Bit</td>
+<td>128 Bit</td>
+<td>27</td>
+</tr>
+<tr class="even">
+<td>Speck9696</td>
+<td>96 Bit</td>
+<td>96 Bit</td>
+<td>28</td>
+</tr>
+<tr class="odd">
+<td>Speck96144</td>
+<td>96 Bit</td>
+<td>144 Bit</td>
+<td>29</td>
+</tr>
+<tr class="even">
+<td>Speck128128</td>
+<td>128 Bit</td>
+<td>128 Bit</td>
+<td>32</td>
+</tr>
+<tr class="odd">
+<td>Speck128192</td>
+<td>128 Bit</td>
+<td>192 Bit</td>
+<td>33</td>
+</tr>
+<tr class="even">
+<td>Speck1281256</td>
+<td>128 Bit</td>
+<td>256 Bit</td>
+<td>34</td>
+</tr>
+</tbody>
+</table>
+</section>
+<section id="speck---rundenfunktion" class="slide level1">
+<h1>Speck - Rundenfunktion</h1>
+<p><img data-src="img/rundenfunktion.png" width="400" /></p>
+<ul>
+<li>Wird während der Key Schedule aufgerufen</li>
+<li>Wird beim der Verschlüsselung aufgerufen</li>
+</ul>
+</section>
+<section id="speck---pseudocode" class="slide level1">
+<h1>Speck - Pseudocode</h1>
+<div class="sourceCode" id="cb1"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>pt <span class="op">=</span> Plaintext Bytes              Pt <span class="op">=</span> Plaintext as <span class="dv">16</span> Bit Words</span>
+<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a>ct <span class="op">=</span> Ciphertext Bytes             Ct <span class="op">=</span> Ciphertext as <span class="dv">16</span> Bit Words</span>
+<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a>k <span class="op">=</span> Key as Bytes                  K <span class="op">=</span> Key as <span class="dv">16</span> Bit Words</span>
+<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="co">// Key Schedule</span></span>
+<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a>D<span class="op">=</span>K<span class="op">[</span><span class="dv">3</span><span class="op">],</span> C<span class="op">=</span>K<span class="op">[</span><span class="dv">2</span><span class="op">],</span> B<span class="op">=</span>K<span class="op">[</span><span class="dv">1</span><span class="op">],</span> A<span class="op">=</span>K<span class="op">[</span><span class="dv">0</span><span class="op">]</span></span>
+<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span> i in <span class="fl">0.</span><span class="er">.</span><span class="op">&lt;</span><span class="dv">22</span></span>
+<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a>    rk<span class="op">[</span>i<span class="op">]=</span>A</span>
+<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a>    ER16<span class="op">(</span>B<span class="op">,</span> A<span class="op">,</span> i<span class="op">++)</span></span>
+<span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a>    rk<span class="op">[</span>i<span class="op">]=</span>A</span>
+<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a>    ER16<span class="op">(</span>C<span class="op">,</span> A<span class="op">,</span> i<span class="op">++)</span></span>
+<span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a>    rk<span class="op">[</span>i<span class="op">]=</span>A</span>
+<span id="cb1-14"><a href="#cb1-14" aria-hidden="true" tabindex="-1"></a>    ER16<span class="op">(</span>D<span class="op">,</span> A<span class="op">,</span> i<span class="op">++)</span></span>
+<span id="cb1-15"><a href="#cb1-15" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb1-16"><a href="#cb1-16" aria-hidden="true" tabindex="-1"></a><span class="co">// Encryption</span></span>
+<span id="cb1-17"><a href="#cb1-17" aria-hidden="true" tabindex="-1"></a>Ct<span class="op">[</span><span class="dv">0</span><span class="op">]=</span>Pt<span class="op">[</span><span class="dv">0</span><span class="op">];</span> Ct<span class="op">[</span><span class="dv">1</span><span class="op">]=</span>Pt<span class="op">[</span><span class="dv">1</span><span class="op">];</span></span>
+<span id="cb1-18"><a href="#cb1-18" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb1-19"><a href="#cb1-19" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span> i in <span class="fl">0.</span><span class="er">.</span><span class="op">&lt;</span><span class="dv">22</span></span>
+<span id="cb1-20"><a href="#cb1-20" aria-hidden="true" tabindex="-1"></a>    ER16<span class="op">(</span>Ct<span class="op">[</span><span class="dv">1</span><span class="op">],</span> Ct<span class="op">[</span><span class="dv">0</span><span class="op">],</span> rk<span class="op">[</span>i<span class="op">++])</span></span></code></pre></div>
+</section>
+<section id="speck---möglicher-angriff" class="slide level1">
+<h1>Speck - Möglicher Angriff</h1>
+<ul>
+<li>Angriff der Rundenfunktion</li>
+<li>ADD/XOR/ROT Operationen</li>
+</ul>
+<div class="sourceCode" id="cb2"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="dt">void</span> FuncER16<span class="op">(</span>u16 <span class="op">*</span>x<span class="op">,</span> u16 <span class="op">*</span>y<span class="op">,</span> u16 k<span class="op">)</span></span>
+<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span>
+<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a>    u16 tmp_x <span class="op">=</span> <span class="op">*</span>x<span class="op">;</span></span>
+<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a>    u16 tmp_y <span class="op">=</span> <span class="op">*</span>y<span class="op">;</span></span>
+<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a>    <span class="op">*</span>x <span class="op">=</span> <span class="op">(((</span>tmp_x<span class="op">)&gt;&gt;(</span><span class="dv">7</span><span class="op">))</span> <span class="op">|</span> <span class="op">((</span>tmp_x<span class="op">)&lt;&lt;(</span><span class="dv">16</span><span class="op">-(</span><span class="dv">7</span><span class="op">))));</span>  <span class="co">// ROR(7)</span></span>
+<span id="cb2-7"><a href="#cb2-7" aria-hidden="true" tabindex="-1"></a>    <span class="op">*</span>x <span class="op">+=</span> <span class="op">*</span>y<span class="op">;</span></span>
+<span id="cb2-8"><a href="#cb2-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb2-9"><a href="#cb2-9" aria-hidden="true" tabindex="-1"></a>    <span class="op">*</span>x <span class="op">=</span> <span class="op">*</span>x <span class="op">^</span> k<span class="op">;</span></span>
+<span id="cb2-10"><a href="#cb2-10" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb2-11"><a href="#cb2-11" aria-hidden="true" tabindex="-1"></a>    <span class="op">*</span>y <span class="op">=</span> <span class="op">(((</span>tmp_y<span class="op">)&lt;&lt;(</span><span class="dv">2</span><span class="op">))</span> <span class="op">|</span> <span class="op">(</span>tmp_y<span class="op">&gt;&gt;(</span><span class="dv">16</span><span class="op">-(</span><span class="dv">2</span><span class="op">))));</span>   <span class="co">// ROL(2)</span></span>
+<span id="cb2-12"><a href="#cb2-12" aria-hidden="true" tabindex="-1"></a>    <span class="op">*</span>y <span class="op">=</span> <span class="op">*</span>y <span class="op">^</span> <span class="op">*</span>x<span class="op">;</span></span>
+<span id="cb2-13"><a href="#cb2-13" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
+</section>
+<section id="speck---möglicher-angriff-1" class="slide level1">
+<h1>Speck - Möglicher Angriff</h1>
+<ul>
+<li>Der Roundkey steckt in der XOR Operation</li>
+</ul>
+<p><img data-src="img/er16_annot.png" /></p>
+</section>
+<section id="correlation-power-analysis" class="slide level1">
+<h1>Correlation Power Analysis</h1>
+<ul>
+<li>Variante von Differential Power Analysis (DPA)</li>
+<li>Nutzt Pearson Correlation Coefficient (PCC)</li>
+<li><strong>Bei Speck:</strong> Korrelation zwischen Power-Trace und Key</li>
+</ul>
+</section>
+<section id="theoretischer-angriff" class="slide level1">
+<h1>Theoretischer Angriff</h1>
+</section>
+<section id="speck---modell" class="slide level1">
+<h1>Speck - Modell</h1>
+</section>
+<section id="hamming-weight" class="slide level1">
+<h1>Hamming Weight</h1>
+</section>
+<section id="t-test" class="slide level1">
+<h1>T-Test</h1>
+</section>
+<section id="angriff" class="slide level1">
+<h1>Angriff</h1>
+</section>
+<section id="gegenmaßnahmen" class="slide level1">
+<h1>Gegenmaßnahmen</h1>
+</section>
+<section id="hiding" class="slide level1">
+<h1>Hiding</h1>
+</section>
+<section id="hiding---code" class="slide level1">
+<h1>Hiding - Code</h1>
+</section>
+<section id="hiding---t-test" class="slide level1">
+<h1>Hiding - T-Test</h1>
+</section>
+<section id="korrelationen" class="slide level1">
+<h1>Korrelationen</h1>
+</section>
+<section id="referenzen" class="slide level1">
+<h1>Referenzen</h1>
+</section>
+    </div>
+  </div>
+
+  <script src="./reveal.js/dist/reveal.js"></script>
+
+  <!-- reveal.js plugins -->
+  <script src="./reveal.js/plugin/notes/notes.js"></script>
+  <script src="./reveal.js/plugin/search/search.js"></script>
+  <script src="./reveal.js/plugin/zoom/zoom.js"></script>
+
+  <script>
+
+      // Full list of configuration options available at:
+      // https://revealjs.com/config/
+      Reveal.initialize({
+        // Display controls in the bottom right corner
+        controls: true,
+
+        // Help the user learn the controls by providing hints, for example by
+        // bouncing the down arrow when they first encounter a vertical slide
+        controlsTutorial: true,
+
+        // Determines where controls appear, "edges" or "bottom-right"
+        controlsLayout: 'bottom-right',
+
+        // Visibility rule for backwards navigation arrows; "faded", "hidden"
+        // or "visible"
+        controlsBackArrows: 'faded',
+
+        // Display a presentation progress bar
+        progress: true,
+
+        // Display the page number of the current slide
+        slideNumber: true,
+
+        // 'all', 'print', or 'speaker'
+        showSlideNumber: 'all',
+
+        // Add the current slide number to the URL hash so that reloading the
+        // page/copying the URL will return you to the same slide
+        hash: false,
+
+        // Start with 1 for the hash rather than 0
+        hashOneBasedIndex: false,
+
+        // Flags if we should monitor the hash and change slides accordingly
+        respondToHashChanges: true,
+
+        // Push each slide change to the browser history
+        history: false,
+
+        // Enable keyboard shortcuts for navigation
+        keyboard: true,
+
+        // Enable the slide overview mode
+        overview: true,
+
+        // Disables the default reveal.js slide layout (scaling and centering)
+        // so that you can use custom CSS layout
+        disableLayout: false,
+
+        // Vertical centering of slides
+        center: true,
+
+        // Enables touch navigation on devices with touch input
+        touch: true,
+
+        // Loop the presentation
+        loop: false,
+
+        // Change the presentation direction to be RTL
+        rtl: false,
+
+        // see https://revealjs.com/vertical-slides/#navigation-mode
+        navigationMode: 'default',
+
+        // Randomizes the order of slides each time the presentation loads
+        shuffle: false,
+
+        // Turns fragments on and off globally
+        fragments: true,
+
+        // Flags whether to include the current fragment in the URL,
+        // so that reloading brings you to the same fragment position
+        fragmentInURL: true,
+
+        // Flags if the presentation is running in an embedded mode,
+        // i.e. contained within a limited portion of the screen
+        embedded: false,
+
+        // Flags if we should show a help overlay when the questionmark
+        // key is pressed
+        help: true,
+
+        // Flags if it should be possible to pause the presentation (blackout)
+        pause: true,
+
+        // Flags if speaker notes should be visible to all viewers
+        showNotes: false,
+
+        // Global override for autoplaying embedded media (null/true/false)
+        autoPlayMedia: null,
+
+        // Global override for preloading lazy-loaded iframes (null/true/false)
+        preloadIframes: null,
+
+        // Number of milliseconds between automatically proceeding to the
+        // next slide, disabled when set to 0, this value can be overwritten
+        // by using a data-autoslide attribute on your slides
+        autoSlide: 0,
+
+        // Stop auto-sliding after user input
+        autoSlideStoppable: true,
+
+        // Use this method for navigation when auto-sliding
+        autoSlideMethod: null,
+
+        // Specify the average time in seconds that you think you will spend
+        // presenting each slide. This is used to show a pacing timer in the
+        // speaker view
+        defaultTiming: null,
+
+        // Enable slide navigation via mouse wheel
+        mouseWheel: false,
+
+        // The display mode that will be used to show slides
+        display: 'block',
+
+        // Hide cursor if inactive
+        hideInactiveCursor: true,
+
+        // Time before the cursor is hidden (in ms)
+        hideCursorTime: 5000,
+
+        // Opens links in an iframe preview overlay
+        previewLinks: false,
+
+        // Transition style (none/fade/slide/convex/concave/zoom)
+        transition: 'slide',
+
+        // Transition speed (default/fast/slow)
+        transitionSpeed: 'default',
+
+        // Transition style for full page slide backgrounds
+        // (none/fade/slide/convex/concave/zoom)
+        backgroundTransition: 'fade',
+
+        // Number of slides away from the current that are visible
+        viewDistance: 3,
+
+        // Number of slides away from the current that are visible on mobile
+        // devices. It is advisable to set this to a lower number than
+        // viewDistance in order to save resources.
+        mobileViewDistance: 2,
+
+        // reveal.js plugins
+        plugins: [
+          RevealNotes,
+          RevealSearch,
+          RevealZoom
+        ]
+      });
+    </script>
+    </body>
+</html>

+ 181 - 2
presentation/slides.md

@@ -1,10 +1,189 @@
 ---
 title: Implementation Attacks
-author: Robin, Dietrich & Marius Schwarz
+author: Robin Dietrich & Marius Schwarz
 data: 01.02.22
 ---
 
 # Agenda
 
+* Einleitung
+* Seitenkanalangriffe
+* Speck
+* CPA Angriffe
+* CPA auf Speck
+* Gegenmaßnahmen
+* Hiding
+
+---
+
+
+# Bedeutung von Seitenkanalangriffen
+
+---
+
+# Voraussetzungen für erfolgreichen Angriff
+
+
+
+---
+
+# Speck
+
+* Symmentrische ARX Schiffre
+* Entworfen von der NSA (Zusammen mit Simon)
+* Performant in Hard-/Software
+* Speck bietet mehrere mögliche Modis
+    - Runden, Schlüssellänge, ...
+
+---
+
+
+# Speck - Setups
+
+| Speck                                            | Blocklänge                                    | Schlüssellänge                                | Runden                                    |
+| ------------------------------------------------ | --------------------------------------------- | --------------------------------------------- | ----------------------------------------- |
+| <span style="color:#d08a1d">**Speck3264**</span> | <span style="color:#d08a1d">**32 Bit**</span> | <span style="color:#d08a1d">**64 Bit**</span> | <span style="color:#d08a1d">**22**</span> |
+| Speck4872                                        | 48 Bit                                        | 72 Bit                                        | 22                                        |
+| Speck4896                                        | 48 Bit                                        | 96 Bit                                        | 23                                        |
+| Speck6496                                        | 64 Bit                                        | 96 Bit                                        | 26                                        |
+| Speck64128                                       | 64 Bit                                        | 128 Bit                                       | 27                                        |
+| Speck9696                                        | 96 Bit                                        | 96 Bit                                        | 28                                        |
+| Speck96144                                       | 96 Bit                                        | 144 Bit                                       | 29                                        |
+| Speck128128                                      | 128 Bit                                       | 128 Bit                                       | 32                                        |
+| Speck128192                                      | 128 Bit                                       | 192 Bit                                       | 33                                        |
+| Speck1281256                                     | 128 Bit                                       | 256 Bit                                       | 34                                        |
+
+---
+
+# Speck - Rundenfunktion
+
+![](img/rundenfunktion.png){width=400px}
+
+* Wird während der Key Schedule aufgerufen
+* Wird beim der Verschlüsselung aufgerufen
+
+---
+
+# Speck - Pseudocode
+
+```C
+pt = Plaintext Bytes              Pt = Plaintext as 16 Bit Words
+ct = Ciphertext Bytes             Ct = Ciphertext as 16 Bit Words
+k = Key as Bytes                  K = Key as 16 Bit Words
+
+// Key Schedule
+D=K[3], C=K[2], B=K[1], A=K[0]
+
+for i in 0..<22
+    rk[i]=A
+    ER16(B, A, i++)
+    rk[i]=A
+    ER16(C, A, i++)
+    rk[i]=A
+    ER16(D, A, i++)
+
+// Encryption
+Ct[0]=Pt[0]; Ct[1]=Pt[1];
+
+for i in 0..<22
+    ER16(Ct[1], Ct[0], rk[i++])
+
+```
+
+---
+
+
+# Speck - Möglicher Angriff
+
+* Angriff der Rundenfunktion
+* ADD/XOR/ROT Operationen
+
+```C
+void FuncER16(u16 *x, u16 *y, u16 k)
+{
+    u16 tmp_x = *x;
+    u16 tmp_y = *y;
+
+    *x = (((tmp_x)>>(7)) | ((tmp_x)<<(16-(7))));  // ROR(7)
+    *x += *y;
+
+    *x = *x ^ k;
+
+    *y = (((tmp_y)<<(2)) | (tmp_y>>(16-(2))));   // ROL(2)
+    *y = *y ^ *x;
+}
+
+```
+
+---
+
+# Speck - Möglicher Angriff
+
+* Der Roundkey steckt in der XOR Operation
+
+![](img/er16_annot.png)
+
+---
+
+# Correlation Power Analysis
+
+* Variante von Differential Power Analysis (DPA)
+* Nutzt Pearson Correlation Coefficient (PCC)
+* **Bei Speck:** Korrelation zwischen Power-Trace und Key
+
+---
+
+# Theoretischer Angriff
+
+
+---
+
+
+
+# Speck - Modell
+
+
+---
+
+# Hamming Weight
+
+---
+
+# T-Test
+
+
+---
+
+# Angriff
+
+
+
+
+---
+
+# Gegenmaßnahmen
+
+---
+
+# Hiding
+
+---
+
+# Hiding - Code
+
+
+
+---
+
+# Hiding - T-Test
+
+---
+
+
+# Korrelationen
+
+---
+
+# Referenzen
+
 
-# References

BIN
sample_traces/5000_encryption_traces.npy


BIN
sample_traces/5000_plaintext_traces.npy


Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.