0

Given a d value = -(10240/10241)

How would I convert this into 64 bit limbs?

I have to expand on this because of stackoverflow quality algorithm, I've tried using python to get the integer rep/hex rep, but it's not a whole number, so I'm a bit lost

WeCanBeFriends
  • 1,303
  • 11
  • 20

1 Answers1

1

Assuming that this is related to the Jubjub Edwards curve, for which d = -(10240/10241) (mod r = 52435875175126190479447740508185965837690552500527637822603658699938581184513) = 19257038036680949359750312669786877991949435402254120286184196891950884077233, the four 64-bit limbs (in little-endian order) are:

(73851820219580081, 2967167836563676454, 17725484271033745364, 3067823152860638024)

The "process" is pretty simple:

  • 73851820219580081 = d mod 2^64
  • 2967167836563676454 = (d / 2^64) mod 2^64
  • 17725484271033745364 = (d / 2^128) mod 2^64
  • 3067823152860638024 = (d / 2^192) mod 2^64
Frank Denis
  • 2,964
  • 15
  • 17