/// <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);
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)); }
public override bool VerifySignature(byte[] message, Liu2004.Signature signature, MultiExponentiation keyCache) { return(VerifySignature(message, keyCache.Bases, signature)); }