Skip to content
This repository was archived by the owner on Jun 12, 2024. It is now read-only.
This repository was archived by the owner on Jun 12, 2024. It is now read-only.

Crypto: ED_25519 base x order = infinity? #340

@adon-at-work

Description

@adon-at-work

The following code snippet is copied from https://github.com/google/end-to-end/blob/master/src/javascript/crypto/e2e/ecc/point/curve25519_test.html#L67-L76:

function testCurve25519Order() {
  var params = e2e.ecc.DomainParam.fromCurve(
      e2e.ecc.PrimeCurve.CURVE_25519);
  var base = params.g;
  var order = params.n;
  assertTrue(base.multiply(order).isInfinity());
  assertFalse(base.multiply(order.subtract(e2e.BigNum.ONE)).isInfinity());
}

In short, when I switch to use the e2e.ecc.PrimeCurve.ED_25519 instead of the e2e.ecc.PrimeCurve.CURVE_25519 above, the test case failed.

Expect base.multiply(order).isInfinity() should evaluate to true for both curves.
Any clues? Thanks.

c.c. @andres-erbsen @daniel-ziegler @diracdeltas

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions