Skip to content

Instantly share code, notes, and snippets.

VIMz: Testing different array hashing strategies in Circom circuits

Motivation

In VIMz circuits, which implement various supported image transformations, array hashing serves as a fundamental primitive. During transformations applied row-by-row or region-by-region (e.g., in convolution-based editions), a running hash of both the original and transformed images is computed. This enables efficient operations, such as verification of proofs, directly on image commitments rather than the full images themselves.

However, hashing the entire image represents a significant portion of the circuit's size and computational overhead. This makes array hashing a considerable piece in terms of performance. Consequently, optimizing the hashing mechanism might be beneficial to improve overall circuit efficiency and scalability.

Hashing strategies

ZK Hack V: Shadow write-up

In this document, we delve into how a security gap emerged from the misuse of certain container types within a high-level Zero-Knowledge Domain-Specific Language (ZK DSL) called Noir. This write-up walks through the vulnerability, demonstrating how it can be exploited.

Interestingly, the attack requires no knowledge of ZK proofs or cryptography. The fragility of the code lies entirely in its software design, making the lesson broadly applicable beyond ZK systems.

A short story about JWT.pk

The puzzle description introduces us to a crypto company called JWT.pk. Let's go through it step by step to gain a full understanding of how it works.

ZK Hack V: Zeitgeist write-up

In this document, we explore an approach to uncovering prover's secrets by analyzing the content of their proofs. This method leverages scenarios where the proof system fails or just doesn't bother to conceal information — specifically, when the proofs are not zero-knowledge.

Note: This article is not a formal technical paper. Instead, it aims to present complex and advanced concepts in a (hopefully) accessible way. While some simplifications will be made for clarity, I will strive to point out when the actual details are more intricate than described.

Shortcuts for Advanced Readers: Each section includes a quick TL;DR summary for those already familiar with the basics. Feel free to skip ahead if the summary indicates nothing new or significant for you.

Basics of (ZK-)Proving