Debian Codegraph @

curve/ed25519/additions/fe_isreduced.c

raw
1 #include "fe.h"
2 #include "crypto_verify_32.h"
3
4 int fe_isreduced(const unsigned char* s)
5 {
6 fe f;
7 unsigned char strict[32];
8
9 fe_frombytes(f, s);
10 fe_tobytes(strict, f);
11 if (crypto_verify_32(strict, s) != 0)
12 return 0;
13 return 1;
14 }