The digital signature algorithms

Very imcomplete!

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

We rely on: G is a finite Abelian group.
‘((fileVal "Sign") CG one Ln hl)’ yields (pubf signf verf). CG is a big commutative group and ‘one’ generates a big subgroup, (usually CG). Ln is the smallest integer such that there are more than 2Ln elements in G. hl is the number of bits in a value from the the range of the Hash function.

‘(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, …
meWp
hshe
G?
oneG