Search code examples
cryptographyarmstm32

which cryptographic algorithm can encrypt and decrypt blocks for 512bytes?


im looking for the crypto algorithm that can encrypt and decrypt blocks for 512bytes, the whole file will be 1mb size, and crypted will be trasfered to stm32 mcu, then in stm32 it will be decrypted for next procedure. Which algorithm i can use?


Solution

  • There is at least one block cipher that is Threefish that supports 256, 512, and 1024 block sizes with equal size keys, respectively. 512 block size needs 72 rounds to be secure. Whereas AES with a 128-bit block size needs 14 rounds for a 256-bit key, and a 256-bit key is the golden standard that is even secure against quantum adversaries.

    With CTR mode, you can call AES 4 times under the same key to encrypt your message faster than Threefish if we assume they have similar round performance - only needs 56 round calculations.

    One can prefer AES-256 since it is extensively analyzed and resisted attacks for more than 20 years.