There is much common logic between DSA and ECDSA. This code attempts to unify what is in common.
We deliver a commutative group G as ‘(op zero neg eq n)’ where
‘(pubf sec)’ yields (pub . sign). ‘pub’ is the public key and an element of the subgroup. ‘(sign hsh)’ yields a signature which is an element of the subgroup, and ‘sec’ is a positive integer which is the private signing key. ‘hsh’ is a secure hash of the signed document.
‘(verf pubk sig hsh)’ yields a bool which says whether ‘sig’ is a signature by public key ‘pubk’ of a document whose hash is ‘hsh’.
‘(signf sec)’ yields the signing function and ‘((signf sec) hsh)’ yields the signature of the document whose hash is ‘hsh’.
I plan to follow this. good stuff, official.
The goal is to pass this test
(let* ((t ((fileVal "Sign") CG one Ln hl)) (pubf (car t)) (signf (cadr t)) (verf (caddr t)) (sec (((((fileVal "RC4") "polystein") 'rbi) hl))) (p (pubf sec)) (pub (car p)) (sign (cdr p))) (verf pub (sign hsh) hsh))to yield true for any values of CG, one, Ln, hsh, …
me | Wp |
hsh | e |
G | ? |
one | G |