WanderingPhilospher
Sr. Member
Offline
Activity: 1260
Merit: 252
Shooters Shoot...
|
|
December 08, 2023, 11:40:14 PM |
|
Thank you, but that is not what I asked for, I asked about script for public key
Public key ?? Here you go puzzle 65 import sys, secrets, secp256k1 as ice while True: A0 = secrets.SystemRandom().randrange(18446744073709551615, 36893488147419103231) A1 = ice.scalar_multiplication(A0);B0 = ice.to_cpub(A1.hex()) message = "\r{}".format(B0);messages = [] messages.append(message);output = "\033[01;33m" + ''.join(messages) + "\r" sys.stdout.write(output);sys.stdout.flush() if B0 == "0230210c23b1a047bc9bdbb13448e67deddc108946de6de639bcc75d47c0216b1b": HEX = "%064x" % dec;wifc = ice.btc_pvk_to_wif(HEX) with open("KEYFOUNDKEYFOUND.txt", "a") as f: f.write(f'Private key (wif) Compressed : {wifc}\n') break It's the same idea, it generate public from private then compare. It's not public key addition Maybe provide step by step of what you are wanting. Sounds like you want to add public key a to public key b and look at the resulting hash160. So you'd have to provide 2 public keys, if that's the case.
|
|
|
|
mabdlmonem
Jr. Member
Offline
Activity: 37
Merit: 1
|
|
December 08, 2023, 11:49:36 PM |
|
Thank you, but that is not what I asked for, I asked about script for public key
Public key ?? Here you go puzzle 65 import sys, secrets, secp256k1 as ice while True: A0 = secrets.SystemRandom().randrange(18446744073709551615, 36893488147419103231) A1 = ice.scalar_multiplication(A0);B0 = ice.to_cpub(A1.hex()) message = "\r{}".format(B0);messages = [] messages.append(message);output = "\033[01;33m" + ''.join(messages) + "\r" sys.stdout.write(output);sys.stdout.flush() if B0 == "0230210c23b1a047bc9bdbb13448e67deddc108946de6de639bcc75d47c0216b1b": HEX = "%064x" % dec;wifc = ice.btc_pvk_to_wif(HEX) with open("KEYFOUNDKEYFOUND.txt", "a") as f: f.write(f'Private key (wif) Compressed : {wifc}\n') break It's the same idea, it generate public from private then compare. It's not public key addition Maybe provide step by step of what you are wanting. Sounds like you want to add public key a to public key b and look at the resulting hash160. So you'd have to provide 2 public keys, if that's the case. I want to make sure from something about binary and public key. So I need a script to see what happens when we add 2 to the public key A and see the results of B . If what I think works I will share with everyone my idea, that's all
|
|
|
|
WanderingPhilospher
Sr. Member
Offline
Activity: 1260
Merit: 252
Shooters Shoot...
|
|
December 09, 2023, 12:00:00 AM |
|
I want to make sure from something about binary and public key. So I need a script to see what happens when we add 2 to the public key A and see the results of B . If what I think works I will share with everyone my idea, that's all Ok, so again, still confusing, at least to me. You want to take a known public key "A" and add decimal number 2, to it, and see what the results are, "B"?
|
|
|
|
mabdlmonem
Jr. Member
Offline
Activity: 37
Merit: 1
|
|
December 09, 2023, 12:03:05 AM Last edit: December 09, 2023, 11:18:57 PM by Mr. Big |
|
I want to make sure from something about binary and public key. So I need a script to see what happens when we add 2 to the public key A and see the results of B . If what I think works I will share with everyone my idea, that's all Ok, so again, still confusing, at least to me. You want to take a known public key "A" and add decimal number 2, to it, and see what the results are, "B"? Yes, something like this
I want to make sure from something about binary and public key. So I need a script to see what happens when we add 2 to the public key A and see the results of B . If what I think works I will share with everyone my idea, that's all Ok, so again, still confusing, at least to me. You want to take a known public key "A" and add decimal number 2, to it, and see what the results are, "B"? Basepoint G: (55066263022277343669578718895168534326250603453777594175500187360389116729240L, 32670510020758816978083085130507043184471273380659243275938904335757337482424L) Alice's secret key: 17436825491055586112755527818298542034755947930418580382030036978914692463183 Alice's public key: (105679268965026450260338478364512614840272341529552480851333141374575362812020L, 16626610969520910407950657067133267950619549449019363437330088722436240164467L) Bob's secret key: 32291818723468099298317452759803795679231875044644200373977689553806184529332 Bob's public key: (91972152888645730114115627070016955368567223430226022010551427574648772204461L, 38446745167120461740412855329188667802416705205856357237503216472671667494148L) =========Now we compare if same ================= (Alice Private+Bob Private)*G (101985652621362431772155823262934243650512147323486167826619770748482854554391L, 55338466074231142921426831718703469030196983642662166495910251269532062902125L) Alice Public+Bob Public (101985652621362431772155823262934243650512147323486167826619770748482854554391L, 55338466074231142921426831718703469030196983642662166495910251269532062902125L)
|
|
|
|
nomachine
Member
Offline
Activity: 506
Merit: 38
|
|
December 09, 2023, 01:20:44 AM Last edit: December 09, 2023, 09:42:53 AM by nomachine |
|
Python def point_addition(p, q, a, p_curve): if p == "infinity": return q if q == "infinity": return p
x_p, y_p = p x_q, y_q = q
if p != q: m = ((y_q - y_p) * pow(x_q - x_p, -1, p_curve)) % p_curve else: m = ((3 * x_p**2 + a) * pow(2 * y_p, -1, p_curve)) % p_curve
x_r = (m**2 - x_p - x_q) % p_curve y_r = (m * (x_p - x_r) - y_p) % p_curve
return (x_r, y_r)
# Elliptic curve parameters p_curve = 2**256 - 2**32 - 2**9 - 2**8 - 2**7 - 2**6 - 2**4 - 1 a_curve = 0 g_basepoint = ( 55066263022277343669578718895168534326250603453777594175500187360389116729240, 32670510020758816978083085130507043184471273380659243275938904335757337482424 )
# Alice's private and public keys alice_private_key = 17436825491055586112755527818298542034755947930418580382030036978914692463183 alice_public_key = ( 105679268965026450260338478364512614840272341529552480851333141374575362812020, 16626610969520910407950657067133267950619549449019363437330088722436240164467 )
# Bob's private and public keys bob_private_key = 32291818723468099298317452759803795679231875044644200373977689553806184529332 bob_public_key = ( 91972152888645730114115627070016955368567223430226022010551427574648772204461, 38446745167120461740412855329188667802416705205856357237503216472671667494148 )
# Calculate (Alice Private + Bob Private) mod p combined_private_key = (alice_private_key + bob_private_key) % p_curve
# Calculate combined public key combined_public_key = "infinity" for i in range(combined_private_key.bit_length()): if (combined_private_key >> i) & 1: combined_public_key = point_addition(combined_public_key, g_basepoint, a_curve, p_curve)
print("(Alice Private + Bob Private) * G:", combined_public_key) print("Alice Public + Bob Public:", point_addition(alice_public_key, bob_public_key, a_curve, p_curve)) Result: (Alice Private + Bob Private) * G: (42781960159024299958163639356878453190501432691827926213851649420102986506453, 26209845635735715128050436215405957538148584136159453271268754283021438363749) Alice Public + Bob Public: (101985652621362431772155823262934243650512147323486167826619770748482854554391, 55338466074231142921426831718703469030196983642662166495910251269532062902125) This is off-topic and not directly related to brute-forcing Bitcoin (BTC). The focus here is on brute-forcing (trial-and-error guessing) BTC puzzles. And this code is demonstration of elliptic curve cryptography operations (a combined public key from the sum of two private keys) rather than an attempt to crack or exploit BTC. There doesn't appear to be any straightforward way to solve the presented challenge without resorting to years of brute force.
|
bc1qdwnxr7s08xwelpjy3cc52rrxg63xsmagv50fa8
|
|
|
citb0in
|
|
December 09, 2023, 11:53:57 AM |
|
I have digaran on ignore but it seems I see him again posting under the new user account mabdlmonem, humm?
|
_ _ _ __ _ _ _ __ |_) | / \ / |/ (_ / \ | \ / |_ |_) (_ |_) |_ \_/ \_ |\ __) \_/ |_ \/ |_ | \ __) --> citb0in Solo-Mining Group <--- low stake of only 0.001 BTC. We regularly rent about 5 PH/s hash power and direct it to SoloCK pool. Wanna know more? Read through the link and JOIN NOW
|
|
|
nomachine
Member
Offline
Activity: 506
Merit: 38
|
|
December 09, 2023, 01:07:46 PM |
|
I have digaran on ignore but it seems I see him again posting under the new user account mabdlmonem, humm?
It really reminds me of his additions/subtractions
|
bc1qdwnxr7s08xwelpjy3cc52rrxg63xsmagv50fa8
|
|
|
mabdlmonem
Jr. Member
Offline
Activity: 37
Merit: 1
|
|
December 09, 2023, 02:11:49 PM |
|
@nomachine, can you have this work with points without using ice? I'm just a newbie needing help, a totally stranger newbie.😂 from sympy import mod_inverse
N = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
def ters(scalar, target): k = mod_inverse(2, N) scalar_bin = bin(scalar)[2:] for i in range(len(scalar_bin)): if scalar_bin[i] == '0': result = (target * k) % N else: result = ((target * k) % N + N - 57896044618658097711785492504343953926418782139537452191302581570759080747169 ) % N target = result return result
target1 = 1361129467683753853853498429727072845824 target2 = 961437616415839130310402076835011931977
print("Target results:") for x in range(1, 256): result1 = ters(x, target1) print(f"T1: {result1:x}") for x in range(1, 256): result2 = ters(x, target2) print(f"T2: {result2:x}") for x in range(1, 256): result1 = ters(x, target1) result2 = ters(x, target2) subtraction = (result1 - result2) % N print(f"S: {subtraction:x}") could you please explain what is target1 and target2 ,, range (1,256) its length ?
|
|
|
|
citb0in
|
|
December 09, 2023, 03:30:46 PM |
|
I have digaran on ignore but it seems I see him again posting under the new user account mabdlmonem, humm?
It really reminds me of his additions/subtractions yeah not only that but also ... I am just good at math but very bad at programming so I couldn't understand the code honestly
|
_ _ _ __ _ _ _ __ |_) | / \ / |/ (_ / \ | \ / |_ |_) (_ |_) |_ \_/ \_ |\ __) \_/ |_ \/ |_ | \ __) --> citb0in Solo-Mining Group <--- low stake of only 0.001 BTC. We regularly rent about 5 PH/s hash power and direct it to SoloCK pool. Wanna know more? Read through the link and JOIN NOW
|
|
|
Woz2000
Jr. Member
Offline
Activity: 85
Merit: 2
|
|
December 10, 2023, 02:39:57 AM Last edit: December 10, 2023, 11:00:01 PM by Mr. Big |
|
@mods: is there a rule against multiple accounts? same ip = ban??? I guess my ignore list gets a little longer. I have digaran on ignore but it seems I see him again posting under the new user account mabdlmonem, humm?
It really reminds me of his additions/subtractions yeah not only that but also ... I am just good at math but very bad at programming so I couldn't understand the code honestly
Unbelievable!!! The A hole sends me a PM quoting some of the rules. I've reported him to the mods, not sure if something will be done, but maybe some others that are annoyed can do the same??? @mods: is there a rule against multiple accounts? same ip = ban??? I guess my ignore list gets a little longer. I have digaran on ignore but it seems I see him again posting under the new user account mabdlmonem, humm?
It really reminds me of his additions/subtractions yeah not only that but also ... I am just good at math but very bad at programming so I couldn't understand the code honestly
|
|
|
|
brainless
Member
Offline
Activity: 363
Merit: 35
|
|
December 10, 2023, 08:08:02 AM |
|
Hello all, is there any python code for public key addition and checking it's hash ?
Yes, look at the iceland2k14/secp256k1 script and create your script to fit within his script. Also, what do you mean by "checking it's hash"? H160? Yes , hash160 . I saw his code , I am just good at math but very bad at programming so I couldn't understand the code honestly Simplest import sys, secrets, secp256k1 as ice while True: dec = secrets.SystemRandom().randrange(36893488147419103231, 73786976294838206463) h160 = ice.privatekey_to_h160(1, True, dec).hex() message = "\r{}".format(h160);messages = [] messages.append(message);output = "\033[01;33m" + ''.join(messages) + "\r" sys.stdout.write(output);sys.stdout.flush() if h160 == "20d45a6a762535700ce9e0b216e31994335db8a5": HEX = "%064x" % dec;wifc = ice.btc_pvk_to_wif(HEX) with open("KEYFOUNDKEYFOUND.txt", "a") as f: f.write(f'Private key (wif) Compressed : {wifc}\n') break Thank you, but that is not what I asked for, I asked about script for public key addition, this script is for generating address from private I am traveling, tomorrow I will post friendly script for your easy work
|
13sXkWqtivcMtNGQpskD78iqsgVy9hcHLF
|
|
|
nomachine
Member
Offline
Activity: 506
Merit: 38
|
|
December 10, 2023, 12:33:45 PM Last edit: December 10, 2023, 04:58:30 PM by nomachine |
|
About the public keys in Python..... You can use fastecdsa SEC1Encode to do this all in one call (from Point X and Y). Here is link https://github.com/AntonKueltz/fastecdsa/blob/main/fastecdsa/encoding/sec1.py#L37or https://github.com/AntonKueltz/fastecdsa/blob/main/fastecdsa/tests/encoding/test_sec1.py#L47AntonKueltz does very interesting things here Let's get back to the topic. With the same encoder, the same speed can be achieved as with the secp256x1 as ice..... import sys, secrets, hashlib, binascii from fastecdsa.encoding.sec1 import SEC1Encoder from fastecdsa.curve import secp256k1 while True: dec = secrets.SystemRandom().randrange(36893488147419103231, 73786976294838206463) h160 = hashlib.new('ripemd160', hashlib.sha256(bytes.fromhex(binascii.hexlify(SEC1Encoder.encode_public_key(secp256k1.G * dec, compressed=True)).decode('utf-8'))).digest()).digest() message = "\r{}".format(h160.hex());messages = [] messages.append(message);output = "\033[01;33m" + ''.join(messages) + "\r" sys.stdout.write(output);sys.stdout.flush() if h160.hex() == "20d45a6a762535700ce9e0b216e31994335db8a5": with open("KEYFOUNDKEYFOUND.txt", "a") as f: f.write(f'Private key (dec) : {dec}\n') break Maybe they use the same encoder? You have managed to search a total random keys of 9213815776839680 total 66 bit range is 73786976294838206463 now if you wanted to search sequentially it would take you around 8008 months to completely search the whole range, and you don't know how many keys you have generated multiple times with random mode. You have better chances if you buy lottery tickets. Don't waste your money on it. Lets see what santa has for us.
There is also a third option. Something between sequential and random.To incorporate randomness into the script, you can shuffle the order in which the sequential chunks are processed. Script divides the key search range into cpu_count chunks and assigns each chunk to a separate process using concurrent.futures.ProcessPoolExecutor. The more cpu cores you have, the better. (don't do this on a smartphone) import time import os import sys import hashlib import binascii import concurrent.futures from concurrent.futures import ProcessPoolExecutor from multiprocessing import cpu_count from fastecdsa.encoding.sec1 import SEC1Encoder from fastecdsa.curve import secp256k1 import random
def find_key_range(lower, upper, target_binary): for dec in range(lower, upper): h160 = hashlib.new('ripemd160', hashlib.sha256(bytes.fromhex(binascii.hexlify(SEC1Encoder.encode_public_key(secp256k1.G * dec, compressed=True)).decode('utf-8'))).digest()).digest() message = "\r[+] {}".format(h160.hex()) sys.stdout.write(message) sys.stdout.flush() if h160 == target_binary: with open("KEYFOUNDKEYFOUND.txt", "a") as f: f.write(f'Private key (dec) : {dec}\n') return dec
def main(): os.system("clear") t = time.ctime() sys.stdout.write(f"\033[?25l") sys.stdout.write(f"\033[01;33m[+] {t}\n")
puzzle = 66 target_binary = bytes.fromhex('20d45a6a762535700ce9e0b216e31994335db8a5') lower_range_limit = 2 ** (puzzle - 1) upper_range_limit = (2 ** puzzle) - 1
sys.stdout.write(f"[+] Puzzle: {puzzle}\n") sys.stdout.write(f"[+] Lower range limit: {lower_range_limit}\n") sys.stdout.write(f"[+] Upper range limit: {upper_range_limit}\n")
process_count = cpu_count() num_processes = process_count sys.stdout.write(f"[+] Using {process_count} CPU cores for parallel search\n")
chunks = [(lower_range_limit + i * (upper_range_limit - lower_range_limit) // num_processes, lower_range_limit + (i + 1) * (upper_range_limit - lower_range_limit) // num_processes) for i in range(num_processes)]
random.shuffle(chunks)
for chunk in chunks: lower, upper = chunk find_key_range(lower, upper, target_binary)
sys.stdout.write("\n[+] Key not found in the specified range.\n")
if __name__ == "__main__": main()
|
bc1qdwnxr7s08xwelpjy3cc52rrxg63xsmagv50fa8
|
|
|
alek76
Member
Offline
Activity: 93
Merit: 16
|
|
December 10, 2023, 05:19:30 PM Last edit: December 10, 2023, 05:30:49 PM by alek76 |
|
I am traveling, tomorrow I will post friendly script for your easy work
I checked this script. He's very slow. These scripts are all a waste of time. You need to look towards the GPU, you can increase the speed by 1.5 times if you use spin 32/64, exactly the same as in the GPU kangaroo code. I've already added a loop to the GPU for cheking. Python scripts are kindergarten I found a 32-bit key in 3 seconds.
|
|
|
|
nomachine
Member
Offline
Activity: 506
Merit: 38
|
|
December 10, 2023, 05:27:42 PM |
|
I checked this script. He's very slow. These scripts are all a waste of time. You need to look towards the GPU, you can increase the speed by 1.5 - 2 times if you use spin 32/64, exactly the same as in the GPU kangaroo code. I've already added a loop to the GPU for cheking. Python scripts are kindergarten I agree. But what to do with those who do not have a PC. Digaran runs scripts on the phone. It needs poor man scripts.
|
bc1qdwnxr7s08xwelpjy3cc52rrxg63xsmagv50fa8
|
|
|
alek76
Member
Offline
Activity: 93
Merit: 16
|
|
December 10, 2023, 05:34:50 PM |
|
I checked this script. He's very slow. These scripts are all a waste of time. You need to look towards the GPU, you can increase the speed by 1.5 - 2 times if you use spin 32/64, exactly the same as in the GPU kangaroo code. I've already added a loop to the GPU for cheking. Python scripts are kindergarten I agree. But what to do with those who do not have a PC. Digaran runs scripts on the phone. It needs poor man scripts. Well, of course, I exaggerated this by 2 times But the speed increases significantly in the cycle. Additionally, I removed everything from the GPU except P2PKH.
|
|
|
|
yellowstripes
Newbie
Offline
Activity: 14
Merit: 0
|
|
December 10, 2023, 06:41:25 PM |
|
Has anyone come across the private keys of these two public keys? 02767761d4b43b130134b0fd8348a020c43f4d247a00aa488cb0f6fdb1584a202f 03bd303397e428bf036db49510b70b86d0025f73744b6324a579de16dc591e2056
If yes, Pm me... I shall offer a token of appreciation for this.
|
|
|
|
nomachine
Member
Offline
Activity: 506
Merit: 38
|
|
December 10, 2023, 10:23:10 PM |
|
Has anyone come across the private keys of these two public keys? 02767761d4b43b130134b0fd8348a020c43f4d247a00aa488cb0f6fdb1584a202f 03bd303397e428bf036db49510b70b86d0025f73744b6324a579de16dc591e2056
If yes, Pm me... I shall offer a token of appreciation for this.
Why would anyone do this for addresses with a balance $0.00 ?
|
bc1qdwnxr7s08xwelpjy3cc52rrxg63xsmagv50fa8
|
|
|
yellowstripes
Newbie
Offline
Activity: 14
Merit: 0
|
|
December 10, 2023, 11:17:11 PM |
|
Has anyone come across the private keys of these two public keys? 02767761d4b43b130134b0fd8348a020c43f4d247a00aa488cb0f6fdb1584a202f 03bd303397e428bf036db49510b70b86d0025f73744b6324a579de16dc591e2056
If yes, Pm me... I shall offer a token of appreciation for this.
Oh hey there little one! Do you think we are public key archives? Lol, you have to give us some clues like, the bit range, how did you obtain them? did you subtracted or divided, otherwise there are nearly 2**256 public keys, those 2 could be any of them. And we only accept Bitcoin, no tokens around these woods. 😂
Both of them look familiar, don't know where I have seen them before.🤔 I asked in very polite manner, not too sure why the sarcasm is applied. Nonetheless...The range of the two public keys is 116 bit. If you have come across them, PM me and lets see if you wont get bitcoin as a thank you.
|
|
|
|
mabdlmonem
Jr. Member
Offline
Activity: 37
Merit: 1
|
|
December 10, 2023, 11:57:14 PM |
|
Is there any c# code to make combinations of large list [0 to 100] ?
|
|
|
|
yellowstripes
Newbie
Offline
Activity: 14
Merit: 0
|
|
December 11, 2023, 04:58:06 AM |
|
Has anyone come across the private keys of these two public keys? 02767761d4b43b130134b0fd8348a020c43f4d247a00aa488cb0f6fdb1584a202f 03bd303397e428bf036db49510b70b86d0025f73744b6324a579de16dc591e2056
If yes, Pm me... I shall offer a token of appreciation for this.
Oh hey there little one! Do you think we are public key archives? Lol, you have to give us some clues like, the bit range, how did you obtain them? did you subtracted or divided, otherwise there are nearly 2**256 public keys, those 2 could be any of them. And we only accept Bitcoin, no tokens around these woods. 😂
Both of them look familiar, don't know where I have seen them before.🤔 I asked in very polite manner, not too sure why the sarcasm is applied. Nonetheless...The range of the two public keys is 116 bit. If you have come across them, PM me and lets see if you wont get bitcoin as a thank you. I bolded the (sarcasm, humor), the rest is serious, if you take that as insult, apology.
Yet you haven't given us any clues, how do you know they are in 116 bit range?, please convince us with proof and show us how you know and are sure they exist in 116 bit range. Nevertheless, you can use kangaroo to search for them. Here is the topic on kangaroo. Welcome to the land where, when you walk in, there will be no going back. I appreciate the apology and thank you for the link to Kangaroo.
|
|
|
|
|