X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/blobdiff_plain/ac38464adbf31817319ac0bd622b03feb179cca6..bdb76e61a70ac6da625d817bf7179e36436fa6cb:/OneRoundIoT/OneRound/one_round_hash_new.cpp diff --git a/OneRoundIoT/OneRound/one_round_hash_new.cpp b/OneRoundIoT/OneRound/one_round_hash_new.cpp index 59ec22d..a72d301 100644 --- a/OneRoundIoT/OneRound/one_round_hash_new.cpp +++ b/OneRoundIoT/OneRound/one_round_hash_new.cpp @@ -135,7 +135,7 @@ void prga(uchar *sc, int ldata, uchar *r) { } } - +inline uchar circ(uchar x,int n) {return (x << n) | (x >> (8 - n));} //the proposed hash function, which is based on DSD structure. Sensitivity is ensured by employing the binary diffusion @@ -186,31 +186,42 @@ void hash_DSD_BIN(uchar* seq_in, uchar* RM1,int len, int *PboxRM, uchar *Sbox1, for(int a=0;a0;a--) { Z[a-1]=Z[a]^Y[a]; } - for(int a=0;a