1
0
Fork 0
monocypher-ed25519-1M/test-ed25519.l

22 lines
527 B
Text
Raw Normal View History

2024-01-29 11:28:19 +01:00
(load "ed25519.l")
2024-02-02 11:43:21 +01:00
(use (Keys SK PK M S Sig)
2024-01-29 11:28:19 +01:00
(in "sign.input"
(until (eof)
(msg 'line)
2024-02-02 11:43:21 +01:00
(setq Keys (hexL (till ":")))
(setq SK (head 32 Keys))
2024-01-29 11:28:19 +01:00
(setq PK (publickey SK))
2024-02-02 11:43:21 +01:00
(test PK (tail 32 Keys))
(do 2
(from ":") )
2024-01-29 11:28:19 +01:00
(setq M (hexL (till ":")))
(setq S (signature M SK PK))
(from ":")
2024-02-02 11:43:21 +01:00
(setq Sig (head 64 (hexL (till ":"))))
(test Sig S)
(test T (checkvalid S M PK))
2024-01-29 11:29:22 +01:00
(line) ) ) )
2024-01-29 11:28:19 +01:00
(msg 'ok)
(bye)