fix one time key input of pol

This commit is contained in:
thomaslavaur 2025-08-04 14:07:01 +02:00
parent 876d7d6d8e
commit 1a4658b51b
3 changed files with 9 additions and 5 deletions

View File

@ -278,7 +278,8 @@ with open("input.json", "w") as file:
file.write('\n\t"t0" :\t\t\t\t\t\t"'+str(t0)+'",')
file.write('\n\t"t1" :\t\t\t\t\t\t"'+str(t1)+'",')
file.write('\n\t"slot_secret" :\t\t\t\t\t\t"'+str(slot_secret)+'",')
file.write('\n\t"one_time_key" :\t\t\t\t\t\t"'+str(F(516548))+'",')
file.write('\n\t"one_time_key_part_one" :\t\t\t\t\t\t"'+str(F(123456))+'",')
file.write('\n\t"one_time_key_part_two" :\t\t\t\t\t\t"'+str(F(654321))+'",')
file.write('\n\t"slot_secret_path" :\t\t\t\t\t[')
for i in range(25):
file.write('"')

View File

@ -223,11 +223,14 @@ template proof_of_leadership(secret_depth){
// One time signing key used to sign the block proposal and the block
signal input one_time_key;
signal input one_time_key_part_one;
signal input one_time_key_part_two;
//Avoid the circom optimisation that removes unused public input
signal dummy;
dummy <== one_time_key * one_time_key;
signal dummy_one;
signal dummy_two;
dummy_one <== one_time_key_part_one * one_time_key_part_one;
dummy_two <== one_time_key_part_two * one_time_key_part_two;
signal output entropy_contrib;

View File

@ -23,4 +23,4 @@ template zkSignature(maxInput){
dummy <== attached_data * attached_data;
}
component main {public [attached_data]}= zkSignature(5);
component main {public [attached_data]}= zkSignature(32);