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

34 lines
618 B
Text
Raw Normal View History

2024-01-29 11:28:19 +01:00
(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 ":")))
(println 'M M)
(setq S (signature M SK PK))
(println 'S S)
(from ":")
(setq Text (head 64 (hexL (till ":"))))
~(assert (= Text S))
(println 'Text Text)
(line)
)
)
)
(msg 'ok)
(bye)