Aes128Ctr: { analyzeMethods: () => Promise< { base: { digest: string; gates: Gate[]; publicInputSize: number; rows: number; print(): void; summary(): Partial<Record<GateType | "Total rows", number>>; }; inductive: { digest: string; gates: Gate[]; publicInputSize: number; rows: number; print(): void; summary(): Partial<Record<GateType | "Total rows", number>>; }; }, >; auxiliaryOutputTypes: { base: undefined; inductive: undefined }; compile: ( options?: { cache?: Cache; forceRecompile?: boolean; proofsEnabled?: boolean; }, ) => Promise<{ verificationKey: { data: string; hash: Field } }>; digest: () => Promise<string>; name: string; privateInputTypes: { base: [typeof Byte16, typeof Byte16]; inductive: [ { prototype: SelfProof<any, any>; publicInputType: FlexibleProvable<any>; publicOutputType: FlexibleProvable<any>; tag: () => { name: string }; get provable(): ProvableProof<Proof<any, any>>; _proofFromBase64( proofString: string, maxProofsVerified: 0 | 1 | 2, ): unknown; _proofToBase64(proof: unknown, maxProofsVerified: 0 | 1 | 2): string; dummy<Input, OutPut>( publicInput: Input, publicOutput: OutPut, maxProofsVerified: 0 | 1 | 2, domainLog2?: number, ): Promise<Proof<Input, OutPut>>; fromJSON<S extends Subclass<typeof Proof>>( this: S, __namedParameters: JsonProof, ): Promise< Proof< InferProvable<S["publicInputType"]>, InferProvable<S["publicOutputType"]>, >, >; publicFields(value: ProofBase): { input: Field[]; output: Field[] }; new ( __namedParameters: { maxProofsVerified: 0 | 1 | 2; proof: unknown; publicInput: AES128CTRPublicInput; publicOutput: AES128CTRPublicOutput; }, ): SelfProof<AES128CTRPublicInput, AES128CTRPublicOutput>; }, typeof Byte16, typeof Byte16, ]; }; proofsEnabled: boolean; publicInputType: typeof AES128CTRPublicInput; publicOutputType: typeof AES128CTRPublicOutput; rawMethods: { base: ( publicInput: AES128CTRPublicInput, ...args: TupleToInstances<[typeof Byte16, typeof Byte16]>, ) => Promise<{ publicOutput: AES128CTRPublicOutput }>; inductive: ( publicInput: AES128CTRPublicInput, ...args: TupleToInstances< [ { prototype: SelfProof<any, any>; publicInputType: FlexibleProvable<any>; publicOutputType: FlexibleProvable<any>; tag: () => { name: string }; get provable(): ProvableProof<Proof<any, any>>; _proofFromBase64( proofString: string, maxProofsVerified: 0 | 1 | 2, ): unknown; _proofToBase64(proof: unknown, maxProofsVerified: 0 | 1 | 2): string; dummy<Input, OutPut>( publicInput: Input, publicOutput: OutPut, maxProofsVerified: 0 | 1 | 2, domainLog2?: number, ): Promise<Proof<Input, OutPut>>; fromJSON<S extends Subclass<typeof Proof>>( this: S, __namedParameters: JsonProof, ): Promise< Proof<InferProvable<(...)
[(...)
]>, InferProvable<(...)
[(...)
]>>, >; publicFields(value: ProofBase): { input: Field[]; output: Field[] }; new ( __namedParameters: { maxProofsVerified: 0 | 1 | 2; proof: unknown; publicInput: AES128CTRPublicInput; publicOutput: AES128CTRPublicOutput; }, ): SelfProof<AES128CTRPublicInput, AES128CTRPublicOutput>; }, typeof Byte16, typeof Byte16, ], >, ) => Promise<{ publicOutput: AES128CTRPublicOutput }>; }; verify: ( proof: Proof<AES128CTRPublicInput, AES128CTRPublicOutput>, ) => Promise<boolean>; setProofsEnabled(proofsEnabled: boolean): void;} & { base: ( publicInput: AES128CTRPublicInput, ...args: TupleToInstances<[typeof Byte16, typeof Byte16]>, ) => Promise< { auxiliaryOutput: undefined; proof: Proof<AES128CTRPublicInput, AES128CTRPublicOutput>; }, >; inductive: ( publicInput: AES128CTRPublicInput, ...args: TupleToInstances< [ { prototype: SelfProof<any, any>; publicInputType: FlexibleProvable<any>; publicOutputType: FlexibleProvable<any>; tag: () => { name: string }; get provable(): ProvableProof<Proof<any, any>>; _proofFromBase64( proofString: string, maxProofsVerified: 0 | 1 | 2, ): unknown; _proofToBase64(proof: unknown, maxProofsVerified: 0 | 1 | 2): string; dummy<Input, OutPut>( publicInput: Input, publicOutput: OutPut, maxProofsVerified: 0 | 1 | 2, domainLog2?: number, ): Promise<Proof<Input, OutPut>>; fromJSON<S extends Subclass<typeof Proof>>( this: S, __namedParameters: JsonProof, ): Promise< Proof< InferProvable<S["publicInputType"]>, InferProvable<S["publicOutputType"]>, >, >; publicFields(value: ProofBase): { input: Field[]; output: Field[] }; new ( __namedParameters: { maxProofsVerified: 0 | 1 | 2; proof: unknown; publicInput: AES128CTRPublicInput; publicOutput: AES128CTRPublicOutput; }, ): SelfProof<AES128CTRPublicInput, AES128CTRPublicOutput>; }, typeof Byte16, typeof Byte16, ], >, ) => Promise< { auxiliaryOutput: undefined; proof: Proof<AES128CTRPublicInput, AES128CTRPublicOutput>; }, >;} = ...
ZK program for verifying AES-128 CTR mode encryption using recursive proofs.
It supports both a base case (for a single block) and an inductive step (for multiple blocks). In addition to verifying the encryption, each proof computes and returns the Poseidon hash of the key. In the inductive case, the key hash is compared with the previous proof's hash to enforce consistency.