1
0
Fork 0
This commit is contained in:
Mike 2024-01-29 15:14:14 +02:00
parent bf7c4797f1
commit df0f0b939e
3 changed files with 9 additions and 8 deletions

View file

@ -3,17 +3,18 @@ hi all,
Lets create test vectors for ed25519 like [RFC7748 page 12](https://datatracker.ietf.org/doc/html/rfc7748#page-13).
One, thousand and million iteration results from [python](https://ed25519.cr.yp.to/software.html) reference implementation below:
One, thousand and million iterations results:
```
Initialy set all zeroes.
ED25519:
After one iteration:
91ad473ae89dd1e7c2983ec2d0445fef4dd124e377a4b673b249267ed80b604fa7d7d2b08b54990390a8760c616bc15607aa3ab9c3bfc97f7dd59e1734b8ed04
c8205e3a479772433237010c6e86b460a8540ed745f2665bb92c1a4848e147a5d2bd27a068dd77640eb1d8e84abee204e256b0db89ea668e5ed50c41097bef0d
After 1,000 iterations:
7fb3af0e37c398b161ed8b7c29b680f88db9690e55b73ee62afaa46388f91be605c46db11d1644cb8d00451b0d6dcb436b09772adc07eea77b183d118debf605
1d1ccb255fa1b743e89afbbe5b44382cb499638b224ee1558798bedc6d4ee11435c201d3a59c7e80e925b902f9008b071dfb5ea618cda521c4393fe6d0cbd101
After 1,000,000 iterations:
2ef6fc422258e62068085142b53e41036bf653c8724335a584b5e1d1b69da0c8d012a5af7bd7c8767a282e23447f30326e148ad65b3e7b6875465333e7e5560a
fadfecda372cac8783cdab0bfd0471cf0bea522839b509948a7245310cb4a5c48b3f271ec11579729900d755a604d258e72ecaa9f10b815fa4d61b8ffc7a3b02
```
Happy coding!

View file

@ -3,7 +3,7 @@
(lowc
(pack
(mapcar '((B) (pad 2 (hex B))) Lst) ) ) )
(let (SK (range 0 63) Pair)
(let (SK (need 64 0) Pair)
(do 1000000
(setq Pair (crypto_ed25519_key_pair (head 32 SK)))
(setq SK (crypto_ed25519_sign (car Pair) SK)) )

View file

@ -28,8 +28,8 @@
(native "libsodium.so" "sodium_init") )
(soda_start)
(let (SK (range 0 63) Pair)
(do 1000
(let (SK (need 64 0) Pair)
(do 1000000
(setq Pair (soda_seed_keypair (head 32 SK)))
(setq SK (soda_detached SK (cadr Pair))) )
(println (L2hex SK)) )