for(int j=0;j<bufsize;j++) {
//Val[j]=splitmix64_stateless(Val[j])^Val[Pbox[j]];
//Val[j]=xorshift64(Val[j])^Val[Pbox[j]]; //fail
- Val[j]=xorshift64(Val[j])^Val[Pbox[j]]^Val[Pbox2[j]];
+// Val[j]=xorshift64(Val[j])^Val[Pbox[j]]^Val[Pbox2[j]];
+ Val[j]=xorshift64(Val[j]);
+
//Val[j]=xoroshiro128plus(&xoro[j])^Val[Pbox[j]];
//Val[j]=jsf(&ctx[j])^Val[Pbox[j]]; //good
//Val[j]=sfc(&sfcd[j])^Val[Pbox[j]]; //good
}
+ for(int j=0;j<bufsize;j++) {
+ Val[j]=Val[j]^Val[Pbox[j]]^Val[Pbox2[j]];
+ }
+
for(int j=0;j<bufsize;j++) {
cipher[nb*bufsize+j]=Val[j]^plain[nb*bufsize+j];
int main(int argc, char **argv) {
- printf("%d %d \n",sizeof(__uint64_t),sizeof(ulong));
+// printf("%d %d \n",sizeof(__uint64_t),sizeof(ulong));
uint nb_test=1;
}
double time=TimeStop(t);
- printf("time %e\n",nb_test*nb_bloc*h*8/time);
+ printf("%e ",nb_test*nb_bloc*h*8/time);
if(lena) {
for(int i=0;i<oneD;i++) {
}
t=TimeStart();
+
+
for(uint iter=0;iter<nb_test;iter++) {
scprng(SEQ2, SEQ, h, nb_bloc, Val,Sbox1, Sbox2, Pbox, Pbox2, DK, delta);
}
time=TimeStop(t);
- printf("time %e\n",nb_test*nb_bloc*h*8/time);
+ printf("%e\n",nb_test*nb_bloc*h*8/time);
if(lena) {
for(int i=0;i<oneD;i++) {