### A Crypto Tool Kit

Here are some modules that can be assembled in different ways. For instance I plan a ‘type’ of object that defines an Abelian group generated by a single generator suitable for both DSA and ECDSA. Two such groups of the same size, n, are isomorphic to the cyclic group of n elements. The representation of group elements is where the crypto magic is. We specialize in representations where the isomorphism is difficult to compute.

### The Group

The immutable values provided by a group object are:
• the group identity,
• the binary group operator,
• the unary group inverse,
• some group generator,
• 0?— a predicate for being the identity
A ‘group creator’ returns a 5 element list of these values. You can name them as you please. There arises immediately the problem of whether the generator generates the whole group. There is no generator for the rationals under addition. For some finite fields it is difficult to find a generator. In effect the group is what ever the generator generates.

The only general random element generator I see here is (generator)N for integer N chosen randomly from some interval [–K, K], for some K.

GT
((fileVal "crypto/GT") GL s n) causes classic group axioms to be tested n times with group elements generated randomly where s is a string that provides entropy. GL is the yield of some group creator.
MI
((fileVal "crypto/MI") k) creates the group of integers mod k.
PR
((fileVal "crypto/PR") n) returns some primitive root of n, an odd prime.

Some finite groups have no generator. The vier-groupe is G(2)2 and has none.

The multiplicative group in GF(p), without 0, has a generator.