dapinkone / TCSS487Project

0 stars 0 forks source link

Part 2: Elliptic curve arithmetic #6

Closed dapinkone closed 9 months ago

dapinkone commented 10 months ago

Implementing Ed448-Goldilocks with BigInteger.

Building a library & app for asymmetric encryption and digital signatures at the 256-bit security level.

Note, all arithmetic is modulo p. p is a specific prime defined in the Ed448-Goldilocks spec.

p := 2^448 - 2^224 - 1

services:

Hyunggilwoo commented 10 months ago

Question on implementing the y_0 of the GoldilockPair's public generator: How do we compute y_0? Given that:

  1. public generator (G) = (x_0, y_0)
  2. x = plus_or_minus sqrt( (1 - y^2) / (1 + 39081y^2) mod p)
  3. x_0 = -3 (mod p)

Do we have compute y from the equation to compute x?

Hyunggilwoo commented 10 months ago

KMACXOF256. Does Part 1 need to incorporate BigInteger instead of int?

Hyunggilwoo commented 10 months ago

I am debating on if we need to create a separate class to generate a Schnorr signature, or can whether Elliptic Curve class should have the Schnorr signature method, or maybe the KMACXOF256 should have access to it. Right now, I am leaning towards creating a separate class to generate a key pair of Schnorr Signature

dapinkone commented 10 months ago

KMACXOF256. Does Part 1 need to incorporate BigInteger instead of int?

Posting here for reference, verdict was "mostly no"; extending a few select functions for utility moving forward, but the project requirements do not require this functionality in part 1's section.

I am debating on if we need to create a separate class to generate a Schnorr signature, or can whether Elliptic Curve class should have the Schnorr signature method, or maybe the KMACXOF256 should have access to it. Right now, I am leaning towards creating a separate class to generate a key pair of Schnorr Signature

Java / OOP style is pretty heavy on classes. It's probably fine to make a class for this. It's a thing, with associated properties and functionality. sounds like a class to me. We'll see how much it has in common with other classes as the project matures.

Question on implementing the y_0 of the GoldilockPair's public generator: How do we compute y_0? Given that:

1. public generator (G) = (x_0, y_0)

2. x = plus_or_minus sqrt( (1 - y^2) / (1 + 39081y^2) mod p)

3. x_0 = -3 (mod p)

Do we have compute y from the equation to compute x?

See implementation of ElipticCurve.f or the instantiation of G just above. These may answer the question

dapinkone commented 9 months ago

Project completed as far as needed, closing ticket.