A
A
Alexander2015-02-28 23:09:26
Arduino
Alexander, 2015-02-28 23:09:26

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

4 answer(s)
O
Ocelot, 2015-02-28
@Ocelot

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.

J
jcmvbkbc, 2015-03-01
@jcmvbkbc

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?)

V
Vladimir Martyanov, 2015-03-01
@vilgeforce

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.

M
m0rd, 2015-03-01
@m0rd

Um ... Correct me if not, your data is encrypted on the server and decrypted on the controller with a key that is hardcoded there. It turns out the key is always the same and does not change?
If it does not change, then who are you protecting the encrypted data from?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question