1
0
Fork 0
This commit is contained in:
Mike 2024-01-29 12:29:22 +02:00
parent 62800f595c
commit 4e4ca41326

View file

@ -4,30 +4,23 @@
(in "sign.input" (in "sign.input"
(until (eof) (until (eof)
(msg 'line) (msg 'line)
(setq L (hexL (till ":"))) (setq L (hexL (till ":")))
~(assert (== 64 (length L))) ~(assert (== 64 (length L)))
(setq SK (head 32 L)) (setq SK (head 32 L))
(setq PK (publickey SK)) (setq PK (publickey SK))
~(assert (= PK (tail 32 L))) ~(assert (= PK (tail 32 L)))
(from ":") (from ":")
(from ":") (from ":")
(setq M (hexL (till ":"))) (setq M (hexL (till ":")))
(println 'M M)
(setq S (signature M SK PK)) (setq S (signature M SK PK))
(println 'S S)
(from ":") (from ":")
(setq Text (head 64 (hexL (till ":")))) (setq Text (head 64 (hexL (till ":"))))
~(assert (= Text S)) ~(assert (= Text S))
(println 'Text Text)
(line)
)
)
)
(line) ) ) )
(msg 'ok) (msg 'ok)
(bye) (bye)