コード例 #1
0
ファイル: Liu2004.cs プロジェクト: sorrge/LSAG
 /// <summary>
 /// This is a cached version of the verifier, designed for mass verification of signatures coming from the same list of keys.
 /// If you keep the cache, subsequent verifications will be faster. This only matters when the number of keys is high (>50).
 /// </summary>
 /// <param name="message">The message which was signed</param>
 /// <param name="signature">The signature</param>
 /// <param name="keyCache">The cache, containing the list of public keys for which the signature was generated</param>
 /// <returns></returns>
 public abstract bool VerifySignature(byte[] message, SignType signature, MultiExponentiation keyCache);
コード例 #2
0
        public override bool VerifySignature(byte[] message, Liu2005.Signature signature, MultiExponentiation keyCache)
        {
            var a = (keyCache.Pow(signature.C) * mod.Pow(GroupParameters.Generator, signature.S)).Mod(GroupParameters.Prime);

            return(VerifyA(message, signature, keyCache.Bases, a));
        }
コード例 #3
0
ファイル: Liu2004.cs プロジェクト: sorrge/LSAG
 public override bool VerifySignature(byte[] message, Liu2004.Signature signature, MultiExponentiation keyCache)
 {
     return(VerifySignature(message, keyCache.Bases, signature));
 }