The group oracle of a generic cyclic group #
In the generic group model of [BS23], Section 16.3 (p. 693), a cyclic group of order
q is reached only through an oracle. The oracle holds an injective labeling function
L : ZMod q → S and answers two kinds of query. A labeling query β gets L β. A group operation
(ℓ₁, ℓ₂, κ₁, κ₂) gets L (κ₁ * β₁ + κ₂ * β₂) when ℓ₁ = L β₁ and ℓ₂ = L β₂, and is rejected
when ℓ₁ or ℓ₂ is not a label. The label L β stands for the group element g^β, so a group
operation computes (g^β₁)^κ₁ · (g^β₂)^κ₂.
Groups are written additively, as in CslibFrontier.Crypto.Computational.DiffieHellman.Finite:
the book's g^β is β • g in a ZMod q-module.
The book takes S to be a set of bit strings with |S| ≥ q and lets the oracle choose L at
random. Here S is any type and L is a parameter; a game that draws L does so itself, and the
results about answer assume of L only what they use. The book's reject is none. The names
GroupQuery, GroupOracleSpec, answer, groupAnswer and GroupQuery.IsProduct are this
library's.
Main definitions #
Cslib.Crypto.GenericGroup.GroupQuery,Cslib.Crypto.GenericGroup.GroupOracleSpec: the labeling queries and group operations, and their reply types.Cslib.Crypto.GenericGroup.answer: the group oracle determined by a labelingL.Cslib.Crypto.GenericGroup.groupAnswer: the group oracle of aZMod q-module with base pointg, whose labels are the group elements.Cslib.Crypto.GenericGroup.GroupQuery.IsProduct: the group operations that multiply two labelled elements. WithOracleComp.QueriesSatisfyandOracleComp.IsQueryBoundedit counts multiplications in the group, as the book's count for baby-step/giant-step does (CslibFrontier.Crypto.Computational.GenericGroup.BabyStepGiantStep).
Main results #
Cslib.Crypto.GenericGroup.answer_op_label: the accepting clause of the group operation for an injective labeling.Cslib.Crypto.GenericGroup.groupAnswer_eq_answer: when every element of the group is a multiple ofg, as in a cyclic group of orderqgenerated byg, the group's oracle is the oracle of the labelingβ ↦ β • g.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Section 16.3, p. 693, paragraph "Generic groups".
A query to the group oracle of a generic cyclic group of order q with labels in S
([BS23], Section 16.3, p. 693).
- label {q : ℕ} {S : Type} (β : ZMod q) : GroupQuery q S
Labeling query: ask for the label of
β. - op {q : ℕ} {S : Type} (ℓ₁ ℓ₂ : S) (κ₁ κ₂ : ZMod q) : GroupQuery q S
Group operation: ask for the label of
κ₁ * β₁ + κ₂ * β₂, whereℓᵢis the label ofβᵢ.
The reply types of the group oracle: a label for a labeling query, and a label or none (the
book's reject) for a group operation.
The group oracle determined by the labeling L. A labeling query β gets L β. A group
operation (ℓ₁, ℓ₂, κ₁, κ₂) gets L (κ₁ * β₁ + κ₂ * β₂) for preimages L β₁ = ℓ₁ and
L β₂ = ℓ₂, which are unique when L is injective, and none when ℓ₁ or ℓ₂ is not a label.
For injective L this is the oracle of [BS23], Section 16.3 (p. 693).
The group oracle of a ZMod q-module G with base point g, whose labels are the elements
of G. A labeling query β gets β • g, the book's g^β, and a group operation
(ℓ₁, ℓ₂, κ₁, κ₂) gets κ₁ • ℓ₁ + κ₂ • ℓ₂; it never rejects.
The query is a group operation with κ₁ = κ₂ = 1: it asks for the product of two labelled
elements, one multiplication in the group.
A labeling query gets the label.
A group operation gets the label of κ₁ * β₁ + κ₂ * β₂ for preimages L β₁ = ℓ₁ and
L β₂ = ℓ₂, and none when there is none.
The accepting clause of the group operation ([BS23], Section 16.3, p. 693): for an
injective labeling L, a group operation on the labels of β₁ and β₂ gets the label of
κ₁ * β₁ + κ₂ * β₂.
When every element of G is a multiple of g, as in a cyclic group of order q generated by
g ([BS23], Section 16.1.1), the oracle of G is the generic group oracle of the
labeling β ↦ β • g. The labeling need not be injective.