Commit Graph

9 Commits

Author SHA1 Message Date
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