byte set_key (byte key, int keylen) ; void clean () ; // delete key schedule after use void copy_n_bytes (byte * dest, byte * src, byte n) ; byte encrypt (byte plain [N_BLOCK], byte cipher [N_BLOCK]) ; byte cbc_encrypt (byte * plain, byte * cipher, int n_block, byte iv [N_BLOCK]) ; byte decrypt (byte cipher [N_BLOCK], byte plain [N_BLOCK]) ; byte cbc_decrypt (byte * cipher, byte * plain, int n_block, byte iv [N_BLOCK]) ;
Thank you so much for this extremely useful library. I'm not too "up" on C. Would you have any examples on encrypting a string that is longer than the N_BLOCK?I have hit a stumbling block (no pun intended), and am trying multi-dimentional arrays to create blocks for encrypting/decrypting - I haven't gotten it working so am not even sure if plain and cipher will always be the same length.
success_flag = aes.cbc_encrypt (plaintext, ciphertext, blockcount, iv);
I am new to this encryption and decryption stuff, so i was playing with this library to get a idea on how it works.My questions is why does the decryption function require the original unencrpyted plain message? Should it not be requesting the key and the cypher to decrypt it?If I encrpted a message on one arduino and sent the cypher to another arduino with the keys hard coded into each seperate program how would i decrpyt the message on the second arduino? I wouldn't want to send the plain text in the message because then it defeats the purpose of encrypting in the first place.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16