/// <summary> /// Verifies a signature of <paramref name="Data"/> made by the EdDSA algorithm. /// </summary> /// <param name="Data">Payload to sign.</param> /// <param name="PublicKey">Public Key of the entity that generated the signature.</param> /// <param name="Signature">Signature</param> /// <returns>If the signature is valid.</returns> public override bool Verify(Stream Data, byte[] PublicKey, byte[] Signature) { return(EdDSA.Verify(Data, PublicKey, this.H_dom4, this, Signature)); }
/// <summary> /// Creates a signature of <paramref name="Data"/> using the EdDSA algorithm. /// </summary> /// <param name="Data">Payload to sign.</param> /// <returns>Signature.</returns> public override byte[] Sign(Stream Data) { return(EdDSA.Sign(Data, this.PrivateKey, this.AdditionalInfo, this.H_dom4, this)); }
/// <summary> /// Creates a signature of <paramref name="Data"/> using the EdDSA algorithm. /// </summary> /// <param name="Data">Payload to sign.</param> /// <returns>Signature.</returns> public override byte[] Sign(byte[] Data) { return(EdDSA.Sign(Data, this.PrivateKey, this.AdditionalInfo, Hashes.ComputeSHA512Hash, this)); }
/// <summary> /// Verifies a signature of <paramref name="Data"/> made by the EdDSA algorithm. /// </summary> /// <param name="Data">Payload to sign.</param> /// <param name="PublicKey">Public Key of the entity that generated the signature.</param> /// <param name="Signature">Signature</param> /// <returns>If the signature is valid.</returns> public override bool Verify(Stream Data, byte[] PublicKey, byte[] Signature) { return(EdDSA.Verify(Data, PublicKey, Hashes.ComputeSHA512Hash, this, Signature)); }
/// <summary> /// Decodes an encoded point on the curve. /// </summary> /// <param name="Point">Encoded point.</param> /// <returns>Decoded point.</returns> public override PointOnCurve Decode(byte[] Point) { return(EdDSA.Decode(Point, this)); }
/// <summary> /// Encodes a point on the curve. /// </summary> /// <param name="Point">Normalized point to encode.</param> /// <returns>Encoded point.</returns> public override byte[] Encode(PointOnCurve Point) { return(EdDSA.Encode(Point, this)); }