A
lgorithmique
N
umérique
D
istribuée
Private GIT Repository
projects
/
Cipher_code.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
update scprng
[Cipher_code.git]
/
OneRoundIoT
/
OneRound
/
one_round_new.cpp
diff --git
a/OneRoundIoT/OneRound/one_round_new.cpp
b/OneRoundIoT/OneRound/one_round_new.cpp
index 5022573a64c20c4265f0bb52f520e693e67c779d..b7940af9adf2c6055244347166a0bf79af87e407 100644
(file)
--- a/
OneRoundIoT/OneRound/one_round_new.cpp
+++ b/
OneRoundIoT/OneRound/one_round_new.cpp
@@
-135,7
+135,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];