,....
This commit is contained in:
@ -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();
|
||||
|
17
static/js/modules/interface/proofs.js
Normal file
17
static/js/modules/interface/proofs.js
Normal 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
|
||||
}
|
Reference in New Issue
Block a user