Class IterativeAES128PublicInput

Hierarchy

  • { cipher: Byte16 }
    • IterativeAES128PublicInput

Constructors

Properties

cipher: Byte16 = Byte16
_isStruct: true
check: (value: { cipher: Byte16 }) => void

Add assertions to the proof to check if value is a valid member of type T. This function does not return anything, instead it creates any number of assertions to prove that value is a valid member of the type T.

For instance, calling check function on the type Bool asserts that the value of the element is either 1 or 0.

Type declaration

    • (value: { cipher: Byte16 }): void
    • Parameters

      • value: { cipher: Byte16 }

        the element of type T to put assertions on.

      Returns void

empty: () => { cipher: Byte16 }
fromFields: (fields: Field[]) => { cipher: Byte16 }
fromJSON: (x: { cipher: { value: string[][] } }) => { cipher: Byte16 }
fromValue: (
    x: { cipher: Byte16 } | { cipher: { value: bigint[][] } },
) => { cipher: Byte16 } & (
    value: { cipher: Byte16 | { value: Field[][] | bigint[][] } },
) => { cipher: Byte16 }

Convert provable type from a normal JS type.

toAuxiliary: (value?: { cipher: Byte16 }) => any[]

A function that takes value (optional), an element of type T, as argument and returns an array of any type that make up the "auxiliary" (non-provable) data of value.

Type declaration

    • (value?: { cipher: Byte16 }): any[]
    • Parameters

      • Optionalvalue: { cipher: Byte16 }

        the element of type T to generate the auxiliary data array from, optional. If not provided, a default value for auxiliary data is returned.

      Returns any[]

      An array of any type describing how this T element is made up of "auxiliary" (non-provable) data.

toCanonical?: (x: { cipher: Byte16 }) => { cipher: Byte16 }

Optional method which transforms a provable type into its canonical representation.

This is needed for types that have multiple representations of the same underlying value, and might even not have perfect completeness for some of those representations.

An example is the ForeignField class, which allows non-native field elements to exist in unreduced form. The unreduced form is not perfectly complete, for example, addition of two unreduced field elements can cause a prover error.

Specific protocols need to be able to protect themselves against incomplete operations at all costs. For example, when using actions and reducer, the reducer must be able to produce a proof regardless of the input action. toCanonical() converts any input into a safe form and enables us to handle cases like this generically.

Note: For most types, this method is the identity function. The identity function will also be used when the toCanonical() is not present on a type.

toFields: (value: { cipher: Byte16 }) => Field[]

A function that takes value, an element of type T, as argument and returns an array of Field elements that make up the provable data of value.

Type declaration

    • (value: { cipher: Byte16 }): Field[]
    • Parameters

      • value: { cipher: Byte16 }

        the element of type T to generate the Field array from.

      Returns Field[]

      A Field array describing how this T element is made up of Field elements.

toInput: (
    x: { cipher: Byte16 },
) => { fields?: Field[]; packed?: [Field, number][] }
toJSON: (x: { cipher: Byte16 }) => { cipher: { value: string[][] } }
toValue: (x: { cipher: Byte16 }) => { cipher: { value: bigint[][] } }

Convert provable type to a normal JS type.

Methods

  • Return the size of the T type in terms of Field type, as Field is the primitive type.

    Returns number

    A number representing the size of the T type in terms of Field type.