Author

Topic: del (Read 152 times)

legendary
Activity: 3472
Merit: 4801
del
November 11, 2021, 08:57:39 AM
#7
Quote
However, if we look at (k * 7) % 11 = 2 there are an infinite number of solutions for k
There is only one answer for modulo inverse in range between 1 and n-1.

The algebra question posted does NOT ask for an answer in range between 1 and n-1.
copper member
Activity: 821
Merit: 1992
November 10, 2021, 05:47:45 PM
#6
Quote
so any way how to take it back before multiply by 64?
Of course. All you need is modulo inverse of 64. If you use modulo fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141, then you can first multiply by 0000000000000000000000000000000000000000000000000000000000000040 and then multiply by fbfffffffffffffffffffffffffffffebfc42173148b7dbad0d315129cf5683c to go back. By multiplying these two numbers alone you will get one, in this way you can check if you calculated modulo inverse properly.

Quote
You keep trying for n-1 amount of times until you've found such x which returns true.
If you have a huge n, like fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141, it will be too slow to see any result.

Quote
However, if we look at (k * 7) % 11 = 2 there are an infinite number of solutions for k
There is only one answer for modulo inverse in range between 1 and n-1. If you take any other answer, you will get the same result after taking modulo n.

Quote
You may found a solution to the problem, but the problem wasn't formulated properly. How could we answer it, if you hadn't clear up what you want? You constantly create new threads, where you ask questions in which you usually answer by yourself.
That's true, these kind of topics are high-context and a lot of guessing is needed to know what is the problem.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
November 10, 2021, 09:54:48 AM
#5
You may found a solution to the problem, but the problem wasn't formulated properly. How could we answer it, if you hadn't clear up what you want? You constantly create new threads, where you ask questions in which you usually answer by yourself.

Someone who may have a similar query can't figure out what's the solution, because you didn't make a proper description. That's all I'm saying and I've said it before.

The problem is that they never describe what they want to do properly. If you search their OPs and replies, you'll notice that there's a communication issue. You may understand what they want from the title, but if you don't, there's nothing that is going to help you do.
legendary
Activity: 3472
Merit: 4801
November 10, 2021, 09:37:35 AM
#4
Is there a fast way to solve a modular equation? As far as I know, it's solvable with brute force.

For instance, for the equation (x + Cool ≡ 3 (mod 4), it's:

For x=1: (1 + Cool ≡ 3 (mod 4) => 9 ≡ 3 mod (4) which is false. (Remainder: 1)
For x=2: (2 + Cool ≡ 3 (mod 4) => 10 ≡ 3 mod (4) which is false. (Remainder: 2)
For x=3: (3 + Cool ≡ 3 (mod 4) => 11 ≡ 3 mod (4) which is true.

You keep trying for n-1 amount of times until you've found such x which returns true. But, I need someone to refute me as I'm not good at math.

The problem with the OP question is that there are an infinite number of answers.

Lets look at an example using smaller numbers to better understand...

instead of multiplying by 64, let's multiply by 7
Instead of using the order of secp256k1 for the divisor, let's use 11.

Now if we choose 5 for the starting number, we get:
(5 * 7) % 11 = 2

However, if we look at (k * 7) % 11 = 2 there are an infinite number of solutions for k

k=5
k=16
k=27
k=38
k=49
k=60
k=71
etc.

This was presented as:
"little algebra" and if we are going to answer it as a question about algebra, then there are an infinite number of answers to the question.

What we end up with in my example is the equation: 7x = 11y +2
And the OP is asking how to solve for x.
There is a different answer for x for every one of the infinite possible values of y.
Since the OP said "as integer" I'm assuming he's looking for all the integer values of y that result in an integer value of x.
So:
y = 3, x = 5 (which is where I got the k=5 above)
y = 10, x = 16 (which is where I got the k=16 above)
y = 17, x = 27 (which is where I got the k=27 above)
y = 24, x = 38 (which is where I got the k=38 above)

The OP keeps on asking silly questions like these instead of explaining what he's actually trying to do or why the answer to his question matters.  In most every case, the question he asks is not the question he actually wants the answer to.




legendary
Activity: 1512
Merit: 7340
Farewell, Leo
November 10, 2021, 09:13:59 AM
#3
Is there a fast way to solve a modular equation? As far as I know, it's solvable with brute force.

For instance, for the equation (x + 8) ≡ 3 (mod 4), it's:

For x=1: (1 + 8) ≡ 3 (mod 4) => 9 ≡ 3 mod (4) which is false. (Remainder: 1)
For x=2: (2 + 8) ≡ 3 (mod 4) => 10 ≡ 3 mod (4) which is false. (Remainder: 2)
For x=3: (3 + 8) ≡ 3 (mod 4) => 11 ≡ 3 mod (4) which is true.

You keep trying for n-1 amount of times until you've found such x which returns true. But, I need someone to refute me as I'm not good at math.
newbie
Activity: 5
Merit: 3
November 10, 2021, 09:11:37 AM
#2
so


K ( nonce) is  

nonce = 231584178474632390847141970017375815706539969331281128078915168015826294532480 as integer not as point!

after multiply by 64 mod n   (n = order of curve secp256k1)

nonce = nonce * 64 % n
we have result : 864840773131319313704841732789971543806  


so any way how to take it back before multiply by 64?

Well, I don't know what you are trying to reach but (nonce * 64)%range != 864840773131319313704841732789971543806.
You did the following instead:
range = fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141
nonce = 2000000000000000000000000000000000000000000000000000000000219e980

nonce%range = 28aa24632a16ebf88805b42e661ad66fe (864840773131319313704841732789971543806)

 Smiley

newbie
Activity: 12
Merit: 33
November 10, 2021, 08:19:12 AM
#1
del
Jump to: