public Signature(ArraySegment <byte> key, SecureRandom random) { _publicKey = KeyGeneration.GetPublicKeyFromPrivateKey(key); _verifier = new Verifier(new ArraySegment <byte>(_publicKey)); _key = new BigInteger(key.Array, key.Offset, key.Count); _random = random; }
public byte[] GetPublicKey() { if (_publicKey == null) { _publicKey = KeyGeneration.GetPublicKeyFromPrivateKey(_pk); } return(_publicKey); }
public IKeyAgreement GenerateNew() => new KeyAgreement(KeyGeneration.GeneratePrivateKey());
public Verifier(ArraySegment <byte> publicKey) { _pubkeypoint = KeyGeneration.DecodePublicKey(publicKey); }