Commit Graph

19 Commits

Author SHA1 Message Date
Gruruya a2cfa22b20 Remove non-`rng` signSchnorr variant from tests 2023-04-04 16:37:43 -04:00
Gruruya f9c4f33d4d Correct `noncefp` to be a pointer in `extraparams` object 2023-04-04 04:05:40 -04:00
Gruruya 3c80efbeee Allow passing a `Rng`/`FoolproofRng` to `signSchnorr` for improved security 2023-04-04 03:08:15 -04:00
Gruruya c193667f53 Add low-level test for `secp256k1_keypair` 2023-04-04 00:48:06 -04:00
Gruruya acb11b2031 Remove extra test 2023-04-04 00:12:55 -04:00
Gruruya e75a1e2c82 Rework patch. Implement Schnorr signing and undo breaking changes. 2023-04-03 23:42:03 -04:00
Gruruya 7a36c249f8 Re-order 2023-04-03 22:43:37 -04:00
Gruruya 858d6ca3d6 Make SkKeyPair a wrapper around secp256k1_keypair 2023-04-03 18:25:51 -04:00
Gruruya 2d529dc845 Add tests for Schnorr signing 2023-03-30 22:02:07 -04:00
Jacek Sieka eb5868e069
bump upstream, fix cuchar warnings (#39) 2022-11-24 16:20:13 +02:00
Miran e625f47423
move -d:nimRawSetjmp to nim.cfg (#37)
Refs https://github.com/status-im/nimbus-build-system/issues/44
2022-07-25 21:57:38 +03:00
zah 5340cf1881
Restructure the project to allow nimble check to pass (#36)
* Restructure the project to allow nimble check to pass

* Add a lock file
2022-06-20 14:31:15 +03:00
Jacek Sieka bf6cc94a3c
use external rng instead of nimcrypto (#23)
* use external rng instead of nimcrypto

allows passing in different RNG's to generate keys

* pass in array of random data to random keygen function

* back to a proc

* docs

* gcsafe rng callback needed

* introduce foolproofrng that can't fail

* silence compiler warning

* hint at random not being good enough in defect
2020-07-06 15:07:29 +02:00
Jacek Sieka 5701a60143
use requiredInit (#22)
* use requiredInit

Use requiredInit on keys - this simplifies error handling by providing
more compile-time guarantees through type.

Loophole: `clear` will leave an invalid key type in memory, not
guaranteed by type - it requires an explicit action to produce, so it's
somewhat better than the current situation where by default, keys are
invalid, but it's not watertight.

something like a `sink` would be needed which would have to guarantee
that `clear` is the last use of the instance.

* close requiresinit loophole

* remove clear for public stuff

* fix side effects

`secp256k1_context_no_precomp` is constant actually

* document nosideeffect

* document nosideeffect

* document fix
2020-06-22 16:08:21 +02:00
Jacek Sieka 306289244c
add convenience api (#21)
fixes #19
2020-04-17 07:43:30 +02:00
mratsim 89618eeff2 Finalize arch specific defines + tests 2018-03-28 12:56:26 +02:00
cheatfate 10d50515c8 Added test for secp256k1_ecdh() 2018-03-16 11:28:15 +02:00
Yuriy Glukhov 8cd954b0d4 Added test config 2018-03-12 13:51:33 +02:00
Yuriy Glukhov 8b4545f269 Added a test 2018-03-12 13:51:33 +02:00