This commit is contained in:
2023-04-10 19:05:10 +01:00
parent 8c5b6dbac9
commit 1647615595
8 changed files with 154 additions and 34 deletions

View File

@ -5,6 +5,7 @@ import { Packet } from "./packet.js";
import { Game } from "./game.js";
import { Region } from "./map.js";
import "./dom.js";
import "./proofs.js";
export const ID = window.crypto.randomUUID();
export const game = new Game();

View File

@ -0,0 +1,17 @@
function cryptoShuffle(l) {
for (let i = 0; i < l.length - 1; i++) {}
}
window.cryptoShuffle = cryptoShuffle;
function proveRegions(regions) {
// Construct prover coins
let regionNames = Object.keys(regions.keys());
let psi = [regionNames];
// Construct verifier coins
let hasher = new jsSHA("SHA3-256", "TEXT");
hasher.update(JSON.stringify(regions));
// Construct prover proofs
}