pyca / pyca/ed25519

Review for timing attacks

Open
#11 2 comments 0 reactions 0 assignees View on GitHub

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

  • scalarmult takes time in e, and in publickey() e is a function of sk, not sure if this is a concern (it's a function of the magnitude of e, which may not correlate with an individual value)
  • In encodepoint (as called from publickey()), y >> i is probably not timing independent, it's time is a function of the magnitude of y.
  • In publickey and signature 2 ** i * bit(h, i) takes time in the magnitude of the bit from h (h is computed from the sha256 of sk, 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.