Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-Reproducible Test Vectors due to Fresh aux_rand #86

Open
siv2r opened this issue Mar 19, 2025 · 0 comments
Open

Non-Reproducible Test Vectors due to Fresh aux_rand #86

siv2r opened this issue Mar 19, 2025 · 0 comments

Comments

@siv2r
Copy link
Contributor

siv2r commented Mar 19, 2025

I'm implementing test vectors for ChillDKG. To ensure reproducibility, I use fixed values for random and hostseckey inputs, so every run of the test vector generation script yields the same vectors.

However, two internal functions, certeq_participant_step and pop_prove, currently call schnorr_sign using a freshly generated random 32-byte value for the aux_rand parameter. This fresh randomness prevents the consistent reproduction of test vectors.

def certeq_participant_step(hostseckey: bytes, idx: int, x: bytes) -> bytes:
msg = certeq_message(x, idx)
return schnorr_sign(msg, hostseckey, aux_rand=random_bytes(32))

def pop_prove(seckey: bytes, idx: int) -> Pop:
sig = schnorr_sign(
pop_msg(idx), seckey, aux_rand=random_bytes(32), tag_prefix=POP_MSG_TAG
)

Specifically:

  • participant_step1 produces varying outputs (pmsg1) between runs because the Pop component generated by pop_prove differs each time, even with fixed inputs.
  • Similarly, participant_step2 outputs vary because of the randomness introduced by certeq_participant_step.

These output variations propagate, affecting other participant and coordinator APIs relying on participant_step1 and participant_step2.

Is it a good idea to replace the fresh randomness with derived values (via a tagged hash) to achieve reproducibility?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant