Review for timing attacks
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 42
- Forks
- 22
- Avg merge
- 3m
- Merged PRs (30d)
- 1
Description
My understanding is that we're concerned that any function over the secret-key (or something derived from it), must take time independent of the input value. Here are possible issues I see
-
scalarmulttakes time ine, and inpublickey()eis a function ofsk, not sure if this is a concern (it's a function of the magnitude ofe, which may not correlate with an individual value) - In
encodepoint(as called frompublickey()),y >> iis probably not timing independent, it's time is a function of the magnitude ofy. - In
publickeyandsignature2 ** i * bit(h, i)takes time in the magnitude of the bit fromh(his computed from thesha256ofsk, so perhaps it can't be reversed?)
Those are what I have for now, more review is definitely needed.
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
Review the implementations of scalarmult, publickey, signature, and encodepoint, focusing on the timing concerns listed in the issue and their use of bit, shifts, and secret-derived values. Determine whether each checklist item is timing-independent and document or resolve the findings; the issue provides no named tests or entry-point file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cryptography, security
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100