I have designed a specific client and server program, which sends a file from client to server in 32k chunks. I want to encrypt only part of the data. More specifically: in each 32k chunk passing from client to server I want to encrypt only 500 bytes. This, in a non-continuous way (meaning: partial encryptionhere and there in the chunk of 32k, totally forming 500 bytesof encrypted data within the 32k block). Here client is a constrained sensor and server is an Arduino board used for Internet of Things concept, to save of energy of the constrained device(client) i want to encrypt only parts of data.
Are there any lightweight(here refers to C.P.U consumption) cryptographic algorithms or methods which offer the option to set an “offset” and a parameter defining how much partial data we want to encrypt?
For example encrypt (bufptr, random_num, ENCRYPT_LENGTH);
where bufptr
is a 32k chunk with information, random_num
is the random number smaller than the bufptr
pointing to the bufptr
, ENCRYPT_LENGTH
is the length we want to encrypt (like 20 bytes from the number pointed by the random_num
).