Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasDorier committed Jun 5, 2024
1 parent 43d4693 commit cf5d6dc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 134 deletions.
59 changes: 0 additions & 59 deletions NBitcoin.Tests/Secp256k1Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2911,65 +2911,6 @@ public void test_ecdsa_recovery_end_to_end()
pubkey != recpubkey);
}

[Fact]
[Trait("UnitTest", "UnitTest")]
public void test_schnorrsig_bip_vectors()
{
{
/* Test vector 1 */
byte[] sk1 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01
};
byte[] pk1 = {
0x02, 0x79, 0xBE, 0x66, 0x7E, 0xF9, 0xDC, 0xBB,
0xAC, 0x55, 0xA0, 0x62, 0x95, 0xCE, 0x87, 0x0B,
0x07, 0x02, 0x9B, 0xFC, 0xDB, 0x2D, 0xCE, 0x28,
0xD9, 0x59, 0xF2, 0x81, 0x5B, 0x16, 0xF8, 0x17,
0x98
};
byte[] msg1 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
byte[] sig1 = {
0x78, 0x7A, 0x84, 0x8E, 0x71, 0x04, 0x3D, 0x28,
0x0C, 0x50, 0x47, 0x0E, 0x8E, 0x15, 0x32, 0xB2,
0xDD, 0x5D, 0x20, 0xEE, 0x91, 0x2A, 0x45, 0xDB,
0xDD, 0x2B, 0xD1, 0xDF, 0xBF, 0x18, 0x7E, 0xF6,
0x70, 0x31, 0xA9, 0x88, 0x31, 0x85, 0x9D, 0xC3,
0x4D, 0xFF, 0xEE, 0xDD, 0xA8, 0x68, 0x31, 0x84,
0x2C, 0xCD, 0x00, 0x79, 0xE1, 0xF9, 0x2A, 0xF1,
0x77, 0xF7, 0xF2, 0x2C, 0xC1, 0xDC, 0xED, 0x05
};
test_schnorrsig_bip_vectors_check_verify(pk1, msg1, sig1, true);
}
}

void test_schnorrsig_bip_vectors_check_verify(byte[] pk_serialized, byte[] msg32, byte[] sig_serialized, bool expected)
{
var ctx = Context.Instance;
//const unsigned char* msg_arr[1];
//const secp256k1_schnorrsig* sig_arr[1];
//const secp256k1_pubkey* pk_arr[1];
ECPubKey pk;
SecpSchnorrSignature sig;

Assert.True(ctx.TryCreatePubKey(pk_serialized, out pk));
Assert.True(SecpSchnorrSignature.TryCreate(sig_serialized, out sig));

//sig_arr[0] = &sig;
//msg_arr[0] = msg32;
//pk_arr[0] = &pk;

Assert.Equal(expected, pk.SigVerifySchnorr(sig, msg32));
//CHECK(expected == secp256k1_schnorrsig_verify_batch(ctx, scratch, sig_arr, msg_arr, pk_arr, 1));
}

/* Tests several edge cases. */
[Fact]
[Trait("UnitTest", "UnitTest")]
Expand Down
75 changes: 0 additions & 75 deletions NBitcoin/Secp256k1/Schnorr/ECPubKey.cs

This file was deleted.

0 comments on commit cf5d6dc

Please sign in to comment.