Bitcoin Forum
October 22, 2026, 08:16:18 AM *
News: Latest Bitcoin Core release: 31.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 [3]  All
  Print  
Author Topic: R,S,Z , K nonce and public key Signature samples  (Read 2888 times)
cyberzzz
Newbie
*
Offline

Activity: 13
Merit: 0


View Profile WWW
August 04, 2026, 03:42:34 AM
 #41

Public Key 0x40f08294791bb07e908196847f79ad162ba0dff28eb312b1669ee2c8a72f7bfb, 0x28c29cc6ec6f2ddf9f54f32da1ea727de71c2ef168528475f5233ba28c06c4a8

Code:
r1 = 0x7029db68c1420fe2d41c1fd7b86ea0739bc8e6d0a7c58f754b93e5ff6c8040
s1 = 0xdbe4b484c838fce2aa65d85901f94f6fad6ad5f604d805c30ce05c58371c6991
z1 = SHA256('This is test 4.')

r2 = 0xdfb77cd83e2251dc96caad4c45cf98fcf76b8c24aa349c2dbba548029571331f
s2 = 0x352b52b52b52b52b52b52b52b52b52b4e7c1db2bf914fdd54560dc7fb517156e
z2 = Private key for Puzzle #130

Interesting, right?
 




Is puzzle 135 R.S.Z is Connected to this rsz in puzzle 130 you give JohnnyTX?
how about for puzzle 140? give us some R.S and Pubkey probably also same Z could be the privatekey
coolmib
Member
**
Offline

Activity: 67
Merit: 14


View Profile
August 04, 2026, 04:43:23 AM
Last edit: August 04, 2026, 07:17:02 AM by coolmib
 #42

Code:
r = 0xdb30127de06f6c9d04e4ebc9cdefb93433a37be972db697b21c22724f6cf69d2
s = 0xe759203cae759203cae759203cae7590ddcd6e80d38035c802aef0f1080384ed
z = Private key for Puzzle #135
Update:
Code:
z = 0x6d9392a16883f90903d5f78da57af07eb2


why the public key for this RSZ pairs is not same with before (0440f08294791bb07e908196847f79ad162ba0dff28eb312b1669ee2c8a72f7bfb28c29cc6ec6f2 ddf9f54f32da1ea727de71c2ef168528475f5233ba28c06c4a8) ?

Let me correct my previous comment: if the public key is the same as before, that implies it has been compromised. The main point I wanted to make is that if a specific public key isn't specified, any value could potentially be entered— Am I right?

r (hex): db30127de06f6c9d04e4ebc9cdefb93433a37be972db697b21c22724f6cf69d2
s (hex): e759203cae759203cae759203cae7590ddcd6e80d38035c802aef0f1080384ed
z (hex): 6d9392a16883f90903d5f78da57af07eb2

a = 000000000000000000000000000039c8d2531e1d9853c105d58bb243d4d2cfde
b = 9659c0615ac246cd94b8576b996aab195ea91c7ad414a517a1e22b3c9f017d8b

Recovered Public Keys :
------------------------------
Q1 (y_bit=0): 0268370409ecef399d56a8705c55c61f28b8c15b49dad413a3ef43539ae30d503b
Uncompressed: 0468370409ecef399d56a8705c55c61f28b8c15b49dad413a3ef43539ae30d503be2a626d180025 2b2fc5c5f5cfbea346b6ae7ea09671f09e13e62d1fdffe36556
Status: ✅ Verified
Q2 (y_bit=1): 03930acb48632f3a354cc45d815a91e14cf59e1b8e2a4fef0648b7054d618a7c78
Uncompressed: 04930acb48632f3a354cc45d815a91e14cf59e1b8e2a4fef0648b7054d618a7c78694aa2a7d8d12 c4ec540456ba41d2f89b08a488bebfd51f350ad3c09acd207bd
Status: ✅ Verified
cyberzzz
Newbie
*
Offline

Activity: 13
Merit: 0


View Profile WWW
August 04, 2026, 12:12:41 PM
 #43

Alright , i get it but how about Puzzle 140 JohnnyTX??

Pubkey :

R1 :
S1 :
Z1 :

R2 :
S2 :
Z2 : Puzzle 140 Privkey

give us another hint .. I think RetiredCoder should solve that even if you give us hint Grin
detechs
Jr. Member
*
Offline

Activity: 90
Merit: 1


View Profile WWW
August 21, 2026, 04:14:42 AM
 #44

Code:
r = 0xdb30127de06f6c9d04e4ebc9cdefb93433a37be972db697b21c22724f6cf69d2
s = 0xe759203cae759203cae759203cae7590ddcd6e80d38035c802aef0f1080384ed
z = Private key for Puzzle #135
Update:
Code:
z = 0x6d9392a16883f90903d5f78da57af07eb2

How did you get puzzle 130 and 135 private keys and why were you giving them away? And do you have any more lol

p135. z = 0x6d9392a16883f90903d5f78da57af07eb2 derives to
  16RGFo6hjq9ym6Pj7N5H7L1NR1rVPJyw2v, puzzle 135's exact target
  address. verified two independent ways, the csv hash160 and
  the txt target. in range.

  p130. z2 = 0x33e7665705359f04f28b88cf897c603c9 derives to
  1Fo65aKq8s8iquMt6weF1rku1moWVEd5Ua, puzzle 130's exact target
  address. same two checks. in range.

Bitcoin Puzzle Solvers Discord https://discord.gg/3TVn3PGYtu
JohnnyTX
Newbie
*
Offline

Activity: 9
Merit: 0


View Profile
August 21, 2026, 02:59:22 PM
 #45

I will not tell you how. But those keys were already publicly known at that time. I am posting only signatures in advance.
New hint for Puzzle 140 will be posted soon.

Let me correct my previous comment: if the public key is the same as before, that implies it has been compromised. The main point I wanted to make is that if a specific public key isn't specified, any value could potentially be entered— Am I right?
I used different keys to sign that. The answer is actually yes, but anybody can use any key to sign a message. I am not sure what do you precisely mean in this case. Your Q2 key is correct and it was like that from the beginning.
lavina888
Member
**
Offline

Activity: 86
Merit: 10

Tartarians


View Profile
August 21, 2026, 08:44:59 PM
 #46

There are no leaks. JohnnyTX didn't know the private keys 130 and 135 when he published these signatures.

Forgery formula: He took a random point R, hardcoded s=N−1(modn) (where N is the puzzle number), took the already known public keys of the puzzles from the blockchain, and calculated his "fake" key using the formula Pfake=(N⋅r)−1⋅(R−N⋅Preal).

Illusion of magic: He simply adjusted the public key to the pre-prepared r,s, and z, exploiting an ECDSA vulnerability called Existential Forgery.

Code:
from ecdsa import SECP256k1, ellipticcurve
from ecdsa.numbertheory import inverse_mod
import hashlib

# secp256k1 curve parameters
G = SECP256k1.generator # Generator point
n = SECP256k1.order      # Order of the curve
p = SECP256k1.curve.p()  # Prime field

def decompress_key(comp_hex):
    """Decompress a compressed public key into an EC Point object."""
    prefix = comp_hex[0]
    x = int(comp_hex[2:], 16)
   
    # y^2 = x^3 + 7 mod p
    alpha = (pow(x, 3, p) + 7) % p
    beta = pow(alpha, (p + 1) // 4, p) # Square root mod p
   
    # If the prefix is '02', y must be even. If '03', y must be odd.
    if (prefix == '02' and beta % 2 != 0) or (prefix == '03' and beta % 2 == 0):
        y = p - beta
    else:
        y = beta
    return ellipticcurve.Point(SECP256k1.curve, x, y)

print("=====================================================================")
print("=== SIGNATURE VERIFICATION FOR PUZZLE 130 ===")
print("=====================================================================")

# 1. Real Puzzle 130 data
# Real public key for Puzzle 130 (already known from the blockchain)
P_real_130 = decompress_key("03633cbe3ec02b9401c5effa144c5b4d22f87940259634858fc7e59b1c09937852")
# Real private key for Puzzle 130, which JohnnyTX used as 'z' (the message hash)
z_130 = 0x33e7665705359f04f28b88cf897c603c9

# 2. Data provided by JohnnyTX
r_130 = 0xdfb77cd83e2251dc96caad4c45cf98fcf76b8c24aa349c2dbba548029571331f
s_130 = 0x352b52b52b52b52b52b52b52b52b52b4e7c1db2bf914fdd54560dc7fb517156e

# The "fake" public key JohnnyTX provided to make the signature valid (Q2 for 130)
P_fake_130 = ellipticcurve.Point(SECP256k1.curve,
                                 0x40f08294791bb07e908196847f79ad162ba0dff28eb312b1669ee2c8a72f7bfb,
                                 0x28c29cc6ec6f2ddf9f54f32da1ea727de71c2ef168528475f5233ba28c06c4a8)

print("\n[1] Checking if s = 1/N mod n:")
# Calculate the modular inverse of 130 modulo n
s_calc_130 = inverse_mod(130, n)
print(f"    Calculated s (1/130 mod n): {hex(s_calc_130)}")
print(f"    s from JohnnyTX:             {hex(s_130)}")
print(f"    => Match? {s_130 == s_calc_130}")

print("\n[2] Verifying the forgery equation: R = N * P_real + (N * r) * P_fake")
# In ECDSA verification: R = u1*G + u2*P_fake
# Where u1 = z * s^-1 and u2 = r * s^-1
# Because s = 1/N, s^-1 = N. Therefore:
# u1 = z * N. But z = d (private key), and d * G = P_real. So u1 * G = N * P_real
u1 = (z_130 * 130) % n
# u2 = r * N
u2 = (r_130 * 130) % n

# Calculate the resulting point R
R_calc = u1 * G + u2 * P_fake_130
print(f"    X-coordinate of R (calculated): {hex(R_calc.x())}")
print(f"    r (from JohnnyTX):              {hex(r_130)}")
print(f"    => Match? {R_calc.x() == r_130}")


print("\n=====================================================================")
print("=== SIGNATURE VERIFICATION FOR PUZZLE 135 ===")
print("=====================================================================")

# 1. Real Puzzle 135 data
# Real public key for Puzzle 135
P_real_135 = decompress_key("02145d2611c823a396ef6712ce0f712f09b9b4f3135e3e0aa3230fb9b6d08d1e16")
# Real private key for Puzzle 135, used as 'z'
z_135 = 0x6d9392a16883f90903d5f78da57af07eb2

# 2. Data provided by JohnnyTX
r_135 = 0xdb30127de06f6c9d04e4ebc9cdefb93433a37be972db697b21c22724f6cf69d2
s_135 = 0xe759203cae759203cae759203cae7590ddcd6e80d38035c802aef0f1080384ed

# The "fake" public key provided by JohnnyTX (Q2 for 135)
P_fake_135 = decompress_key("03930acb48632f3a354cc45d815a91e14cf59e1b8e2a4fef0648b7054d618a7c78")

print("\n[1] Checking if s = 1/N mod n:")
s_calc_135 = inverse_mod(135, n)
print(f"    Calculated s (1/135 mod n): {hex(s_calc_135)}")
print(f"    s from JohnnyTX:             {hex(s_135)}")
print(f"    => Match? {s_135 == s_calc_135}")

print("\n[2] Verifying the forgery equation: R = N * P_real + (N * r) * P_fake")
# Same logic: s^-1 = N
u1 = (z_135 * 135) % n
u2 = (r_135 * 135) % n

# Calculate the resulting point R
R_calc = u1 * G + u2 * P_fake_135
print(f"    X-coordinate of R (calculated): {hex(R_calc.x())}")
print(f"    r (from JohnnyTX):              {hex(r_135)}")
print(f"    => Match? {R_calc.x() == r_135}")
lavina888
Member
**
Offline

Activity: 86
Merit: 10

Tartarians


View Profile
August 21, 2026, 08:49:39 PM
 #47

--- Signature for Puzzle #140 ---
r = 0xf4cf564f6624807ba3e08851ce4d013f521922c8923c85a22312d48dfc28b6d6
s = 0xc3a83a83a83a83a83a83a83a83a83a82af97ee51392ab4fa772d9510316b4b79
z = Private key for Puzzle #140
PubKey = 0208be998f9ba4ff5b676c8dcf10e32a59e9875348aaf9004f2a4055209c6f4c61
--------------------------------------------------------------

--- Signature for Puzzle #145 ---
r = 0x5f1a95f9a85b51723c02da3e4728047a89643e1864daae502a93f0d5737d5dd2
s = 0xd764a26d764a26d764a26d764a26d76390b66fb5bc1643ba3776bd03b80346cb
z = Private key for Puzzle #145
PubKey = 020e4e6f0f87ac06d344a688356c23407c48c81752eda1c1cd7246c17d2b870578
--------------------------------------------------------------

--- Signature for Puzzle #150 ---
r = 0x5cfe112bac05176c247810fff201e1e71f710a5ae10e0e63c63cec48e57135cf
s = 0x8369d0369d0369d0369d0369d0369d02c2d13ac85690cd2215ab22e1e2594a75
z = Private key for Puzzle #150
PubKey = 0323b6e409b70bdca9bad2c516cc825eac2f3ac8ec6a46a2721293d6bca55ba8ef
--------------------------------------------------------------

--- Signature for Puzzle #155 ---
r = 0xa08856b66f9e3a079b7c765253165f125a72a319258b90cd3bc3b849ce29a7a5
s = 0xc13d1c13d1c13d1c13d1c13d1c13d1c0478c40583ef173fedb1df817b5f0cc82
z = Private key for Puzzle #155
PubKey = 0270d784fdaa84737c5dc7fabf213de2727dd24aa138b7d057b71e713ed3eb1647
--------------------------------------------------------------

--- Signature for Puzzle #160 ---
r = 0x98331c4f2f3c66ae7bd3241ea2df3962eba2ed770fb760162c533435bcecc384
s = 0xcb3333333333333333333333333333230facc23e7ee7262a0422e3fc544aa32
z = Private key for Puzzle #160
PubKey = 0297f7fc28ef2efee5344763153d3d50f157e017fdb5c88d431a42457e3f6b15b7
--------------------------------------------------------------

Interesting, right? But it's just an illusion...
cyberzzz
Newbie
*
Offline

Activity: 13
Merit: 0


View Profile WWW
August 23, 2026, 09:11:59 AM
Last edit: August 23, 2026, 02:31:17 PM by cyberzzz
 #48

--- Signature for Puzzle #140 ---
r = 0xf4cf564f6624807ba3e08851ce4d013f521922c8923c85a22312d48dfc28b6d6
s = 0xc3a83a83a83a83a83a83a83a83a83a82af97ee51392ab4fa772d9510316b4b79
z = Private key for Puzzle #140
PubKey = 0208be998f9ba4ff5b676c8dcf10e32a59e9875348aaf9004f2a4055209c6f4c61
--------------------------------------------------------------

--- Signature for Puzzle #145 ---
r = 0x5f1a95f9a85b51723c02da3e4728047a89643e1864daae502a93f0d5737d5dd2
s = 0xd764a26d764a26d764a26d764a26d76390b66fb5bc1643ba3776bd03b80346cb
z = Private key for Puzzle #145
PubKey = 020e4e6f0f87ac06d344a688356c23407c48c81752eda1c1cd7246c17d2b870578
--------------------------------------------------------------

--- Signature for Puzzle #150 ---
r = 0x5cfe112bac05176c247810fff201e1e71f710a5ae10e0e63c63cec48e57135cf
s = 0x8369d0369d0369d0369d0369d0369d02c2d13ac85690cd2215ab22e1e2594a75
z = Private key for Puzzle #150
PubKey = 0323b6e409b70bdca9bad2c516cc825eac2f3ac8ec6a46a2721293d6bca55ba8ef
--------------------------------------------------------------

--- Signature for Puzzle #155 ---
r = 0xa08856b66f9e3a079b7c765253165f125a72a319258b90cd3bc3b849ce29a7a5
s = 0xc13d1c13d1c13d1c13d1c13d1c13d1c0478c40583ef173fedb1df817b5f0cc82
z = Private key for Puzzle #155
PubKey = 0270d784fdaa84737c5dc7fabf213de2727dd24aa138b7d057b71e713ed3eb1647
--------------------------------------------------------------

--- Signature for Puzzle #160 ---
r = 0x98331c4f2f3c66ae7bd3241ea2df3962eba2ed770fb760162c533435bcecc384
s = 0xcb3333333333333333333333333333230facc23e7ee7262a0422e3fc544aa32
z = Private key for Puzzle #160
PubKey = 0297f7fc28ef2efee5344763153d3d50f157e017fdb5c88d431a42457e3f6b15b7
--------------------------------------------------------------

Interesting, right? But it's just an illusion...



in example of JohnnyTx , its 2 signature with 1 pubkey but how?? my brain is not braining 🤣 or he used different method in this 2 signature?


Signature2 = must be Existential Forgery
Signature1 = Huh or he knows the privatekey of that puzzle

this signature is only my concern because signature puzzle 135 must be existential forgery and 1 signature only he gave.


Quote
Public Key 0x40f08294791bb07e908196847f79ad162ba0dff28eb312b1669ee2c8a72f7bfb, 0x28c29cc6ec6f2ddf9f54f32da1ea727de71c2ef168528475f5233ba28c06c4a8

r1 = 0x7029db68c1420fe2d41c1fd7b86ea0739bc8e6d0a7c58f754b93e5ff6c8040
s1 = 0xdbe4b484c838fce2aa65d85901f94f6fad6ad5f604d805c30ce05c58371c6991
z1 = SHA256('This is test 4.')

r2 = 0xdfb77cd83e2251dc96caad4c45cf98fcf76b8c24aa349c2dbba548029571331f
s2 = 0x352b52b52b52b52b52b52b52b52b52b4e7c1db2bf914fdd54560dc7fb517156e
z2 = Private key for Puzzle #130

 
lavina888
Member
**
Offline

Activity: 86
Merit: 10

Tartarians


View Profile
August 23, 2026, 04:17:45 PM
Last edit: August 23, 2026, 04:30:45 PM by lavina888
 #49

This question should probably be addressed to Johnny...

He doesn't explain anything, he just creates the illusion of importance...

There's no connection in his captions.

A Retired Coder at least briefly explains the solutions to his mini-puzzles, but Johnny doesn't seem to have time for that...




p.s.

An easy way to check if Johnny really knows the puzzle keys is to ask him for the clues for addresses 71-74.

He says the keys have already been publicly released, so he's unlikely to have any trouble with them.

Perhaps someone on the forum can solve his signatures faster.
cyberzzz
Newbie
*
Offline

Activity: 13
Merit: 0


View Profile WWW
August 24, 2026, 03:16:25 AM
Last edit: August 24, 2026, 03:35:55 AM by cyberzzz
 #50

I can suspect that JohnnyTx is RetiredCoder's second account, because he posted that signature 2 months before the puzzle 130 balance has move,

If JohnnyTx can give us 2 signature of Puzzle 140 then he is not RetiredCoder but he knows all puzzle as well..

Because RetiredCoder solve 135 puzzle recently  Grin

If JohnnyTx shared 2 signature of Puzzle 140 a year from now then possible its RetiredCoder's second account  Grin


Puzzle130 = Solve at 2024-09-23
Puzzle135 = Solve at 2026-07-28
Puzzle140 = Solve will be 2029 and JohnnyTx would be post the 2 signature before he move the fund , a month difference so we cannot suspect that is the same person  Grin
lavina888
Member
**
Offline

Activity: 86
Merit: 10

Tartarians


View Profile
August 24, 2026, 07:28:20 PM
 #51

Did Johnny explain the connection between them at address 130 or 135 (signatures)?

The 135 puzzle was solved 8 months after Johnny's "hint"  Grin

It's unlikely Johnny himself understands the meaning of his publications.
detechs
Jr. Member
*
Offline

Activity: 90
Merit: 1


View Profile WWW
August 25, 2026, 01:52:24 PM
 #52

I hope he posts a clue anyway

Bitcoin Puzzle Solvers Discord https://discord.gg/3TVn3PGYtu
AndrewWeb
Jr. Member
*
Offline

Activity: 100
Merit: 3


View Profile
September 12, 2026, 03:10:47 PM
Last edit: September 12, 2026, 03:22:56 PM by AndrewWeb
 #53

Saw some comments of users looking for R,S,Z Signatures and public key sample for research purposes.

So i created a script where you can have a little more details than you need. Its a simple script so you can do your various research that you wish on ECDSA Secp256k1 signatures.

you can download it here. https://github.com/KrashKrash/ecdsa-rsz-signature

Code:

=== ECDSA Signature Details ===

BTC Address: 1JvF4Bn4yF6GThYEA7pfhp3j8Xb6wu2t8D
Private Key: edb01804beb2e95898648ae87f1fa072d53b3b6f4564e092065bac907f063b9d

Signature (r, s, z):
  r: 634e6e5d85360927c64d66bdd616dc58ac6b72cd22fac01c544236b63734ad35
  s: 7fe9088b3849cddb82f38ef9244a06c413addb38031ee01a38e675ff28579d8a
  z: 6ad532092bb3f4ee012e61df35c95efc7d9e9fa5653c371bc843fa4b3627f01f
  k (nonce): 695e5e4c01e8ac9d77b7ecdd9881d50bb397ff7e54e082240a19b714c4de7ef8
PubKey: 034f966cdcc502d17876270349736f6a20f13edb5eccb5a92d1c702a0e059a9ba9

Signature Verification: Valid



just a little more info for you who are just starting out to do the research, some call it z, some call it message(hash) some just call it h. but it means the same thing.

message or m  = the original message
H(m) or h or z = the hash of the message
H(m), h or z depending on who you talk to, is the hash of the message. same meaning.

I just want to have this information out here so you don't waste your time thinking what is h and what is z. Good luck on your research.

Why do I get a different Private Key ?

https://i.ibb.co/yByLT876/key.jpg

Quote
# secp256k1 group order N
N = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141

# Inputs
K = 0x695e5e4c01e8ac9d77b7ecdd9881d50bb397ff7e54e082240a19b714c4de7ef8
R = 0x634e6e5d85360927c64d66bdd616dc58ac6b72cd22fac01c544236b63734ad35
S = 0x7fe9088b3849cddb82f38ef9244a06c413addb38031ee01a38e675ff28579d8a
Z = 0x6ad532092bb3f4ee012e61df35c95efc7d9e9fa5653c371bc843fa4b3627f01f

# Step 1: Calculate (S * K - Z) mod N
numerator = (S * K - Z) % N

# Step 2: Calculate modular inverse of R mod N
r_inv = pow(R, -1, N)

# Step 3: Derivation
d = (numerator * r_inv) % N

print(f"Correct Private Key Hex: {hex(d)[2:].zfill(64)}")

JDScreesh
Member
**
Offline

Activity: 75
Merit: 31


View Profile
September 20, 2026, 07:33:17 PM
 #54

...

Why do I get a different Private Key ?

https://i.ibb.co/yByLT876/key.jpg

Quote
# secp256k1 group order N
N = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141

# Inputs
K = 0x695e5e4c01e8ac9d77b7ecdd9881d50bb397ff7e54e082240a19b714c4de7ef8
R = 0x634e6e5d85360927c64d66bdd616dc58ac6b72cd22fac01c544236b63734ad35
S = 0x7fe9088b3849cddb82f38ef9244a06c413addb38031ee01a38e675ff28579d8a
Z = 0x6ad532092bb3f4ee012e61df35c95efc7d9e9fa5653c371bc843fa4b3627f01f

# Step 1: Calculate (S * K - Z) mod N
numerator = (S * K - Z) % N

# Step 2: Calculate modular inverse of R mod N
r_inv = pow(R, -1, N)

# Step 3: Derivation
d = (numerator * r_inv) % N

print(f"Correct Private Key Hex: {hex(d)[2:].zfill(64)}")



Hello.

The K value is incorrect. The real K value is 0x331a8d875ee76008057981c577c6f66e84de443b1a8aad659f338b32c2fad9c1

That's why the Private Key you got is different.

Greetings  Smiley

For donations: BTC - bc1q9v9s9jtunr58pykwx77dpwzdupmfdn0x8jyt06 or 145u2ppTJhkXq11xnbBM5JgkQdgV9o1V42
For donations: LTC - LaAHGMjisi2NFMfHJpMywKm8ALzmivdRaq
AndrewWeb
Jr. Member
*
Offline

Activity: 100
Merit: 3


View Profile
September 23, 2026, 11:06:36 AM
Last edit: September 24, 2026, 08:13:30 PM by AndrewWeb
 #55

...

Why do I get a different Private Key ?

https://i.ibb.co/yByLT876/key.jpg

Quote
# secp256k1 group order N
N = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141

# Inputs
K = 0x695e5e4c01e8ac9d77b7ecdd9881d50bb397ff7e54e082240a19b714c4de7ef8
R = 0x634e6e5d85360927c64d66bdd616dc58ac6b72cd22fac01c544236b63734ad35
S = 0x7fe9088b3849cddb82f38ef9244a06c413addb38031ee01a38e675ff28579d8a
Z = 0x6ad532092bb3f4ee012e61df35c95efc7d9e9fa5653c371bc843fa4b3627f01f

# Step 1: Calculate (S * K - Z) mod N
numerator = (S * K - Z) % N

# Step 2: Calculate modular inverse of R mod N
r_inv = pow(R, -1, N)

# Step 3: Derivation
d = (numerator * r_inv) % N

print(f"Correct Private Key Hex: {hex(d)[2:].zfill(64)}")



Hello.

The K value is incorrect. The real K value is 0x331a8d875ee76008057981c577c6f66e84de443b1a8aad659f338b32c2fad9c1

That's why the Private Key you got is different.

Greetings  Smiley

Thanks Smiley

And I found the Python script needed to find K when you know R,S,Z and the Private Key

https://ibb.co/XxQcc4RG
krashfire (OP)
Member
**
Offline

Activity: 138
Merit: 14


View Profile
October 21, 2026, 03:45:49 AM
 #56

Saw some comments of users looking for R,S,Z Signatures and public key sample for research purposes.

So i created a script where you can have a little more details than you need. Its a simple script so you can do your various research that you wish on ECDSA Secp256k1 signatures.

you can download it here. https://github.com/KrashKrash/ecdsa-rsz-signature

Code:

=== ECDSA Signature Details ===

BTC Address: 1JvF4Bn4yF6GThYEA7pfhp3j8Xb6wu2t8D
Private Key: edb01804beb2e95898648ae87f1fa072d53b3b6f4564e092065bac907f063b9d

Signature (r, s, z):
  r: 634e6e5d85360927c64d66bdd616dc58ac6b72cd22fac01c544236b63734ad35
  s: 7fe9088b3849cddb82f38ef9244a06c413addb38031ee01a38e675ff28579d8a
  z: 6ad532092bb3f4ee012e61df35c95efc7d9e9fa5653c371bc843fa4b3627f01f
  k (nonce): 695e5e4c01e8ac9d77b7ecdd9881d50bb397ff7e54e082240a19b714c4de7ef8
PubKey: 034f966cdcc502d17876270349736f6a20f13edb5eccb5a92d1c702a0e059a9ba9

Signature Verification: Valid



just a little more info for you who are just starting out to do the research, some call it z, some call it message(hash) some just call it h. but it means the same thing.

message or m  = the original message
H(m) or h or z = the hash of the message
H(m), h or z depending on who you talk to, is the hash of the message. same meaning.

I just want to have this information out here so you don't waste your time thinking what is h and what is z. Good luck on your research.

Or just do with one scalar value without any messages or H(m).

R = pmul(k, Q)
r = R[0] % n
s = r * inv(k, n) % n
z = 0


KRASH
AndrewWeb
Jr. Member
*
Offline

Activity: 100
Merit: 3


View Profile
October 21, 2026, 09:38:00 AM
 #57

I have the Python script needed to find K when I know R,S,Z and the Private Key
https://ibb.co/XxQcc4RG

and

I have the Python script needed to find the Private Key when I know R,S,Z and K
https://i.ibb.co/yByLT876/key.jpg

Does anyone have the script needed to find Z when I know R,S ?
Pages: « 1 2 [3]  All
  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!