Hey all, I’ve been using this method from ecdsa123 to figure out the K nonce.
After 6 weeks, I finally got the right k nonce (256 bits) using his approach.
Just curious if there’s a quicker way to calculate k nonce. Can it be done with direct calculations based on the given values?
Finding K nonce more efficiently
16 replies 483 views
omega_bearFull Member
Posts: 116 · Reputation: 780
#2Feb 25, 2024, 07:42 AM
Maybe this can help, this about nonce
https://bitcointalk.org/index.php?topic=5491531.0
omega_bearFull Member
Posts: 116 · Reputation: 780
#3Feb 25, 2024, 12:27 PM
6 weeks is very fast !!!
have you result from real srz from btc transaction ?
omega_bearFull Member
Posts: 116 · Reputation: 780
#4Feb 26, 2024, 12:49 AM
what i you have for 256 bit nonce ?
omega_bearFull Member
Posts: 116 · Reputation: 780
#5Feb 26, 2024, 01:00 AM
expand code,add formulas for r,s,z and after ask openai, in my situations this help. openai find bast and fastest solution
regards
OH
i did. it went i i did it went into some imaginary calculations that wasted my time, sometimes 2 days until i realize the calculations are not right.
yes the result is from real rsz from a dormant wallet of 8 years.
omega_bearFull Member
Posts: 116 · Reputation: 780
#9Feb 26, 2024, 06:45 PM
Bro, check your pm please )
Running this on GPU will be mush faster,. Let me see if i can write a CUDA program for this.
wow. Thank you. Please do. I still feel 6 weeks is too long though. I just got lucky.
I currently ran the program on i9 processor and a Nvidia 3090 GPU.
in case you need the full code i had use in sagemath.
omega_bearFull Member
Posts: 116 · Reputation: 780
#14Feb 28, 2024, 11:06 AM
Thank you very mach for your code, mister
@COBRAS
@krashfire
Please give me an example rsz if your code works correctly.
sample rsz
r=0x
s=0x
z=0x
And, if 2 signatures match how long, it takes to K nonce
edit
i got error,
public_key1 (37231416379298332252575862495769965965364321245932635159006725536777825338696 : 9676366176353189190669004767334277632269117223198125569199055354600699161111 : 1)
pub1_x= 0x52503c225437e35c61b9ee5ec88ea71600e7a710dbebac88b27c2d1a667ac548
public_key2 (84773528361026042599480815013664408603889872484555722313313932231857335756436 : 21504221066078790871098131651817310599861599747961732812418866800256292472755 : 1)
pub2_x= 0xbb6c1de01f36618ae05f7c183c22dfa8797e779f39537752c27e2dc045b0e694
signature matches
signature matches
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In [1], line 83
81 for i in range(Integer(1), n):
82 k = (r * i + z) * modinv(s, n) % n
---> 83 if check_k(k):
84 print(f"Found correct k: {k}")
85 private_key = (s * k - z) * modinv(r, n) % n
Cell In [1], line 78, in check_k(k)
76 def check_k(k):
77 P = k * G
---> 78 return P.x() == r
File /home/sc_serv/sage/src/sage/structure/element.pyx:489, in sage.structure.element.Element.__getattr__()
487 AttributeError: 'LeftZeroSemigroup_with_category.element_class' object has no attribute 'blah_blah'...
488 """
--> 489 return self.getattr_from_category(name)
490
491 cdef getattr_from_category(self, name) noexcept:
File /home/sc_serv/sage/src/sage/structure/element.pyx:502, in sage.structure.element.Element.getattr_from_category()
500 else:
501 cls = P._abstract_element_class
--> 502 return getattr_from_other_class(self, cls, name)
503
504 def __dir__(self):
File /home/sc_serv/sage/src/sage/cpython/getattr.pyx:362, in sage.cpython.getattr.getattr_from_other_class()
360 dummy_error_message.cls = type(self)
361 dummy_error_message.name = name
--> 362 raise AttributeError(dummy_error_message)
363 att
omega_bearFull Member
Posts: 116 · Reputation: 780
#16Feb 28, 2024, 02:45 PM
@krashfire find in 6 week, and this is looks like lucky.
you can find rsz in previous topics/messages of @krashfire, for example
Can you please explain the logic behind this? GPU can probably reduce it to few days. you can PM me if needed.
Related topics
- Looking for 3 examples of r, s, z and nonce data 19
- Bitcoin Core displaying coins (UTXOs) in a new tab 13
- Are you in favor of BIP-110? Let's get a Bitcoin poll going. 0
- Erlay seems to have some issues here’s a better proposal for a bitcoin protocol without invites 3
- New Optional Hourglass Implementation is Live 3
- Ways to earn some sats by contributing to bitcoin core development 5