Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Litterature reference - secp256k1 InverseCharacteristic (= Point.InverseOrder) #9

Open
Sajjon opened this issue Jun 30, 2018 · 3 comments

Comments

@Sajjon
Copy link
Contributor

Sajjon commented Jun 30, 2018

Where can I find a literature reference to the values:

    InverseN: (
        high: UInt256(1),
        low: UInt256([0, 1, 0x4551231950b75fc4, 0x402da1732fc9bec0])
    )

Thanks!

@hyugit
Copy link
Owner

hyugit commented Jul 1, 2018

Hi Sajjon,

First off, thank you for your support in my project. This issue is the one I can answer right now.

This is just the inverse of N presented in 512 bit integer.

It is used in Barrett's Fast Division algo in the UInt256 library: here

Huang

@Sajjon
Copy link
Contributor Author

Sajjon commented Jul 16, 2018

@hyugit Sorry for my noob question, but by "inverse of N" are you referring to the modular multiplicative inverse?

@hyugit
Copy link
Owner

hyugit commented Jul 16, 2018

@Sajjon sorry, my bad. actually.. this is (2^512)/N, a precomputed "approximation" to the inverse of the divisor, according to my source (2.4.1 Barrett's Algorithm). And this is indeed being used by UInt256 library's Barrett's Algorithm: here

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

No branches or pull requests

2 participants