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)); }
/// <summary> /// Constructor /// </summary> /// <param name="curve">curve</param> /// <param name="publicKey">public key</param> public EDDSAPublicKey(EdwardsCurve curve, byte[] publicKey) { _curve = curve; _publicKey = publicKey; }
/// <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; }