BIP 340 Update (#1998)

* Rebased all secp256k1 work on top of most recent BIP 340 (with even tie-breakers and new tags in hashes)

* Built windows binaries

* Added mac binaries
This commit is contained in:
Nadav Kohen 2020-09-16 15:54:38 -05:00 committed by nkohen
parent 7f7114528f
commit ddd352d844
10 changed files with 5 additions and 5 deletions

@ -1 +1 @@
Subproject commit ff968fa1124543f04bc8cbfc78a669ce42cba63c
Subproject commit 9ed48e7d33df615547e40258d4ef85fe2ceb04ad

Binary file not shown.

Binary file not shown.

View file

@ -266,7 +266,7 @@ public class NativeSecp256k1Test {
byte[] sigArr = NativeSecp256k1.schnorrSign(data, secKey, auxRand);
String sigStr = toHex(sigArr);
String expectedSig = "F14D7E54FF58C5D019CE9986BE4A0E8B7D643BD08EF2CDF1099E1A457865B5477C988C51634A8DC955950A58FF5DC8C506DDB796121E6675946312680C26CF33";
String expectedSig = "6470FD1303DDA4FDA717B9837153C24A6EAB377183FC438F939E0ED2B620E9EE5077C4A8B8DCA28963D772A94F5F0DDF598E1C47C137F91933274C7C3EDADCE8";
assertEquals(sigStr, expectedSig, "testSchnorrSign");
}
@ -278,7 +278,7 @@ public class NativeSecp256k1Test {
byte[] sigArr = NativeSecp256k1.schnorrSignWithNonce(data, secKey, nonce);
String sigStr = toHex(sigArr);
String expectedSig = "5DA618C1936EC728E5CCFF29207F1680DCF4146370BDCFAB0039951B91E3637A50A2A860B130D009405511C3EAFE943E157A0DF2C2020E3E50DF05ADB175332F";
String expectedSig = "5DA618C1936EC728E5CCFF29207F1680DCF4146370BDCFAB0039951B91E3637A958E91D68537D1F6F19687CEC1FD5DB1D83DA56EF3ADE1F3C611BABD7D08AF42";
assertEquals(sigStr, expectedSig, "testSchnorrSignWithNonce");
}
@ -290,13 +290,13 @@ public class NativeSecp256k1Test {
byte[] pointArr = NativeSecp256k1.schnorrComputeSigPoint(data, nonce, pubKey, true);
String pointStr = toHex(pointArr);
String expectedPoint = "020D17280B8D2C2BD3B597B4446419C151DC237353D0FB9EC03D4EB7E8DE7EE0A8";
String expectedPoint = "03735ACF82EEF9DA1540EFB07A68251D5476DABB11AC77054924ECCBB4121885E8";
assertEquals(pointStr, expectedPoint, "testSchnorrComputeSigPoint");
}
@Test
public void testSchnorrVerify() throws AssertFailException{
byte[] sig = toByteArray("F14D7E54FF58C5D019CE9986BE4A0E8B7D643BD08EF2CDF1099E1A457865B5477C988C51634A8DC955950A58FF5DC8C506DDB796121E6675946312680C26CF33");
byte[] sig = toByteArray("6470FD1303DDA4FDA717B9837153C24A6EAB377183FC438F939E0ED2B620E9EE5077C4A8B8DCA28963D772A94F5F0DDF598E1C47C137F91933274C7C3EDADCE8");
byte[] data = toByteArray("E48441762FB75010B2AA31A512B62B4148AA3FB08EB0765D76B252559064A614");
byte[] pubx = toByteArray("B33CC9EDC096D0A83416964BD3C6247B8FECD256E4EFA7870D2C854BDEB33390");