Table of Contents
Fetching ...

Automated Quantum Circuit Generation for Computing Inverse Hash Functions

Elena R. Henderson, Jessie M. Henderson, William V. Oxford, Mitchell A. Thornton

TL;DR

The paper introduces a procedure to automatically generate reversible quantum circuits that invert cryptographic hash functions, implemented within the MustangQ toolkit. It formalizes the hash-inversion pipeline: (1) prepare the hash function in a reversible-ready representation (primarily .pla format for small examples), (2) synthesize a reversible circuit via ESOP minimization using EXORCISM-4, and (3) obtain the inverse by reversing the gate order. Demonstrations on small, conceptually representative hashes show feasible synthesis times and reduced gate counts when ESOP minimization is applied, with exhaustive validation confirming correct inversion for the tested cases. The work discusses scalability challenges and future directions, including applying fixed-size hashes in PQC contexts and adopting larger-function representations (Verilog netlists, BDDs) to extend the approach toward cryptographic-scale hashes, while outlining potential blockchain-related applications and quantum-related speedups in inverse hashing.

Abstract

Several cryptographic systems depend upon the computational difficulty of reversing cryptographic hash functions. Robust hash functions transform inputs to outputs in such a way that the inputs cannot be later retrieved in a reasonable amount of time even if the outputs and the function that created them are known. Consequently, hash functions can be cryptographically secure, and they are employed in encryption, authentication, and other security methods. It has been suggested that such cryptographically-secure hash functions will play a critical role in the era of post-quantum cryptography (PQC), as they do in conventional systems. In this work, we introduce a procedure that leverages the principle of reversibility to generate circuits that invert hash functions. We provide a proof-of-concept implementation and describe methods that allow for scaling the hash function inversion approach. Specifically, we implement one manifestation of the algorithm as part of a more general automated quantum circuit synthesis, compilation, and optimization toolkit. We illustrate production of reversible circuits for crypto-hash functions that inherently provide the inverse of the function, and we describe data structures that increase the scalability of the hash function inversion approach.

Automated Quantum Circuit Generation for Computing Inverse Hash Functions

TL;DR

The paper introduces a procedure to automatically generate reversible quantum circuits that invert cryptographic hash functions, implemented within the MustangQ toolkit. It formalizes the hash-inversion pipeline: (1) prepare the hash function in a reversible-ready representation (primarily .pla format for small examples), (2) synthesize a reversible circuit via ESOP minimization using EXORCISM-4, and (3) obtain the inverse by reversing the gate order. Demonstrations on small, conceptually representative hashes show feasible synthesis times and reduced gate counts when ESOP minimization is applied, with exhaustive validation confirming correct inversion for the tested cases. The work discusses scalability challenges and future directions, including applying fixed-size hashes in PQC contexts and adopting larger-function representations (Verilog netlists, BDDs) to extend the approach toward cryptographic-scale hashes, while outlining potential blockchain-related applications and quantum-related speedups in inverse hashing.

Abstract

Several cryptographic systems depend upon the computational difficulty of reversing cryptographic hash functions. Robust hash functions transform inputs to outputs in such a way that the inputs cannot be later retrieved in a reasonable amount of time even if the outputs and the function that created them are known. Consequently, hash functions can be cryptographically secure, and they are employed in encryption, authentication, and other security methods. It has been suggested that such cryptographically-secure hash functions will play a critical role in the era of post-quantum cryptography (PQC), as they do in conventional systems. In this work, we introduce a procedure that leverages the principle of reversibility to generate circuits that invert hash functions. We provide a proof-of-concept implementation and describe methods that allow for scaling the hash function inversion approach. Specifically, we implement one manifestation of the algorithm as part of a more general automated quantum circuit synthesis, compilation, and optimization toolkit. We illustrate production of reversible circuits for crypto-hash functions that inherently provide the inverse of the function, and we describe data structures that increase the scalability of the hash function inversion approach.
Paper Structure (13 sections, 9 figures, 1 table)

This paper contains 13 sections, 9 figures, 1 table.

Figures (9)

  • Figure 1: Truth table and circuit representation for an irreversible AND operation.
  • Figure 2: Truth table and circuit representation for a reversible Toffoli operation. The Toffoli operation is a controlled operation, in which a NOT is applied to $r$ if and only if both $p$ and $q$ are one. $p$ and $q$ are called the controls, and $r$ is termed the target of the operation. The values of controls do not change (meaning $s=p$ and $t=q$), but both values are included as outputs such that the operation is reversible.
  • Figure 3: Truth table and circuit representation for a reversible NOT operation. The first representation is common in classical circuits, while the second and third are used in quantum circuits.
  • Figure 4: Truth table and circuit representation for a reversible Controlled-NOT operation.
  • Figure 5: Truth table and circuit representation for a generalized Toffoli with three controls: $p$, $q$, and $r$ are controls for target $s$; $t$, $u$, and $v$ maintain the values of $p$, $q$, and $r$; and $w = \sim s$ when $p$, $q$, and $r$ are all one.
  • ...and 4 more figures