Documentation

CslibFrontier.Crypto.Computational.DiscreteLog.Decodable

Decodable prime-order group families #

A DecodablePrimeOrderGroupFamily extends PrimeOrderGroupFamily with a canonical decoder decode : ∀ d, List Bool → Option (Carrier d) whose domain indicator (decode d w).isSome is computable in polynomial time (computableInPolyTime_isElem) and which inverts encode d on both sides (decode_encode and encode_eq_of_decode_eq_some).

Because encode d is injective and decode d accepts only canonical encodings, the Boolean membership test isElem (d, w) := (decode d w).isSome characterizes Set.range (encode d), and the encoded partial inverse (decode d w).map (encode d) equals if isElem (d, w) then some w else none, so it is also computable in polynomial time (computableInPolyTime_decode_map_encode).

Main definitions #

Main results #

A prime-order group family equipped with a canonical decoder whose domain membership test is computable in polynomial time.

Boolean group-element membership test on (d, w): true iff F.decode d w succeeds.

A word decodes to x if and only if it equals F.encode d x.

F.isElem (d, w) = true if and only if w is in Set.range (F.encode d).

F.isElem (d, w) = false if and only if w ∉ Set.range (F.encode d).

F.decode d w = none if and only if w ∉ Set.range (F.encode d).

Obtaining the decoded element whenever F.isElem (d, w) = true.

On words, decoding followed by re-encoding equals gating w on F.isElem (d, w).

Decoding a word with fallback z and re-encoding equals returning w when F.isElem (d, w) holds and F.encode d z otherwise.

Group-element membership testing for computed group descriptions and candidate words is computable in polynomial time.