- Timestamp:
- Jun 22, 2021, 9:00:19 PM (3 years ago)
- Location:
- azure_iot_hub_f767zi/trunk/wolfssl-4.7.0
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
azure_iot_hub_f767zi/trunk/wolfssl-4.7.0/wolfcrypt/src/des3.c
r457 r464 346 346 } 347 347 348 static voidDes3Crypt(Des3* des, byte* out, const byte* in, word32 sz,348 static int Des3Crypt(Des3* des, byte* out, const byte* in, word32 sz, 349 349 int dir) 350 350 { … … 461 461 } 462 462 #endif /* WOLFSSL_STM32_CUBEMX */ 463 return 0; 463 464 } 464 465 465 466 int wc_Des3_CbcEncrypt(Des3* des, byte* out, const byte* in, word32 sz) 466 467 { 467 Des3Crypt(des, out, in, sz, DES_ENCRYPTION); 468 return 0; 468 return Des3Crypt(des, out, in, sz, DES_ENCRYPTION); 469 469 } 470 470 471 471 int wc_Des3_CbcDecrypt(Des3* des, byte* out, const byte* in, word32 sz) 472 472 { 473 Des3Crypt(des, out, in, sz, DES_DECRYPTION); 474 return 0; 473 return Des3Crypt(des, out, in, sz, DES_DECRYPTION); 475 474 } 476 475 … … 1172 1171 1173 1172 /* permuted choice table (key) */ 1174 static const byte pc1[] = {1173 static const FLASH_QUALIFIER byte pc1[] = { 1175 1174 57, 49, 41, 33, 25, 17, 9, 1176 1175 1, 58, 50, 42, 34, 26, 18, … … 1185 1184 1186 1185 /* number left rotations of pc1 */ 1187 static const byte totrot[] = {1186 static const FLASH_QUALIFIER byte totrot[] = { 1188 1187 1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28 1189 1188 }; 1190 1189 1191 1190 /* permuted choice key (table) */ 1192 static const byte pc2[] = {1191 static const FLASH_QUALIFIER byte pc2[] = { 1193 1192 14, 17, 11, 24, 1, 5, 1194 1193 3, 28, 15, 6, 21, 10, … … 1204 1203 1205 1204 /* bit 0 is left-most in byte */ 1206 static const int bytebit[] = {1205 static const FLASH_QUALIFIER int bytebit[] = { 1207 1206 0200,0100,040,020,010,04,02,01 1208 1207 }; 1209 1208 1210 static const word32 Spbox[8][64] = {1209 static const FLASH_QUALIFIER word32 Spbox[8][64] = { 1211 1210 { 0x01010400,0x00000000,0x00010000,0x01010404, 1212 1211 0x01010004,0x00010404,0x00000004,0x00010000,
Note:
See TracChangeset
for help on using the changeset viewer.