MystenLabs / MystenLabs/fastcrypto
Use the same method that we generate private keys in BLS
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 311
- Forks
- 173
- Avg merge
- 22h 47m
- Merged PRs (30d)
- 21
Description
we could use the same method that we generate private keys in BLS where some 32 bytes entropy bytes are an input, in our case the whole digest. However @asonnino it's very common for rogue key protection to use half scalars, because we care about pre-image attacks; you try to cancel-out another pub key, so combinatorics are already very expensive.
We do use half scalars in many apps (ie in the EdDSA half aggregation) for performance reasons to make that exponentiation half-expensive. In fact though, here we don't care, as this applies once at private key randomization (and with our mode where new-priv_key = old_priv_key \times this_scalar, we don't even have an ECC operation).
@asonnino: You remember the discussion we had at overleaf, shall we update the private key or for each signature we multiply by this scalar? if we do the former half or full scalar doesn't really matter. In the second you have to pay that cost every time you sign.
Originally posted by @kchalkias in https://github.com/MystenLabs/fastcrypto/pull/236#discussion_r1027302408
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The payload names no source file or test; start by reading PR #236's discussion and locating the BLS private-key generation and rogue-key-protection entry points. Resolve whether scalar derivation is applied when updating the private key or per signature, and whether full or half scalars are required; done when the chosen behavior is implemented and covered by relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cryptography
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100