Skip to content

Conversation

@greuet
Copy link

@greuet greuet commented May 20, 2022

Hi,

I tried to define a TwistedEdwardCurve by hand, e.g.

from ecpy.curves import TwistedEdwardCurve

p_25519 = 2**255 - 19
a_25519 = -1
d_25519 = 0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3
Gx_25519 = 0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a
Gy_25519 = 0x6666666666666666666666666666666666666666666666666666666666666658
q_25519 = 2**252 + 27742317777372353535851937790883648493

cv = TwistedEdwardCurve ({'name': 'myTECurve',
                          'size': 256,
                          'a': a_25519,
                          'd': d_25519,
                          'field': p_25519,
                          'generator': [Gx_25519, Gy_25519],
                          'order': q_25519})

but I got an error because the 'type' key was expected as a domain parameter.

Then I set 'type' inside the class initialization for WeierstrassCurve, TwistedEdwardCurve and MontgomeryCurve, so that as described in the documentation, it is not needed anymore as a parameter.

  'type' not needed as domain parameter anymore for WeierstrassCurve,
   TwistedEdwardCurve and MontgomeryCurve, as described in documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant