Documentation

CslibFrontier.Crypto.Computational.DiscreteLog.CyclicGroupFamily

Cyclic group families of arbitrary order #

A CyclicGroupFamily is a family of finite cyclic groups whose orders need not be prime, with the encodings and polynomial-time operations of a PrimeOrderGroupFamily. It differs from PrimeOrderGroupFamily in two fields: order_ne_zero replaces prime_order, and smul_generator_injective, the injectivity of α ↦ α • g on ZMod q, replaces generator_ne_zero. With card_carrier the injectivity says that g generates its group of order q. PrimeOrderGroupFamily.toCyclicGroupFamily maps every prime-order family to a cyclic one, with the injectivity from PrimeOrderGroupFamily.smul_generator_injective.

Families of composite order are the setting of [BS23], Exercise 10.24 (p. 431), which drops the restriction that the order is prime from the DDH attack game.

Main definitions #

Main results #

Implementation notes #

PrimeOrderGroupFamily does not extend CyclicGroupFamily: the two structures repeat their common fields, and toCyclicGroupFamily copies them. The DDH vocabulary over this structure, and its agreement with the prime-order one under toCyclicGroupFamily, are in CslibFrontier/Crypto/Computational/DiffieHellman/CyclicGroupFamily.lean.

References #

A family of finite cyclic groups of nonzero order, indexed by public group parameters, with polynomial-time operations on encoded elements. It is PrimeOrderGroupFamily with order_ne_zero in place of prime_order and smul_generator_injective in place of generator_ne_zero, so the order need not be prime.

A prime-order family as a cyclic group family: a prime is nonzero, and PrimeOrderGroupFamily.smul_generator_injective supplies the injectivity. The other fields are copied.

@[instance_reducible]

Equality of group elements, decided on their injective encodings.

The encoded generator of computed group parameters.

The encoded identity of computed group parameters, computed as 0 • g.

The encoded multiple of a computed element by a computed natural number.