Bitcoin Forum
May 14, 2024, 12:50:53 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: why it works? it should'nt  (Read 158 times)
ecdsa123 (OP)
Full Member
***
Offline Offline

Activity: 211
Merit: 105

Dr WHO on disney+


View Profile
September 06, 2022, 03:46:53 PM
 #1

why it works? it should'nt

d=(s*k - z) / r

Code:
d = 17297868438860976900  
k = 2706155104
r = 114792231439225299071653076175597454642404629309811484913662796330298864240204
s = 5053942539770103579701350824871298641333011651975462818690909436892446986439
z = 48081857163558325212574375116762847358614850483118137681250849966396433292551



see r of k*G isn't 114792231439225299071653076175597454642404629309811484913662796330298864240204

Donate: bc1q0sezldfgm7rf2r78p5scasrrcfkpzxnrfcvdc6

Subscribe : http://www.youtube.com/@Ecdsa_Solutions
Even in the event that an attacker gains more than 50% of the network's computational power, only transactions sent by the attacker could be reversed or double-spent. The network would not be destroyed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715647853
Hero Member
*
Offline Offline

Posts: 1715647853

View Profile Personal Message (Offline)

Ignore
1715647853
Reply with quote  #2

1715647853
Report to moderator
1715647853
Hero Member
*
Offline Offline

Posts: 1715647853

View Profile Personal Message (Offline)

Ignore
1715647853
Reply with quote  #2

1715647853
Report to moderator
akaki
Newbie
*
Offline Offline

Activity: 22
Merit: 35


View Profile
September 06, 2022, 05:43:16 PM
 #2

r is wrong.

ECDSA multiplication using k*Gpoint gives :

R=(42804120235550333264601566912095829673031312040987116166863779393812842042729, 68663269101170998966556989191669958292218975994528865773618353809041762691493)

thus r=Rx=42804120235550333264601566912095829673031312040987116166863779393812842042729
ecdsa123 (OP)
Full Member
***
Offline Offline

Activity: 211
Merit: 105

Dr WHO on disney+


View Profile
September 06, 2022, 05:55:39 PM
Merited by vapourminer (2)
 #3

Code:
I know that r is wrong.

Question why when you will calculate d with wrong r -> result will be good value.
and when you will calculate k (nonce) with wrong r -> result will be good value


k=(d*r - z)/s %n
k=k

Code:
 
 
p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f
a = 0
b = 7
G = (0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798, 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8)
n = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141

E = EllipticCurve(GF(p), [a, b])
G = E(G)

d = 17297868438860976900 
k = 2706155104
r = 114792231439225299071653076175597454642404629309811484913662796330298864240204
s = 5053942539770103579701350824871298641333011651975462818690909436892446986439
z = 48081857163558325212574375116762847358614850483118137681250849966396433292551


d1=(s*k - z)/r %n
print(d1==d)

k2=(z + r*d)/s %n
print(k2==k)

Donate: bc1q0sezldfgm7rf2r78p5scasrrcfkpzxnrfcvdc6

Subscribe : http://www.youtube.com/@Ecdsa_Solutions
akaki
Newbie
*
Offline Offline

Activity: 22
Merit: 35


View Profile
September 06, 2022, 06:05:40 PM
Merited by vapourminer (2), garlonicon (2), Welsh (1)
 #4

If r is wrong then s is also wrong.

The right s should be 99827946738399009248825444711200031423675392728917187111450168157978195192231.

If you are using both wrong r and s, you are just balancing the equation to get d.
garlonicon
Hero Member
*****
Offline Offline

Activity: 804
Merit: 1932


View Profile
September 06, 2022, 08:21:17 PM
Merited by vapourminer (2), Welsh (1)
 #5

Quote
why it works?
Because you don't touch any public keys at all. If your G is "02 79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798", then your "r=(k*G).x" should be equal to "(2706155104*0279BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798).x", so "r=5ea246048650e98edc5abf3b4c1cd410f2aeb93cfa8e66f21d6051342c725569" would be correct. However, if your "r=fdca19bd0e1a0721b21f9c3726df30f69409e005897fa6cd1a564d3a7ce7064c" is correct, and your "k=00000000000000000000000000000000000000000000000000000000a14ca660" is also correct, then your G has to be "03 CE660BE32AABB306C0E634CB436A2D46DB6CCB1C25A86E83A94AF766F78ED6B5".

You can always calculate things without touching public keys. But then, if your base point is not the same, you won't get the right result. You can always assume that G is different, and that k=1. You will always get d=something if you change your G. The problem is: your public key does not match.
COBRAS
Member
**
Offline Offline

Activity: 850
Merit: 22

$$P2P BTC BRUTE.JOIN NOW ! https://uclck.me/SQPJk


View Profile
September 06, 2022, 10:02:04 PM
Last edit: September 06, 2022, 10:14:38 PM by COBRAS
 #6

Quote
why it works?
Because you don't touch any public keys at all. If your G is "02 79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798", then your "r=(k*G).x" should be equal to "(2706155104*0279BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798).x", so "r=5ea246048650e98edc5abf3b4c1cd410f2aeb93cfa8e66f21d6051342c725569" would be correct. However, if your "r=fdca19bd0e1a0721b21f9c3726df30f69409e005897fa6cd1a564d3a7ce7064c" is correct, and your "k=00000000000000000000000000000000000000000000000000000000a14ca660" is also correct, then your G has to be "03 CE660BE32AABB306C0E634CB436A2D46DB6CCB1C25A86E83A94AF766F78ED6B5".

You can always calculate things without touching public keys. But then, if your base point is not the same, you won't get the right result. You can always assume that G is different, and that k=1. You will always get d=something if you change your G. The problem is: your public key does not match.

Yes, i think you exactly right aboup multiply sig to pubkey.

Can you make a BAD  trasaction sighnature  to code from this articke  https://medium.com/asecuritysite-when-bob-met-alice/ecdsa-signatures-can-be-cracked-with-one-good-signature-and-one-bad-one-2d8bc71949e9 ??

br

$$$ P2P NETWORK FOR BTC WALLET.DAT BRUTE F ORCE .JOIN NOW=GET MANY COINS NOW !!!
https://github.com/phrutis/LostWallet  https://t.me/+2niP9bQ8uu43MDg6
garlonicon
Hero Member
*****
Offline Offline

Activity: 804
Merit: 1932


View Profile
September 07, 2022, 04:45:30 AM
Merited by vapourminer (2), Welsh (2)
 #7

Quote
Now, let’s say we have two signatures. One has a fault and the other one is valid [2]. We then have (r,s) for the valid one, and (r_f,s_f) for the fault. These will be:
s_f = k^-1 * (h + d * r_f) (mod p)
s = k^-1 * (h + d * r) (mod p)
If r-value is wrong, then k-value is also wrong, both should change at the same time, if not, then other things like the base point has to change. If r-value is wrong and k-value is right, then something bad is going on.

In general, I don't understand something or this article is suspicious:
1) their assumptions are quite strong, for example it is unlikely to get two signatures, where the signed message is identical
2) their calculations are tricky, for example in the middle of their calculations, they skip the signed message in their equations
3) they use some weird formatting, where I don't know if something is a multiplication, or maybe it is a dot, because it looks like accessing a member of a structure in C

Edit: Probably I should read the original source first to reproduce that, because it has better quality: https://www.usenix.org/system/files/sec22-sullivan.pdf
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!