Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grondilu/elliptic-curves-raku
Elliptic curves cryptography in raku
https://github.com/grondilu/elliptic-curves-raku
cryptography eddsa secp256k1
Last synced: about 2 hours ago
JSON representation
Elliptic curves cryptography in raku
- Host: GitHub
- URL: https://github.com/grondilu/elliptic-curves-raku
- Owner: grondilu
- License: mit
- Created: 2022-04-06T05:00:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-03T10:24:24.000Z (almost 2 years ago)
- Last Synced: 2023-03-11T15:52:39.470Z (over 1 year ago)
- Topics: cryptography, eddsa, secp256k1
- Language: Raku
- Homepage:
- Size: 48.8 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![SparrowCI](https://ci.sparrowhub.io/project/gh-grondilu-elliptic-curves-raku/badge)](https://ci.sparrowhub.io)
# Elliptic Curves Cryptography in raku
secp256k1 and ed25519 in [raku](http://raku.org)
## Synopsis
```raku
{
use secp256k1;say G;
say $_*G for 1..10;use Test;
is 35*G + 5*G, 40*G;
}{
use ed25519;# create a key
# - randomly :
my ed25519::Key $key .= new;
# - from a seed :
my blob8 $secret-seed .= new: ^256 .roll: 32;
my ed25519::Key $key .= new: $secret-seed;# use key to sign a message
my $signature = $key.sign: "Hello world!";# verify signature
use Test;
lives-ok { ed25519::verify "foo", $key.sign("foo"), $key.point };
dies-ok { ed25519::verify "foo", $key.sign("bar"), $key.point };
}
```
References
----------* [RFC 8032](http://www.rfc-editor.org/info/rfc8032)
* Jacobian coordinates:
- [WikiBooks entry](https://en.wikibooks.org/wiki/Cryptography/Prime_Curve/Jacobian_Coordinates)
- [hyperelliptic.org page](http://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html)
* Chalkias, Konstantinos, et. al. ["Taming the many EdDSAs."](https://eprint.iacr.org/2020/1244.pdf) *Security Standardisation Research Conference*, Dec. 2020