diff --git a/encrypt.cpp b/encrypt.cpp index 57e2b5d..b2e0af7 100755 --- a/encrypt.cpp +++ b/encrypt.cpp @@ -11,8 +11,11 @@ //static uint64_t seq=1; static int8_t zero_iv[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0};//this prog use zero iv,you should make sure first block of data contains a random/nonce data - - +/**** + * important! + * why zero iv + nonce first data block is secure? + * https://crypto.stackexchange.com/questions/5421/using-cbc-with-a-fixed-iv-and-a-random-first-plaintext-block +****/ unordered_map auth_mode_tostring = {{auth_none, "none"}, {auth_md5, "md5"}, {auth_crc32, "crc32"},{auth_simple,"simple"}}; unordered_map cipher_mode_tostring={{cipher_none,"none"},{cipher_aes128cbc,"aes128cbc"},{cipher_xor,"xor"}};