]> AND Private Git Repository - Cipher_code.git/blobdiff - OneRoundIoT/OneRound/one_round_hash.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
update of enhance one round
[Cipher_code.git] / OneRoundIoT / OneRound / one_round_hash.cpp
index 2688609e7f5dbd62439253bb30f5d79f88a7f218..97334494fbf253f175fcfe22ecf7a0e500ee4be3 100644 (file)
@@ -128,7 +128,7 @@ void prga(uchar *sc, int ldata, uchar *r) {
   uchar j0=0;
 
   for (int it=0; it<ldata; it++) {
-    i0 = ((i0+1)&0xFE); //%255);
+    i0 = ((i0+1)%255);
     j0 = (j0 + sc[i0])&0xFF;
     uchar tmp = sc[i0];
     sc[i0] = sc[j0];