package octez-libs
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=55ea1fb8bb3273a7fc270ca8f650d45c56449665619482aad9bc12f3ea736b7e
    
    
  sha512=fec850fc2d17d7490bbabd5147d62aad13b3aaed8774270f8a38ab419670ed03e0fd30cf8642a97984eca5c2446726fe590ad99c015f7ec50919dc7652f25053
    
    
  doc/octez-libs.plompiler/Plompiler/Gadget/Edwards25519/argument-1-L/Encodings/index.html
Module L.Encodings
type ('oh, 'u, 'p) encoding = {- encode : 'u -> 'p repr;
- decode : 'p repr -> 'u;
- input : 'oh -> 'p Input.input;
- of_input : 'p Input.input -> 'oh;
}Encoding type for encapsulating encoding/decoding/input functions. This type enables us to use more structured types for data in circuits. For that, encoding is parameterized by 3 types:
- 'oh is the type of the high-level OCaml representation
- 'u is the unpacked type, i.e. a collection of atomic reprs.
- `p is the packed type, i.e the inner type of Plompiler's repr.
For example, for the representation of a point (pair of scalars), one might have:
( {x:int; y:int},
  scalar repr * scalar repr,
  scalar * scalar
) encodingThe first type, the record {x:int; y:int}, represents an OCaml point, which becomes the argument taken by the input function.
The second type, scalar repr * scalar repr, is an unpacking of the encoding. This is used for the result of decode. We can use any type isomorphic to scalar repr * scalar repr here.
The last type must be scalar * scalar, as an encoding of a point will be of the type (scalar * scalar) repr.
The function conv defines conversions for encodings, by changing the higher-level 'u and and 'oh types.
val atomic_obj6_encoding : 
  ('a, 'b repr, 'c) encoding ->
  ('d, 'e repr, 'f) encoding ->
  ('g, 'h repr, 'i) encoding ->
  ('j, 'k repr, 'l) encoding ->
  ('m, 'n repr, 'o) encoding ->
  ('p, 'q repr, 'r) encoding ->
  ('a * ('d * ('g * ('j * ('m * 'p)))),
    ('b * ('e * ('h * ('k * ('n * 'q))))) repr,
    'c * ('f * ('i * ('l * ('o * 'r)))))
    encodingval obj7_encoding : 
  ('a, 'b, 'c) encoding ->
  ('d, 'e, 'f) encoding ->
  ('g, 'h, 'i) encoding ->
  ('j, 'k, 'l) encoding ->
  ('m, 'n, 'o) encoding ->
  ('p, 'q, 'r) encoding ->
  ('s, 't, 'u) encoding ->
  ('a * ('d * ('g * ('j * ('m * ('p * 's))))),
    'b * ('e * ('h * ('k * ('n * ('q * 't))))),
    'c * ('f * ('i * ('l * ('o * ('r * 'u))))))
    encodingval atomic_obj7_encoding : 
  ('a, 'b repr, 'c) encoding ->
  ('d, 'e repr, 'f) encoding ->
  ('g, 'h repr, 'i) encoding ->
  ('j, 'k repr, 'l) encoding ->
  ('m, 'n repr, 'o) encoding ->
  ('p, 'q repr, 'r) encoding ->
  ('s, 't repr, 'u) encoding ->
  ('a * ('d * ('g * ('j * ('m * ('p * 's))))),
    ('b * ('e * ('h * ('k * ('n * ('q * 't)))))) repr,
    'c * ('f * ('i * ('l * ('o * ('r * 'u))))))
    encodingval obj8_encoding : 
  ('a, 'b, 'c) encoding ->
  ('d, 'e, 'f) encoding ->
  ('g, 'h, 'i) encoding ->
  ('j, 'k, 'l) encoding ->
  ('m, 'n, 'o) encoding ->
  ('p, 'q, 'r) encoding ->
  ('s, 't, 'u) encoding ->
  ('v, 'w, 'x) encoding ->
  ('a * ('d * ('g * ('j * ('m * ('p * ('s * 'v)))))),
    'b * ('e * ('h * ('k * ('n * ('q * ('t * 'w)))))),
    'c * ('f * ('i * ('l * ('o * ('r * ('u * 'x)))))))
    encodingval atomic_obj8_encoding : 
  ('a, 'b repr, 'c) encoding ->
  ('d, 'e repr, 'f) encoding ->
  ('g, 'h repr, 'i) encoding ->
  ('j, 'k repr, 'l) encoding ->
  ('m, 'n repr, 'o) encoding ->
  ('p, 'q repr, 'r) encoding ->
  ('s, 't repr, 'u) encoding ->
  ('v, 'w repr, 'x) encoding ->
  ('a * ('d * ('g * ('j * ('m * ('p * ('s * 'v)))))),
    ('b * ('e * ('h * ('k * ('n * ('q * ('t * 'w))))))) repr,
    'c * ('f * ('i * ('l * ('o * ('r * ('u * 'x)))))))
    encodingval obj9_encoding : 
  ('a, 'b, 'c) encoding ->
  ('d, 'e, 'f) encoding ->
  ('g, 'h, 'i) encoding ->
  ('j, 'k, 'l) encoding ->
  ('m, 'n, 'o) encoding ->
  ('p, 'q, 'r) encoding ->
  ('s, 't, 'u) encoding ->
  ('v, 'w, 'x) encoding ->
  ('y, 'z, 'a1) encoding ->
  ('a * ('d * ('g * ('j * ('m * ('p * ('s * ('v * 'y))))))),
    'b * ('e * ('h * ('k * ('n * ('q * ('t * ('w * 'z))))))),
    'c * ('f * ('i * ('l * ('o * ('r * ('u * ('x * 'a1))))))))
    encodingval atomic_obj9_encoding : 
  ('a, 'b repr, 'c) encoding ->
  ('d, 'e repr, 'f) encoding ->
  ('g, 'h repr, 'i) encoding ->
  ('j, 'k repr, 'l) encoding ->
  ('m, 'n repr, 'o) encoding ->
  ('p, 'q repr, 'r) encoding ->
  ('s, 't repr, 'u) encoding ->
  ('v, 'w repr, 'x) encoding ->
  ('y, 'z repr, 'a1) encoding ->
  ('a * ('d * ('g * ('j * ('m * ('p * ('s * ('v * 'y))))))),
    ('b * ('e * ('h * ('k * ('n * ('q * ('t * ('w * 'z)))))))) repr,
    'c * ('f * ('i * ('l * ('o * ('r * ('u * ('x * 'a1))))))))
    encodingval obj10_encoding : 
  ('a, 'b, 'c) encoding ->
  ('d, 'e, 'f) encoding ->
  ('g, 'h, 'i) encoding ->
  ('j, 'k, 'l) encoding ->
  ('m, 'n, 'o) encoding ->
  ('p, 'q, 'r) encoding ->
  ('s, 't, 'u) encoding ->
  ('v, 'w, 'x) encoding ->
  ('y, 'z, 'a1) encoding ->
  ('b1, 'c1, 'd1) encoding ->
  ('a * ('d * ('g * ('j * ('m * ('p * ('s * ('v * ('y * 'b1)))))))),
    'b * ('e * ('h * ('k * ('n * ('q * ('t * ('w * ('z * 'c1)))))))),
    'c * ('f * ('i * ('l * ('o * ('r * ('u * ('x * ('a1 * 'd1)))))))))
    encodingval atomic_obj10_encoding : 
  ('a, 'b repr, 'c) encoding ->
  ('d, 'e repr, 'f) encoding ->
  ('g, 'h repr, 'i) encoding ->
  ('j, 'k repr, 'l) encoding ->
  ('m, 'n repr, 'o) encoding ->
  ('p, 'q repr, 'r) encoding ->
  ('s, 't repr, 'u) encoding ->
  ('v, 'w repr, 'x) encoding ->
  ('y, 'z repr, 'a1) encoding ->
  ('b1, 'c1 repr, 'd1) encoding ->
  ('a * ('d * ('g * ('j * ('m * ('p * ('s * ('v * ('y * 'b1)))))))),
    ('b * ('e * ('h * ('k * ('n * ('q * ('t * ('w * ('z * 'c1))))))))) repr,
    'c * ('f * ('i * ('l * ('o * ('r * ('u * ('x * ('a1 * 'd1)))))))))
    encoding