X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/blobdiff_plain/429e289335b33339b56a05c986f26c73f555fe65..e1e2e7c7fc04e729923680bff8b1638d8910d841:/OneRoundIoT/openssl/openssl_evp.c?ds=sidebyside diff --git a/OneRoundIoT/openssl/openssl_evp.c b/OneRoundIoT/openssl/openssl_evp.c index 55ba25e..6860932 100644 --- a/OneRoundIoT/openssl/openssl_evp.c +++ b/OneRoundIoT/openssl/openssl_evp.c @@ -57,9 +57,14 @@ int encrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key, * In this example we are using 256 bit AES (i.e. a 256 bit key). The * IV size for *most* modes is the same as the block size. For AES this * is 128 bits */ - + //static double time=0; + //double t=0; + //t=TimeStart(); //256 //avant ecb + for(int i=0;i ecb if(ctr) { if(1 != EVP_DecryptInit_ex(ctx, EVP_aes_128_ctr(), NULL, key, iv)) @@ -146,12 +155,12 @@ int decrypt(unsigned char *ciphertext, int ciphertext_len, unsigned char *key, double t=0; t=TimeStart(); */ - for(int i=0;i