Skip to content

Instantly share code, notes, and snippets.

@emptycrown
emptycrown / Mastermind.circom
Last active June 3, 2022 22:20
Completed circuit for a ZK Mastermind implementation: https://jessezhang.org/mastermind
pragma circom 2.0.3;
include "../node_modules/circomlib/circuits/poseidon.circom";
include "../node_modules/circomlib/circuits/comparators.circom";
template Mastermind () {
var n = 4;
signal input guess[n];
signal input answer[n];
signal input ansHash;
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name _;
root /usr/share/nginx/html;
ssl_certificate "/etc/letsencrypt/live/camelot.ai/fullchain.pem"; //REPLACE THE DOMAIN NAME WITH YOURS
ssl_certificate_key "/etc/letsencrypt/live/camelot.ai/privkey.pem"; //REPLACE THE DOMAIN NAME WITH YOURS
# It is *strongly* recommended to generate unique DH parameters
# Generate them with: openssl dhparam -out /etc/pki/nginx/dhparams.pem 2048
map $http_upgrade $connection_upgrade {
default "upgrade";
"" "";
}
server {
listen 80;
gzip on;
gzip_comp_level 4;