16 Commits

Author SHA1 Message Date
sstone
0364ec762e
Use local secp256k1 callbacks in kotlin native code 2023-12-12 12:08:13 +01:00
sstone
929e2cda40
Check that the recovery id is valid
It must be 0,1,2 or 3, this is an explicit requirement of the secp256k1 library.
2023-12-11 11:54:07 +01:00
Fabrice Drouin
bf05a001fe
Update Android build plugin and tools (#75) 2023-04-11 18:42:06 +02:00
Fabrice Drouin
ac7d4983d5
Export Schnorr signature API (#32)
Implement Schnorr signatures (BIP 340)
2021-11-23 17:38:46 +01:00
Bastien Teinturier
2ae6abcf93
Clarify public key encoding and enrich tests (#37)
Don't throw in `seckey_verify`: it's inconsistent to have this function throw
for some invalid inputs and return false for other invalid inputs.

Document public key compression and add tests.
2021-11-05 10:45:49 +01:00
Bastien Teinturier
f695e7453d
Clean up and enrich tests (#35)
* Harmonize parameter names
* Document methods
* Replace pubKeyAdd with pubKeyCombine
* Clean-up tests
2021-10-26 17:16:36 +02:00
Fabrice Drouin
6955c7416a
Add option to skip building and testing Android libraries (#33)
* Add otpion to skip building and testing Android libraries

Add `skip.android=true` to the local.properties files at the project's root to skip Android builds.
2021-10-25 14:27:02 +02:00
Fabrice Drouin
e7644b7ddb
Upgrade to kotlin 1.5 (#27)
* Upgrade to kotlin 1.5.31

* Upgrade dokka gradle plugins to 1.5.30
2021-09-22 15:22:05 +02:00
Salomon BRYS
7d22d835a5
Kotlin 1.4.31 (#13)
* Kotlin 1.4.31

* Updated CI add-path disabled command to new more secure environment file.

* Properly setting up Android in CI
2021-03-08 16:50:25 +01:00
Salomon BRYS
d702925e40
Kotlin 1.4.0 (#11)
Co-authored-by: Salomon BRYS <salomon@kodein.net>
2020-08-18 10:52:42 +02:00
Fabrice Drouin
0cc4c251f9
Fixup for #6 (native signature format detection) (#8)
* Fixup for #6

Behaviour was changed in the JNI wapper but not in Kotlin native code.

* Set version to 0.2.1-1.4-M3
2020-07-09 20:16:39 +02:00
Salomon BRYS
6c850eb2c4
Native jni build (#5)
* Each native library is in its own jar. Got rid of cross compilation. The project is `secp256k1` and not `secp256k1-kmp`.

* Updated CI to use all 3 OS VMs

Co-authored-by: Salomon BRYS <salomon@kodein.net>
2020-07-09 14:54:34 +02:00
Salomon BRYS
c5dbc42496
Kotlin 1.4-M3, fixed CI glitches & fixed build on Mac (#4)
* Kotlin 1.4-M3, fixed CI glitches & fixed build on Mac

* Fixes https://github.com/eskatos/gradle-command-action/issues/24

* Explicit mode requirements in Android tests

Co-authored-by: Salomon BRYS <salomon@kodein.net>
2020-07-06 21:45:17 +02:00
sstone
08d1692932 Add compact2der() method 2020-07-02 21:39:33 +02:00
Fabrice Drouin
3ee2635d93
Upgrade JNI interface (#1)
* Upgrade JNI interface

* Input signatures can be DER or compact format, output signatures are always in compact format

* Input public keys can be compressed or uncompressed, output public keys are always uncompressed

* Name and parameters match libsecp256k1's

* JNI implementation is now straightforward

  No more ByteBuffers
  Exceptions are thrown in case of failures

* Update src/nativeMain/kotlin/fr/acinq/secp256k1/Secp256k1Native.kt

* Add public key compression method

Co-authored-by: Salomon BRYS <salomon.brys@gmail.com>
2020-07-02 17:52:21 +02:00
Salomon BRYS
17dd83e476 Tests in their own module so that they can run on Android with the connectedCheck task 2020-07-02 12:19:29 +02:00