public static bool fe_isreduced(byte[] curve25519_pubkey)
        {
            int[]  fe     = new int[10];
            byte[] strict = new byte[32];

            Fe_frombytes.fe_frombytes(fe, curve25519_pubkey);
            Fe_tobytes.fe_tobytes(strict, fe);
            if (Crypto_verify_32.crypto_verify_32(strict, curve25519_pubkey) != 0)
            {
                return(false);
            }
            return(true);
        }
示例#2
0
 public static int fe_isnonzero(int[] f)
 {
     byte[] s = new byte[32];
     Fe_tobytes.fe_tobytes(s, f);
     return(Crypto_verify_32.crypto_verify_32(s, zero));
 }