Coder Social home page Coder Social logo

Comments (2)

smh69 avatar smh69 commented on July 21, 2024

I'll give it a shot jachiang, mostly to help clear my own mind, let me know if this makes sense.

b^-1 is just 1/b being multiplied to both sides of the equation b^(p-1) = 1,
effectively giving us (b^(p-1))/b = 1/b, which is exactly what we want... except we still cannot divide.

But since we can multiply, and pow(), we're just going to multiply b by itself one less time. If b^(p-1) gives us 1, then b^(p-2) will give u 1/b, our multiplicative inverse, which we can use without dividing.

certainly for large primes, we'll never have a negative exponent to deal with, no real division.

Im totally lost on what to say about field of prime=2 {0,1}, we'd get 0^0 = 1 and 1^0 = 1. same goes for prime=3 {0,1,2} as x^1=x, however even in these cases, an element multiplied by it's inverse gets us 1 mod the prime, maybe thats good enough to define division??? x(

from programmingbitcoin.

jimmysong avatar jimmysong commented on July 21, 2024

We're defining b^-1 more than anything else. Division doesn't have meaning until you say it's the inverse of multiplication. To figure out the value analytically, you end up having to use Fermat's Little Theorem and get the b^(p-2)

from programmingbitcoin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.