From 9edbd0767c9523f4b14c365016f27deb2a974d92 Mon Sep 17 00:00:00 2001 From: couturier Date: Thu, 4 Nov 2021 15:43:57 +0100 Subject: [PATCH 1/1] new --- OneRoundIoT/openssl/Makefile | 6 +- .../openssl/openssl_evp_chacha20_poly1305 | Bin 0 -> 23128 bytes .../openssl/openssl_evp_chacha20_poly1305.c | 4 +- .../openssl_evp_chacha20_poly1305_v2.c | 499 ++++++++++++++++++ 4 files changed, 506 insertions(+), 3 deletions(-) create mode 100755 OneRoundIoT/openssl/openssl_evp_chacha20_poly1305 create mode 100644 OneRoundIoT/openssl/openssl_evp_chacha20_poly1305_v2.c diff --git a/OneRoundIoT/openssl/Makefile b/OneRoundIoT/openssl/Makefile index 150f06a..59643a3 100644 --- a/OneRoundIoT/openssl/Makefile +++ b/OneRoundIoT/openssl/Makefile @@ -8,6 +8,7 @@ OBJ5 = pixmap_io.o openssl_evp_gcm.o OBJ6 = pixmap_io.o openssl_evp_hmac.o OBJ7 = pixmap_io.o openssl_evp_ocb.o OBJ8 = pixmap_io.o openssl_chacha20_poly1305.o +OBJ9 = pixmap_io.o openssl_chacha20_poly1305_v2.o openssl_evp: $(OBJ) $(C) -o $@ $^ $(CFLAGS) @@ -34,11 +35,14 @@ openssl_evp_ocb: $(OBJ7) openssl_evp_chacha20_poly1305: $(OBJ7) $(C) -o $@ $^ $(CFLAGS) +openssl_evp_chacha20_poly1305_v2: $(OBJ7) + $(C) -o $@ $^ $(CFLAGS) + %.o: %.c $(C) -c -o $@ $< -O3 clean: - rm -rf $(OBJ) openssl_evp openssl_evp_cmac openssl_evp_ccm openssl_evp_ocb + rm -rf $(OBJ) openssl_evp openssl_evp_cmac openssl_evp_ccm openssl_evp_ocb openssl_evp_chacha20_poly1305_v2 openssl_evp_chacha20_poly1305 diff --git a/OneRoundIoT/openssl/openssl_evp_chacha20_poly1305 b/OneRoundIoT/openssl/openssl_evp_chacha20_poly1305 new file mode 100755 index 0000000000000000000000000000000000000000..1a11e749ded26bd58e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QXpopgHhpZb;2f~3tBaEjW z_mgIMbw`KrM}vNt5v#-DKFjHJrQzd@xYtvMiQX#)_lX09Qp~4SE~6PbS}0X%V68%docWJp+^q$GTJn4&NDc_ekDNYgWK zYVv@^XNqB2zT6Lzv`~oSw$GE??-VRsf(zPnmHKkuNYWv!Ln+a|E%{06%l+Avz(_>u z%l#!u<-RUNcp@9dbUPT@LzVh+A4<|XAuQ`JN|vo*3rIeM@;Rtvr8L z#;4Si{rEU^$;DD%?r-i}2oR}IC&|B3Us8I0HR>n#LCbZOVw3)p`d_5!%l)omx2``) zC&|B3PXd3#1!1!O^4vL((3kC$@(y_+=vh#zq6|BkE%mREfS|HDMw*OWgKWDf|5@?7 u72SuZ3|W6U|Iql5bvLLphfn98mJ^rAl;uiU8lIW--xSZ=W78DUSoUA}fIBV# literal 0 HcmV?d00001 diff --git a/OneRoundIoT/openssl/openssl_evp_chacha20_poly1305.c b/OneRoundIoT/openssl/openssl_evp_chacha20_poly1305.c index dbe0bc3..a0e7d8d 100755 --- a/OneRoundIoT/openssl/openssl_evp_chacha20_poly1305.c +++ b/OneRoundIoT/openssl/openssl_evp_chacha20_poly1305.c @@ -72,11 +72,11 @@ int encrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key, //256 //avant ecb if(ctr) { - if(1 != CMAC_Init(ctx, key, 16, EVP_chacha20_poly1305(), NULL)) + if(1 != CMAC_Init(ctx, key, 32, EVP_chacha20_poly1305(), NULL)) handleErrors(); } else - if(1 != CMAC_Init(ctx, key, 16, EVP_chacha20_poly1305(), NULL)) + if(1 != CMAC_Init(ctx, key, 32, EVP_chacha20_poly1305(), NULL)) handleErrors(); size_t mactlen; unsigned char mact[16] = {0}; diff --git a/OneRoundIoT/openssl/openssl_evp_chacha20_poly1305_v2.c b/OneRoundIoT/openssl/openssl_evp_chacha20_poly1305_v2.c new file mode 100644 index 0000000..928ee2a --- /dev/null +++ b/OneRoundIoT/openssl/openssl_evp_chacha20_poly1305_v2.c @@ -0,0 +1,499 @@ +//gcc pixmap_io.c -c +//gcc openssl_evp.c pixmap_io.o -o openssl_evp -I /usr/include/openssl/ -lcrypto -O3 -std=c99 + + +#include +#include +#include +#include +#include +#include +#include +#include "pixmap_io.h" + +typedef unsigned char uchar; + +int nb_test=1; +int ctr=0; + + + + + +double TimeStart() +{ + struct timeval tstart; + gettimeofday(&tstart,0); + return( (double) (tstart.tv_sec + tstart.tv_usec*1e-6) ); +} + +double TimeStop(double t) +{ + struct timeval tend; + + gettimeofday(&tend,0); + t = (double) (tend.tv_sec + tend.tv_usec*1e-6) - t; + return (t); +} + + +void handleErrors(void) +{ + ERR_print_errors_fp(stderr); + abort(); +} + + +int encryptccm(unsigned char *plaintext, int plaintext_len, unsigned char *aad, + int aad_len, unsigned char *key, unsigned char *iv, + unsigned char *ciphertext, unsigned char *tag) +{ + EVP_CIPHER_CTX *ctx; + + int len; + + int ciphertext_len; + + + /* Create and initialise the context */ + if(!(ctx = EVP_CIPHER_CTX_new())) handleErrors(); + + /* Initialise the encryption operation. */ + if(1 != EVP_EncryptInit_ex(ctx, EVP_chacha20_poly1305(), NULL, NULL, NULL)) + handleErrors(); + + /* Setting IV len to 7. Not strictly necessary as this is the default + * but shown here for the purposes of this example */ + if(1 != EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, 7, NULL)) + handleErrors(); + + /* Set tag length */ + EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, 16, NULL); + + /* Initialise key and IV */ + if(1 != EVP_EncryptInit_ex(ctx, NULL, NULL, key, iv)) handleErrors(); + + /* Provide the total plaintext length + */ + if(1 != EVP_EncryptUpdate(ctx, NULL, &len, NULL, plaintext_len)) + handleErrors(); + + /* Provide any AAD data. This can be called zero or one times as + * required + */ + if(1 != EVP_EncryptUpdate(ctx, NULL, &len, aad, aad_len)) + handleErrors(); + + /* Provide the message to be encrypted, and obtain the encrypted output. + * EVP_EncryptUpdate can only be called once for this + */ + if(1 != EVP_EncryptUpdate(ctx, ciphertext, &len, plaintext, plaintext_len)) + handleErrors(); + ciphertext_len = len; + + /* Finalise the encryption. Normally ciphertext bytes may be written at + * this stage, but this does not occur in CCM mode + */ + if(1 != EVP_EncryptFinal_ex(ctx, ciphertext + len, &len)) handleErrors(); + ciphertext_len += len; + + /* Get the tag */ + if(1 != EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, 16, tag)) + handleErrors(); + + /* Clean up */ + EVP_CIPHER_CTX_free(ctx); + + return ciphertext_len; +} + + +int decryptccm(unsigned char *ciphertext, int ciphertext_len, unsigned char *aad, + int aad_len, unsigned char *tag, unsigned char *key, unsigned char *iv, + unsigned char *plaintext) +{ + EVP_CIPHER_CTX *ctx; + int len; + int plaintext_len; + int ret; + + /* Create and initialise the context */ + if(!(ctx = EVP_CIPHER_CTX_new())) handleErrors(); + + /* Initialise the decryption operation. */ + if(1 != EVP_DecryptInit_ex(ctx, EVP_chacha20_poly1305(), NULL, NULL, NULL)) + handleErrors(); + + /* Setting IV len to 7. Not strictly necessary as this is the default + * but shown here for the purposes of this example */ + if(1 != EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, 7, NULL)) + handleErrors(); + + /* Set expected tag value. */ + if(1 != EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, 16, tag)) + handleErrors(); + + /* Initialise key and IV */ + if(1 != EVP_DecryptInit_ex(ctx, NULL, NULL, key, iv)) handleErrors(); + + + /* Provide the total ciphertext length + */ + if(1 != EVP_DecryptUpdate(ctx, NULL, &len, NULL, ciphertext_len)) + handleErrors(); + + /* Provide any AAD data. This can be called zero or more times as + * required + */ + if(1 != EVP_DecryptUpdate(ctx, NULL, &len, aad, aad_len)) + handleErrors(); + + /* Provide the message to be decrypted, and obtain the plaintext output. + * EVP_DecryptUpdate can be called multiple times if necessary + */ + ret = EVP_DecryptUpdate(ctx, plaintext, &len, ciphertext, ciphertext_len); + + // printf("RET %d len %d\n",ret,len); + + plaintext_len = len; + + /* Clean up */ + EVP_CIPHER_CTX_free(ctx); + + if(ret > 0) + { + /* Success */ + return plaintext_len; + } + else + { + /* Verify failed */ + return -1; + } +} + + + + +/* int encrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key, */ +/* unsigned char *iv, unsigned char *ciphertext, int ctr, int index) */ +/* { */ +/* EVP_CIPHER_CTX *ctx; */ + +/* int len; */ + +/* int ciphertext_len; */ + +/* /\* Create and initialise the context *\/ */ +/* if(!(ctx = EVP_CIPHER_CTX_new())) handleErrors(); */ + +/* /\* Initialise the encryption operation. IMPORTANT - ensure you use a key */ +/* * and IV size appropriate for your cipher */ +/* * 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 */ +/* if(ctr) { */ +/* if(1 != EVP_EncryptInit_ex(ctx, EVP_aes_128_ctr(), NULL, key, iv)) */ +/* handleErrors(); */ +/* } */ +/* else */ +/* if(1 != EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv)) */ +/* handleErrors(); */ + +/* //time+=TimeStop(t); */ +/* //printf("Time init %f\n",time); */ + + +/* // int cipherBlockSize = EVP_CIPHER_CTX_block_size(ctx); */ +/* // printf("INFO(evp_encrypt): block size: %d\n", cipherBlockSize); */ + + +/* /\* Provide the message to be encrypted, and obtain the encrypted output. */ +/* * EVP_EncryptUpdate can be called multiple times if necessary */ +/* *\/ */ + +/* /\* */ +/* static double time=0; */ +/* double t=0; */ +/* t=TimeStart(); */ +/* *\/ */ +/* for(int i=0;i ecb */ +/* if(ctr) { */ +/* if(1 != EVP_DecryptInit_ex(ctx, EVP_aes_128_ctr(), NULL, key, iv)) */ +/* handleErrors(); */ +/* } */ +/* else */ +/* if(1 != EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv)) */ +/* handleErrors(); */ + +/* /\* Provide the message to be decrypted, and obtain the plaintext output. */ +/* * EVP_DecryptUpdate can be called multiple times if necessary */ +/* *\/ */ + +/* /\* static double time=0; */ +/* double t=0; */ +/* t=TimeStart(); */ +/* *\/ */ +/* for(int i=0;i