public static void TestAllZeros(string privateKey, string publicKey) { var a = new X25519(); var pk = PublicKey.Import(a, publicKey.DecodeHex(), KeyBlobFormat.RawPublicKey); using (var k = Key.Import(a, privateKey.DecodeHex(), KeyBlobFormat.RawPrivateKey)) { Assert.False(a.TryAgree(k, pk, out SharedSecret s)); Assert.Null(s); Assert.Throws <CryptographicException>(() => a.Agree(k, pk)); } }