forked from monnerat/BUT2FI_R4.B.10
generateur fait
This commit is contained in:
parent
824aecf3e9
commit
bb48e4c3de
@ -21,9 +21,18 @@ uint64 generateur(uint64 p)
|
|||||||
uint64 g=2;
|
uint64 g=2;
|
||||||
uint64 r=1;
|
uint64 r=1;
|
||||||
|
|
||||||
while(r==1){
|
while(r){
|
||||||
expm(g,(p-1)/2,p)
|
if(expm(g,2,p) == 1){
|
||||||
g++;
|
g++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if(expm(g,(p-1)/2,p) == 1){
|
||||||
|
g++;
|
||||||
|
continue;
|
||||||
|
}else{
|
||||||
|
return g;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
td_tp/tp3/src/test_df
Executable file
BIN
td_tp/tp3/src/test_df
Executable file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user