111 Commits

Author SHA1 Message Date
kngako
3c01a2aad4 Use frost in Secp256k1 native logic 2024-08-04 23:53:28 +02:00
Kgothatso
4826863644 Update secp git submodule 2024-08-03 19:56:03 +02:00
Kgothatso
099dcccf49 Make use of libsecp256k1 for musig+frost functions 2024-08-01 02:45:16 +02:00
Kgothatso
600431caa1 Update gitignore 2024-08-01 00:32:13 +02:00
kngako
30d690ee6e Add libsecp256k1-zkp submodule for frost logic 2024-07-31 07:59:58 +02:00
kngako
4e1b38d163 Remove secp256k1 submodule 2024-07-31 07:58:35 +02:00
Fabrice Drouin
567f411e12
Verify musig2 secret nonces (#108)
* Verify musig2 secret nonces

Trying to generate a musig2 partial signature with a secret nonce that was generated with a public key that does not match the signing key's public key will trigger secp256k1's illegal callback (which calls abort()) and crash the application.

=> Here we verify that the secret nonce matches the signing key before we call secp256k1_musig_partial_sign().
The verification method is a bit hackish (we extract the public key from the secret nonce blob) because secp256k1 does not export the methods we need to do this cleanly.
2024-04-18 09:54:51 +02:00
Fabrice Drouin
eb92fccbd6
Build a universal JNI binary for macos (#106)
Universal libraries embed both arm64 and x64 binaries.
2024-03-12 10:09:34 +01:00
Fabrice Drouin
d30e2a1b59
Set version to 0.15.0 (#105) v0.15.0 2024-03-04 19:29:52 +01:00
Fabrice Drouin
bae4744bcb
Add macos build targets (#104)
* Add macos build targets

* Update snapshot publishing script
2024-03-04 17:58:20 +01:00
Fabrice Drouin
b2eb68bf83
Post release cleanup (#103)
* Set version to 0.15.0-SNAPSHOT

* Update publishing scripts
2024-02-14 18:28:19 +01:00
Fabrice Drouin
c582396b96
Set version to 0.14.0 (#102) v0.14.0 2024-02-14 13:51:52 +01:00
Fabrice Drouin
202b0c94b6
Add support for musig2 (#93)
* Use Jonas Nick's musig2 branch

* Reformat c code (no functional changes)

* Implement musig2

* Add documentation to musig2 functions (#97)

Usage of the Musig2 functions isn't intuitive at all, especially with
the key aggregation cache and session data. It's important to provide
accurate documentation to help users understand how to correctly produce
musig2 signatures.

We also change argument names to match Kotlin best practices instead of
using the same argument names as C functions.

* Add musig2 reference tests (no functional changes)

---------

Co-authored-by: Bastien Teinturier <31281497+t-bast@users.noreply.github.com>
2024-02-14 13:28:22 +01:00
Fabrice Drouin
780f97e46d
Set version to 0.14.0-SNAPSHOT (#99) 2024-01-23 22:27:31 +01:00
Fabrice Drouin
da2cf93fcf
Update README.md 2024-01-23 21:55:59 +01:00
Fabrice Drouin
f5e1655ff0
Set version to 0.13.0 (#98) v0.13.0 2024-01-23 16:46:55 +01:00
Fabrice Drouin
8ba5d4652e
Use kotlin 1.9 (#92)
Use kotlin 1.9
2024-01-23 15:44:06 +01:00
Fabrice Drouin
e94e41b896
Update secp256k1 to version 0.4.1 (#96)
Use secp256k1 0.4.1
2024-01-02 11:16:36 +01:00
Fabrice Drouin
1a4c8b37cb
Release 0.12.0 (#95) v0.12.0 2023-12-13 16:40:32 +01:00
Fabrice Drouin
f242b4ffe8
Check arguments passed to secp256k1 methods (#94)
* Check arguments passed to secp256k1 methods

Illegal arguments will trigger an internal callback that prints to stderr and calls abort.
We already check arguments in our JNI and kotlin native code but had missed 2 checks (recid in ecdsaRecover, empty arrays in pubkeyCombine).

* Implement the same "tweak" checks in the native code and JNI code

The native code was missing checks on the "tweak" size (which must be 32 bytes)
2023-12-13 13:42:14 +01:00
Fabrice Drouin
161da89ee1
Set version to 0.11.0 (#86) v0.11.0 2023-09-28 09:50:24 +02:00
Fabrice Drouin
3706a546a2
Use secp256k1 0.4.0 (#85) 2023-09-18 14:05:36 +02:00
Fabrice Drouin
ffcaaf1b64
Set version to 0.10.1 (#84) v0.10.1 2023-06-28 13:03:19 +02:00
Fabrice Drouin
6ef94df247
Use secp256k1 0.3.2 (#83) 2023-06-28 10:43:05 +02:00
Fabrice Drouin
5169073a92
Update README.md 2023-05-15 11:15:30 +02:00
Fabrice Drouin
317e086cba
Set version to 0.10.0 (#82) v0.10.0 2023-05-11 18:29:50 +02:00
Fabrice Drouin
7c7aabba80
Upgrade to Kotlin 1.8 (#81)
* Upgrade to Kotlin 1.8

* Update snapshot deployment script

Kotlin 1.8 creates a new metadata jar for ios modules.
2023-05-11 17:53:41 +02:00
Fabrice Drouin
b6823cbda6
Update CI build (#80) 2023-04-25 09:55:48 +02:00
Fabrice Drouin
d50d9060c2
Set version to 0.9.0 (#78) v0.9.0 2023-04-13 09:36:07 +02:00
Fabrice Drouin
6fedb1577c
Update build for macos M1 (#77) 2023-04-13 09:15:43 +02:00
Fabrice Drouin
94bb2d67cf
Use secp256k1 0.3.1 (#76) 2023-04-11 19:10:51 +02:00
Fabrice Drouin
bf05a001fe
Update Android build plugin and tools (#75) 2023-04-11 18:42:06 +02:00
Fabrice Drouin
d9e5fda600
Set version to 0.8.0 (#73) v0.8.0 2023-03-09 11:41:08 +01:00
Fabrice Drouin
8c984678be
Use secp256k1 0.3.0 (#72)
* Use secp256k1 0.3.0

* Set version to 0.8.0-SNAPSHOT
2023-03-09 11:10:41 +01:00
gandlafbtc
840de25c5f
remove kotlin from dependencies in readme example (#71)
The dependencies wouldn't resolve unless I removed kotlin(...)
2023-02-01 17:49:51 +01:00
Fabrice Drouin
cec3fb385f
Set version to 0.7.1 (#70) v0.7.1 2023-01-04 15:33:55 +01:00
Fabrice Drouin
d59def1c79
Use secp256k1 0.2.0 (#67) 2022-12-13 19:33:28 +01:00
Fabrice Drouin
52d73951e6
Set version to 0.7.1-SNAPSHOT (#68) 2022-12-13 19:33:06 +01:00
Fabrice Drouin
08669500b6
Update README.md
Upgrade to a kotlin 1.6.21 badge
2022-09-22 10:29:21 +02:00
thunderbiscuit
68e77c70be
Fix artifact names in README (#65) v0.7.0 2022-09-21 17:17:16 +02:00
Fabrice Drouin
5e59132e2a
Set version to 0.7.0 (#64) 2022-09-21 16:25:50 +02:00
Fabrice Drouin
d4eba9fb96
Update to kotlin 1.6 (#63)
Use kotlin 1.6 (and gradle 7.5.1)
2022-09-21 16:00:19 +02:00
Fabrice Drouin
d01a067159
Update secp256k1 sources (#60)
* Set version to 0.6.5-SNAPSHOT

* Update secp256k1 sources

We use 44c2452fd387f7ca604ab42d73746e7d3a44d8a2, same as bitcoin core at c41bfd1070176efcaae7fa33313cb4c3e88b44b0
2022-08-03 10:01:40 +02:00
Fabrice Drouin
75f45e9191
Set version to 0.6.4 (#53) v0.6.4 2022-04-11 15:17:42 +02:00
Fabrice Drouin
118c72064c
Update secp256k1 sources (#52)
We're now at 8746600eec5e7fcd35dabd480839a3a4bdfee87b, same as bitcoin core at 747cdf1d652d8587e9f2e3d4436c3ecdbf56d0a5
2022-04-11 13:34:59 +02:00
Fabrice Drouin
7af7b7760e
Document how to add custom JNI bindings (#50)
This is how we add Linux Arm64 JNI bindings.
2022-04-04 11:26:18 +02:00
Fabrice Drouin
4df49dd8f6
Document publishing process (#46)
Document publishing process
2022-03-29 18:42:01 +02:00
Fabrice Drouin
48c3e4723b
Set version to 0.6.4-SNAPSHOT (#49) 2022-03-24 16:26:17 +01:00
Fabrice Drouin
df183e88b2
Set version to 0.6.3 (#45) v0.6.3 2022-03-23 19:15:00 +01:00
Fabrice Drouin
de3fc7fe11
CI: fix windows tests (#48)
Github Actions modified their windows runners which broke our build. As recommended, we now uses `msys2` on windows and install the packages that we need.
2022-03-23 15:45:45 +01:00