Skip to content
This repository has been archived by the owner on Nov 16, 2021. It is now read-only.

ed25519: scalarmult fix so dst can be src #171

Merged
merged 1 commit into from
Aug 21, 2018

Conversation

ph4r05
Copy link
Contributor

@ph4r05 ph4r05 commented Aug 18, 2018

ge25519_scalarmult minor changes:

  • Result r can be equal to the input p1 (same point pointer).
  • Returns fully valid extended Edwards point (not partial as before).
    • Makes further operations easier because many operations expect full point (with valid T coordinate), not the partial.
    • ge25519_scalarmult_base_niels already returns full point so it would make it more consistent
    • Scalar multiplications perform large number of curve25519_mul, typically (64*const), one more before returning from the function is IMO small overhead.
    • if ge25519_scalarmult returns partial point one cannot easily make it full point because after ge25519_scalarmult returns, the temporary point is not not accessible. To make it full point much more expensive inversion would be needed.

- operation result parameter can be the same as operation input parameter
- operation returns full extended Edwards point
@ph4r05
Copy link
Contributor Author

ph4r05 commented Aug 20, 2018

Similar to
#172

@onvej-sl
Copy link
Contributor

ACK

@prusnak prusnak merged commit f1eca08 into trezor:master Aug 21, 2018
@prusnak
Copy link
Member

prusnak commented Aug 21, 2018

Thx!

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

Successfully merging this pull request may close these issues.

3 participants