示例#1
0
 /// <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));
 }
示例#2
0
 /// <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));
 }
示例#3
0
 /// <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));
 }
示例#4
0
 /// <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));
 }
示例#5
0
 /// <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));
 }
示例#6
0
 /// <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));
 }