1
0
Fork 0
monocypher-ed25519-1M/test-ed25519.l
2024-02-02 12:43:21 +02:00

21 lines
527 B
Common Lisp

(load "ed25519.l")
(use (Keys SK PK M S Sig)
(in "sign.input"
(until (eof)
(msg 'line)
(setq Keys (hexL (till ":")))
(setq SK (head 32 Keys))
(setq PK (publickey SK))
(test PK (tail 32 Keys))
(do 2
(from ":") )
(setq M (hexL (till ":")))
(setq S (signature M SK PK))
(from ":")
(setq Sig (head 64 (hexL (till ":"))))
(test Sig S)
(test T (checkvalid S M PK))
(line) ) ) )
(msg 'ok)
(bye)