Пример #1
0
        internal static EDDSAPublicKey ReadFrom(PublicKeyAlgorithm algorithm, SSH2DataReader reader)
        {
            EdwardsCurve curve = EdwardsCurve.FindByAlgorithm(algorithm);

            if (curve == null)
            {
                throw new SSHException(Strings.GetString("UnsupportedEllipticCurve"));
            }

            byte[] q = reader.ReadByteString();
            return(new EDDSAPublicKey(curve, q));
        }
Пример #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="curve">curve</param>
 /// <param name="publicKey">public key</param>
 public EDDSAPublicKey(EdwardsCurve curve, byte[] publicKey)
 {
     _curve = curve;
     _publicKey = publicKey;
 }
Пример #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="curve">curve</param>
 /// <param name="publicKey">public key</param>
 /// <param name="privateKey">private key</param>
 public EDDSAKeyPair(EdwardsCurve curve, EDDSAPublicKey publicKey, byte[] privateKey)
 {
     _curve = curve;
     _publicKey = publicKey;
     _privateKey = privateKey;
 }
Пример #4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="curve">curve</param>
 /// <param name="publicKey">public key</param>
 /// <param name="privateKey">private key</param>
 public EDDSAKeyPair(EdwardsCurve curve, EDDSAPublicKey publicKey, byte[] privateKey)
 {
     _curve      = curve;
     _publicKey  = publicKey;
     _privateKey = privateKey;
 }
Пример #5
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="curve">curve</param>
 /// <param name="publicKey">public key</param>
 public EDDSAPublicKey(EdwardsCurve curve, byte[] publicKey)
 {
     _curve     = curve;
     _publicKey = publicKey;
 }