I don't know the difference inverse() and % in python. For example inverse(a, q), a%q, the result is same, isn't it? (Inverse() is a function belonging to Crypto.Util.number.)
I'd appreciate it if you could tell me the difference.
I don't know the difference inverse() and % in python. For example inverse(a, q), a%q, the result is same, isn't it? (Inverse() is a function belonging to Crypto.Util.number.)
I'd appreciate it if you could tell me the difference.
No, it's clearly not the same.
You can check the source of
inverse(python 2 code):If you check the equivalent function in the source of the more recent replacement library
pycrytodomethere is a clear explanation that this is computing the polynomial greatest common divisor: