1
0
Fork 0
monocypher-ed25519-1M/test-ed25519.l
2024-01-29 12:29:22 +02:00

27 lines
530 B
Common Lisp

(load "ed25519.l")
(use (L SK PK S)
(in "sign.input"
(until (eof)
(msg 'line)
(setq L (hexL (till ":")))
~(assert (== 64 (length L)))
(setq SK (head 32 L))
(setq PK (publickey SK))
~(assert (= PK (tail 32 L)))
(from ":")
(from ":")
(setq M (hexL (till ":")))
(setq S (signature M SK PK))
(from ":")
(setq Text (head 64 (hexL (till ":"))))
~(assert (= Text S))
(line) ) ) )
(msg 'ok)
(bye)