Currently I'm looking at these for short message data that is byte aligned. These algorithms appear to like double word aligned data. They also appear to be sensitive to endianess in some circumstances. I prefer to implement encryption in an encapsulated system (IE data goes in data goes out no data is exchanged outside the system unless it's encrypted) myself.
Right so WHATS my problem? Well my data is byte aligned and TEA XXTEA and BTEA are all 4 byte aligned (and and endian sensitive as a consequence).
So PC's are little endian biased and what I have is big endian oriented in it's double word arithmetic. My guess is the encryption overhead burden might make things even slower with my communications (but hey it's not like we are transferring huge amounts of data here we are talking tiny stuff at best).
The other problem is the data to be encrypted is definitely not double word aligned, it's byte aligned. Messages are packets of data from 3 to 23 bytes in length. 7 bytes overhead and remaining data is the payload. Messages can be as short as 3 bytes (with only 1 byte to be encrypted) so suggestions on how to encrypt a single byte packet so that it decrypts correctly?
My guess is this is not possible so that means very short messages have to use something else (for encryption)
The packet structure consists of type data (if any) length and source/destination inform with a 8 bit CRC at the end. I suppose I can arrange it so that source / destination information and if word aligned data is encrypted? Hmmm it's kind of messy.
Anyhow thoughts? I was considering mixing the encryption usage based on the size of the packet. (IE byte oriented encryption on sections that are not double word aligned and on sections of data that are double word aligned the btea on that).
The data does not require STRONG encryption just enough to make it difficult for someone to send bad data and it be interpreted as a real message and god only knows what happens after that.
Cyb
Right so WHATS my problem? Well my data is byte aligned and TEA XXTEA and BTEA are all 4 byte aligned (and and endian sensitive as a consequence).
So PC's are little endian biased and what I have is big endian oriented in it's double word arithmetic. My guess is the encryption overhead burden might make things even slower with my communications (but hey it's not like we are transferring huge amounts of data here we are talking tiny stuff at best).
The other problem is the data to be encrypted is definitely not double word aligned, it's byte aligned. Messages are packets of data from 3 to 23 bytes in length. 7 bytes overhead and remaining data is the payload. Messages can be as short as 3 bytes (with only 1 byte to be encrypted) so suggestions on how to encrypt a single byte packet so that it decrypts correctly?
My guess is this is not possible so that means very short messages have to use something else (for encryption)
The packet structure consists of type data (if any) length and source/destination inform with a 8 bit CRC at the end. I suppose I can arrange it so that source / destination information and if word aligned data is encrypted? Hmmm it's kind of messy.
Anyhow thoughts? I was considering mixing the encryption usage based on the size of the packet. (IE byte oriented encryption on sections that are not double word aligned and on sections of data that are double word aligned the btea on that).
The data does not require STRONG encryption just enough to make it difficult for someone to send bad data and it be interpreted as a real message and god only knows what happens after that.
Cyb