X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/blobdiff_plain/929081fb29789fafcfa69d8c5fcdefaa271a0900..fdee62a253b790a7e6620c35b38567095f173f35:/OneRoundIoT/EnhancedOneRound/Simon_speck/C/user_tool.c diff --git a/OneRoundIoT/EnhancedOneRound/Simon_speck/C/user_tool.c b/OneRoundIoT/EnhancedOneRound/Simon_speck/C/user_tool.c index 7bab141..d113388 100644 --- a/OneRoundIoT/EnhancedOneRound/Simon_speck/C/user_tool.c +++ b/OneRoundIoT/EnhancedOneRound/Simon_speck/C/user_tool.c @@ -168,17 +168,22 @@ int main(int argc, char *argv[]) { printf("Block Size: %d\n", my_cipher.block_size); + uint8_t *backup_buffer; + uint8_t *start=working_buffer; double t=TimeStart(); + - uint8_t *backup_buffer = working_buffer; - for(int block=0; block < input_size / block_size; block++){ + for(int i=0;i<100;i++) { + working_buffer=start; + backup_buffer = working_buffer; + for(int block=0; block < input_size / block_size; block++){ (*operationPtr)(my_cipher, working_buffer, working_buffer); working_buffer += block_size; + } } - double time=TimeStop(t); - printf("ratio %e\n",(double)input_size/time); + printf("ratio %e\n",(double)input_size*100/time); FILE *out_fd; out_fd = fopen(argv[6],"wb");