Answer the question
In order to leave comments, you need to log in
What encryption algorithm is optimal for short blocks of data (less than 32 bits)?
I must say right away that I am almost an amateur in cryptography. I can use ready-made algorithms.
There is a system in which some data is encrypted on the server and decrypted on the Arduino controller. Encrypted data is entered by the user into the controller from the numeric keypad, the input is displayed on the 8-digit digital display. In order not to torment the user too much, it is desirable to limit the data length to the same 8 bits, which is less than 32 bits. The key in this case will be secret and hardwired into the controller, its length is not too critical.
Absolute Most modern encryption algorithms operate on 64-bit data blocks, which is too much.
Please advise an algorithm with a 32-bit or even smaller block and which will run on Arduino. Or a method on how to adapt 64-bit algorithms to the task.
Answer the question
In order to leave comments, you need to log in
Since the user enters with his hands, the data flow is very small. Use one-time keys (Vernam cipher). A four-megabyte flash drive is enough for a million blocks. This is two years of continuous operation, if you enter data once a minute.
Unsuccessful assignment. To advise something sensible, additional information is needed, at least:
- what is the purpose of encryption?
- How is it supposed to handle erroneous data? duplicate data?
- what state (except for the key) can/can the server and controller store? (e.g. amount of encrypted/decrypted data?)
How many bits in the key will suit you? An option for <32 bits is an RNG like Mersenne twister and XOR the data with the results of it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question