mirror of
https://github.com/logos-blockchain/logos-blockchain-pocs.git
synced 2026-01-07 15:43:07 +00:00
split the key in two inputs
This commit is contained in:
parent
1d4e20bfed
commit
fe0f02808b
@ -284,7 +284,8 @@ for i in range(32):
|
||||
index = randrange(0, Ql if core_or_leader else Qc,1)
|
||||
|
||||
# 4) One‐time key
|
||||
K = F(randrange(0,p,1))
|
||||
K_one = F(randrange(0,p,1))
|
||||
K_two = F(randrange(0,p,1))
|
||||
|
||||
# 5) Assemble JSON
|
||||
inp = {
|
||||
@ -293,7 +294,8 @@ inp = {
|
||||
"Ql": str(Ql),
|
||||
"pk_root": str(core_root),
|
||||
"aged_root": str(aged_root),
|
||||
"K": str(K),
|
||||
"K_part_one": str(K_one),
|
||||
"K_part_two": str(K_two),
|
||||
"selector": str(core_or_leader),
|
||||
"index": str(index),
|
||||
"core_sk": str(core_sk),
|
||||
|
||||
@ -21,10 +21,13 @@ template ProofOfQuota(nLevelsPK, nLevelsPol, bitsQuota) {
|
||||
signal input Ql; // leadership quota Q_L
|
||||
signal input pk_root; // Merkle root of registered core-node public keys
|
||||
signal input aged_root; // PoL: aged notes root
|
||||
signal input K; // Blend: one-time signature public key
|
||||
signal input K_part_one; // Blend: one-time signature public key
|
||||
signal input K_part_two; // Blend: one-time signature public key
|
||||
|
||||
signal dummy;
|
||||
dummy <== K * K;
|
||||
signal dummy_one;
|
||||
dummy_one <== K_part_one * K_part_one;
|
||||
signal dummy_two;
|
||||
dummy_two <== K_part_two * K_part_two;
|
||||
|
||||
signal output nullifier; //key_nullifier
|
||||
|
||||
@ -129,5 +132,5 @@ template ProofOfQuota(nLevelsPK, nLevelsPol, bitsQuota) {
|
||||
}
|
||||
|
||||
// Instantiate with chosen depths: 20 for core PK tree, 25 for PoL slot tree
|
||||
component main { public [ session, Qc, Ql, pk_root, aged_root, K ] }
|
||||
component main { public [ session, Qc, Ql, pk_root, aged_root, K_part_one, K_part_two ] }
|
||||
= ProofOfQuota(20, 25, 20);
|
||||
Loading…
x
Reference in New Issue
Block a user