1
0
Fork 0
This commit is contained in:
Mike 2024-02-02 12:43:21 +02:00
parent 03a5baee0c
commit a71b58df89

View file

@ -1,26 +1,21 @@
(load "ed25519.l")
(use (L SK PK S)
(use (Keys SK PK M S Sig)
(in "sign.input"
(until (eof)
(msg 'line)
(setq L (hexL (till ":")))
~(assert (== 64 (length L)))
(setq SK (head 32 L))
(setq Keys (hexL (till ":")))
(setq SK (head 32 Keys))
(setq PK (publickey SK))
~(assert (= PK (tail 32 L)))
(from ":")
(from ":")
(test PK (tail 32 Keys))
(do 2
(from ":") )
(setq M (hexL (till ":")))
(setq S (signature M SK PK))
(from ":")
(setq Text (head 64 (hexL (till ":"))))
~(assert (= Text S))
(setq Sig (head 64 (hexL (till ":"))))
(test Sig S)
(test T (checkvalid S M PK))
(line) ) ) )
(msg 'ok)
(bye)