示例#1
0
        public bool PssVerify(byte[] m, byte[] signature, TpmAlgId hashAlg)
        {
            // The TPM uses the maximum salt length
            int        defaultPssSaltLength = 0; //  KeySize - CryptoLib.DigestSize(hashAlg) - 1 - 1;
            BigInteger sig = FromBigEndian(signature);
            BigInteger emx = BigInteger.ModPow(sig, E, N);

            byte[] em = ToBigEndian(emx, KeySize);

            bool ok = CryptoEncoders.PssVerify(m, em, defaultPssSaltLength, NumBits - 1, hashAlg);

            return(ok);
        }