Wauw Much more response than I had hoped for.
So Now I have an implemented SHA-1, SHA-256, HMAC-SHA-1 and HMAC-SHA-256 and AES
As far as I can see they are all good enough for me.
I have been looking at both libraries and I fear some basic knowledge is still missing here
Assume I say my robot ID is 16Bits (int) , The GPS coordinates are 64 bits (2longs) and the date and time take 48 bit (6 Bytes).
So my message is binary wise 128 bit or 16 bytes.
This turns out to be exactly 1 N_BLOC in the AES library. So I can easily encrypt and decrypt this to another N_BLOC.
I assume I then will have to convert this binary to a ASCII string to send it over the Ethernet module.
My first question is: Assume I had 17 bytes. Do I pad those with garbage to get to 32 bites? and do 2 blocks?
I guess i first convert the bits to a string and then call the SHA function. What is not clear to me is what the readme file states
The hash result is then stored in hash, hash .. hash.
My second question is
Do I always get a hash from the same size?
My third question is:
If the web sever sends an encrypted message back how can I decrypt? I mean I haven't found a decrypt method in the readme. (I havn't unpacked yet)
In both cases
Is there a good implemented "covert bin to char" (and the other way around) algorithm?
Do I only need to send this hash? I mean: does the decrypt get me back to my original message?
As Arduino is an 8 bit platform and the server will be 32 or 64. Will this be compatible?