Zero-Knowledge Proof of SHA256 Hash using zkSNARK
This article provides you sufficient commands to run zkSNARK algorithm with circom circuits on a Ubuntu Docker image to prove SHA256 hash.
2 min readApr 30, 2024
If you are just testing for educational purposes, I recommend to use Docker for cleaner setup. However, if you wish to run the zkSNARK program on your machine, you can start from Install Prerequisites section.
Setup Ubuntu Instance on Docker
docker run -it ubuntu:jammy
apt update
apt install curl
apt install nano
Install Prerequisites
apt install build-essential
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
(proceed with standard installation). "$HOME/.cargo/env"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
nvm install 20
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
apt install git-all
git clone https://github.com/iden3/circom.git