split the key in two inputs

This commit is contained in:
thomaslavaur 2025-08-07 08:38:51 +02:00
parent 1d4e20bfed
commit fe0f02808b
2 changed files with 11 additions and 6 deletions

View File

@ -284,7 +284,8 @@ for i in range(32):
index = randrange(0, Ql if core_or_leader else Qc,1)
# 4) Onetime 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),

View File

@ -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);