dalek-cryptography / ed25519-dalek

Fast and efficient ed25519 signing and verification in Rust.
BSD 3-Clause "New" or "Revised" License
684 stars 227 forks source link

Rename `ExpandedSecretKey::nonce` => `prefix` #301

Closed tarcieri closed 1 year ago

tarcieri commented 1 year ago

The name "nonce" doesn't really capture the role of this value, which unfortunately seems to resist a pithy name across all of the specs including RFC8032, which refers to it as h_b, ..., h_(2b-1). A nonce is used once whereas this value is used repeatedly for every message signed.

Its usage is a prefix concatenated onto the message to be hashed and used to compute r, so given that, this commit renames it to prefix.

burdges commented 1 year ago

It's clearly not a nonce. I've called it nonce_seed but yeah prefix.. lol

rozbb commented 1 year ago

Is this instead of #299? I've renamed it hash_prefix there.

Sorry haven't gotten to anything this week. Been very busy

tarcieri commented 1 year ago

Oh whoops, so you did