Author

Topic: Bitcoin puzzle transaction ~32 BTC prize to who solves it - page 149. (Read 230098 times)

full member
Activity: 1162
Merit: 237
Shooters Shoot...
I think your comments/scripts confuse people more than helps them, IMO.
I thought everyone is a cryptography expert around here, or worked for more than 25 years on EC, if my methods confuses you is because you don't try working only with scalars to penetrate N the group order. If I explain everything step by step, where would be the fun in that? Have you shared anything you could discover by operating over scalars?
Whatever method, equation you can use to get definitive results over scalars, applies to points as well. I have explained how to get meaningful results based on that before. To Alek on a few previous pages, regarding how to get target /1024 for sure.

@mcdouglasx, sorry to hear that, I hope it all goes well God willing. Take care.🤲

Lol, I am not claiming I have discovered anything that isn't already talked about / known on this forum. However, I have not seen anything that you have given, with example, as something new.

One can sit back and sub, add, div, mult, all kind of pubs together, separately, by 100, by 1024, etc. and get a lot of different looking pubs, but it does not show how one is closer to showing a relation or reducing any keys, with 100%.

What meaningful results, with a concrete example, have you given? Not just asking us, "do you see that". Link to a concrete example of anything you have worked out in regards to these puzzles or EC for that matter. Thanks.
member
Activity: 499
Merit: 38
worked for more than 25 years on EC

To better understand the claim and specific experience with elliptic curves, we can ask you about your work, projects, and expertise in this area. This will provide more context and clarity about the 25 years you are referring to.

Can you point us to your published studies? I'm really curious and looking forward reading them.

We are still waiting for your reply from the other day.  Grin
copper member
Activity: 1330
Merit: 899
🖤😏
I think your comments/scripts confuse people more than helps them, IMO.
I thought everyone is a cryptography expert around here, or worked for more than 25 years on EC, if my methods confuses you is because you don't try working only with scalars to penetrate N the group order. If I explain everything step by step, where would be the fun in that? Have you shared anything you could discover by operating over scalars?
Whatever method, equation you can use to get definitive results over scalars, applies to points as well. I have explained how to get meaningful results based on that before. To Alek on a few previous pages, regarding how to get target /1024 for sure.

@mcdouglasx, sorry to hear that, I hope it all goes well God willing. Take care.🤲
jr. member
Activity: 85
Merit: 2
Exactly, this is what I am questioning. According to him, his i9 is getting 4Gkeys brute forcing without pub key....

He said it was from keyhunt, so unless he modified it, its straight brute force as pub key is not available for 66.

You're right. I can achieve a maximum of ~1 Ekeys/s with AMD Ryzen 9 7950X3D, but if I know what public key is.

...deleted...

If I don't know what public key is, the speed cannot be higher than 50 MKey/s. . .

Theoretically it could get closer... If you have a 128 Core Grin
https://www.titancomputers.com/Titan-A475-Dual-AMD-EPYC-Milan-7003-Series-Proce-p/a475.htm

member
Activity: 499
Merit: 38
The same goal, only simplified. Wink
simplified..but you're pulling hashes from all over. this seems like it will take forever to find a match. even with impressive speed. and the peed may be that impressive because its not generating the correct hash values, they dont match the private keys. 0000000000000000000000000000000000000000000000c856c4ca3cb9c8766e
Iteration 133394: Generated hash 04133ae3a72b383457c8116a13a8f6fe12236ced
Private Key Hex: 0000000000000000000000000000000000000000000000c85509b05931fa7e0f
Iteration 133395: Generated hash 5503e52f2f7b052b7f0d06680931e1e5f7dc72bf
Private Key Hex: 0000000000000000000000000000000000000000000000c5783688057c9ff90e
Iteration 133396: Generated hash dea497f05ab93a4cd82c04b7042e8909cb71ed86
Private Key Hex: 00000000000000000000000000000000000000000000002bfa3a7bcb95a6bda1
Iteration 133397: Generated hash 4924746a8c9c8d0de3598cecd6a12005579b4c75
Private Key Hex: 0000000000000000000000000000000000000000000000c8c0e47fd806b23588
Iteration 133398: Generated hash 31c10fc8c9584b7d454e191f7ba046f171ea5ebc
Private Key Hex: 00000000000000000000000000000000000000000000004d1d18f8ba61efb1c9
Iteration 133399: Generated hash b6c3e00fdc24f63f5b9ae43c86ddad3048259c0f


Code:
import os
import hashlib
import ecdsa
# List of target Hash 160 values to search for
target_public_key_hashes = [
    bytes.fromhex('20d45a6a762535700ce9e0b216e31994335db8a5'),
    bytes.fromhex('739437bb3dd6d1983e66629c5f08c70e52769371'),
    bytes.fromhex('e0b8a2baee1b77fc703455f39d51477451fc8cfc'),
    bytes.fromhex('61eb8a50c86b0584bb727dd65bed8d2400d6d5aa'),
    bytes.fromhex('f6f5431d25bbf7b12e8add9af5e3475c44a0a5b8'),
]

min_range = 36893488147419103231 # Puzzle 66
max_range = 2361183241434822606847 # Puzzle 71

while True:
    random_bytes = os.urandom(9)
    initial_bytes = b'\x00' * 23
    full_bytes = initial_bytes + random_bytes
    dec = int.from_bytes(full_bytes, byteorder='big')

    if min_range <= dec <= max_range:
        signing_key = ecdsa.SigningKey.from_string(full_bytes, curve=ecdsa.SECP256k1)
        h160 = hashlib.new('ripemd160', hashlib.sha256(signing_key.get_verifying_key().to_string("compressed")).digest()).digest()
        if h160 in target_public_key_hashes:
            print(f"Found match with hash {h160.hex()}. Decoded value: {dec}")
            target_public_key_hashes.remove(h160)  # Remove the found hash from the list
            if not target_public_key_hashes:
                print("All target hashes found.")
                break


You can filter full_bytes based on a decimal range, a condition to check if the decimal value falls within the specified range. Three more lines of code.  Wink

p.s.
Do not worry. This will last forever (on home computers) no matter what we invent.  Grin
newbie
Activity: 17
Merit: 0
The same goal, only simplified. Wink
simplified..but you're pulling hashes from all over. this seems like it will take forever to find a match. even with impressive speed. 0000000000000000000000000000000000000000000000c856c4ca3cb9c8766e
Iteration 133394: Generated hash 04133ae3a72b383457c8116a13a8f6fe12236ced
Private Key Hex: 0000000000000000000000000000000000000000000000c85509b05931fa7e0f
Iteration 133395: Generated hash 5503e52f2f7b052b7f0d06680931e1e5f7dc72bf
Private Key Hex: 0000000000000000000000000000000000000000000000c5783688057c9ff90e
Iteration 133396: Generated hash dea497f05ab93a4cd82c04b7042e8909cb71ed86
Private Key Hex: 00000000000000000000000000000000000000000000002bfa3a7bcb95a6bda1
Iteration 133397: Generated hash 4924746a8c9c8d0de3598cecd6a12005579b4c75
Private Key Hex: 0000000000000000000000000000000000000000000000c8c0e47fd806b23588
Iteration 133398: Generated hash 31c10fc8c9584b7d454e191f7ba046f171ea5ebc
Private Key Hex: 00000000000000000000000000000000000000000000004d1d18f8ba61efb1c9
Iteration 133399: Generated hash b6c3e00fdc24f63f5b9ae43c86ddad3048259c0f
member
Activity: 239
Merit: 53
New ideas will be criticized and then admired.

Hello, is this what you need?
Hi, it's close but not so much, here is the logic:

Target = 3487790154155768 now if we subtract 99 G from it, on our 68th subtraction we will land on 3487790154155700, then we can divide it by 100, to get 34877901541557 now with this new key our 57th subtraction lands on  34877901541500 , then we divide it by 100 to get 348779015415 , but since we don't know which key is what, we would consider our target as 100 then by subtracting G 99 times from it, we will have 100 keys, 1, 2, 3, 4, ...........100. We divide and index them in order, like:
Target(100)/100 = 100/100, 99(which is -1 of our target)/100, 98/100, 97/100. We don't save them all, we just specify that we want our target to be divided by 100 for 30 times in a *row and it keeps doing that.

We just need to divide our key by 100, for 2 or 3 times as a test.

I understand your logic, it seems like a very good idea. I'll put myself into it to clear my mind, I've been very busy because my mother has health problems and I've been working on other things, but on paper your proposal is interesting

Edit: you will need 100^20, It would be just like going through the entire range.
member
Activity: 499
Merit: 38
He said it was from keyhunt, so unless he modified it, its straight brute force as pub key is not available for 66.

You're right. I can achieve a maximum of ~1 Ekeys/s with AMD Ryzen 9 7950X3D, but if I know what public key is.

  • Version 0.2.230519 Satoshi Quest, developed by AlbertoBSD
  • Random mode
  • K factor 512
  • Search compress only
  • Endomorphism enabled
  • Threads : 16
  • Stats output every 20 seconds
  • Quiet thread output
  • Mode BSGS random
  • Opening file tests/130.txt
  • Added 1 points from file
  • Bit Range 130
  • -- from : 0x200000000000000000000000000000000
  • -- to   : 0x400000000000000000000000000000000
  • N = 0x400000000000
  • Bloom filter for 4294967296 elements : 14722.65 MB
  • Bloom filter for 134217728 elements : 460.08 MB
  • Bloom filter for 4194304 elements : 14.38 MB
  • Allocating 64.00 MB for 4194304 bP Points
  • Reading bloom filter from file keyhunt_bsgs_4_4294967296.blm .... Done!
  • Reading bloom filter from file keyhunt_bsgs_6_134217728.blm .... Done!
  • Reading bP Table from file keyhunt_bsgs_2_4194304.tbl .... Done!
  • Reading bloom filter from file keyhunt_bsgs_7_4194304.blm .... Done!
  • Total 22924448003222667264 keys in 20 seconds: ~1 Ekeys/s (1146222400161133363 keys/s)

I just modified the Makefile to have -msse4.2 .
If I don't know what public key is, the speed cannot be higher than 50 MKey/s. . .

Theoretically it could get closer... If you have a 128 Core Grin
https://www.titancomputers.com/Titan-A475-Dual-AMD-EPYC-Milan-7003-Series-Proce-p/a475.htm
jr. member
Activity: 85
Merit: 2
He said it was from keyhunt, so unless he modified it, its straight brute force as pub key is not available for 66.

QUOTE:
"CPU (keyhunt)
Total 50247107966976 keys in 10095 seconds: ~4 Gkeys/s (4977425256 keys/s)

GPU (bitcrack)
NVIDIA GeForce R / 24217MB | 1 target 3307.00 MKey/s (11,423,035,949,056 total) [00:56:47]"

How is that i9 able to outperform the 4090 in straight brute forcing?

It depends on what the script calculates and how it calculates.
Are only compressed keys counted or all together? Is it a key or a hash?
Which parameters do you use in one script and which in the other? (user input)*
You can practice in Python to see how counting works.
...deleted...

Let's say in raw Python you can achieve about 3.98 MHash/s on 12 cores

  • Fri Oct 27 10:06:46 2023
  • Puzzle = 66
  • Ending characters missing: 18
  • Public Key Hash (Hash 160): 20d45a6a762535700ce9e0b216e31994335db8a5
  • Hashes per second: 3.98 MHash/s

In the same Python with the kangaroo algorithm I have about 50 MKeys/s (if you count jumps)


In C++ everything is 10 or 100 times more (if is GPU).

What exactly is counted depends on which algorithm was used  and how is used. Grin

*It even depends on how it is compiled for which platform - for example: AMD Ryzen 9 7950X3D
Code:
gcc -Q -march=native --help=target | grep -E '^\s+-.*(sse|march)'

g++ -m64 -march=native -mtune=native -msse4.2 -pthread -O3 -I. -o ...etc...

The presence of SSE4.1 and SSE4.2 instruction sets can be particularly beneficial for cryptographic operations, as they include instructions that can accelerate certain mathematical operations required for SECPK1 calculations.
You can experiment with these flags for cryptographic workloads.

Effectiveness of this flag depends on the specific algorithms and code you are working with. It's a good practice to benchmark code with and without the flag. Wink
member
Activity: 499
Merit: 38
hows this one? ready for some fun?  Roll Eyes THIS ONE SCRIPT IS SEARCHING FOR PUZZLES 66 -71 from a single hex which is 20000000000000000...2ffffffffffffffff. I can also adjust the step size.

Code:
import os, random, secrets, hashlib, ecdsa

# List of target Hash 160 values to search for
target_public_key_hashes = [
    bytes.fromhex('20d45a6a762535700ce9e0b216e31994335db8a5'),
    bytes.fromhex('739437bb3dd6d1983e66629c5f08c70e52769371'),
    bytes.fromhex('e0b8a2baee1b77fc703455f39d51477451fc8cfc'),
    bytes.fromhex('61eb8a50c86b0584bb727dd65bed8d2400d6d5aa'),
    bytes.fromhex('f6f5431d25bbf7b12e8add9af5e3475c44a0a5b8'),
]

while True:
    dec = secrets.SystemRandom().randrange(36893488147419103231, 2361183241434822606847)
    private_key_bytes = (b'\x00' * 32)[:-len(dec.to_bytes((dec.bit_length() + 7) // 8, 'big'))] + dec.to_bytes((dec.bit_length() + 7) // 8, 'big')
    signing_key = ecdsa.SigningKey.from_string(private_key_bytes, curve=ecdsa.SECP256k1)
    h160 = hashlib.new('ripemd160', hashlib.sha256(signing_key.get_verifying_key().to_string("compressed")).digest()).digest()   
    if h160 in target_public_key_hashes:
        dec = int.from_bytes(full_bytes, byteorder='big')
        print(f"Found match with hash {h160.hex()}. Decoded value: {dec}")
        target_public_key_hashes.remove(h160)  # Remove the found hash from the list
        if not target_public_key_hashes:
            print("All target hashes found.")
            break

The same goal, only simplified. Wink
full member
Activity: 1162
Merit: 237
Shooters Shoot...
newbie
Activity: 17
Merit: 0
Code:
import subprocess
import time
import os
from decimal import Decimal
import base58
import hashlib
import ecdsa

# Function to clear the terminal screen
def clear_terminal():
    subprocess.call('clear', shell=True)

# Function to calculate the Hash 160 of a public key
def calculate_public_key_hash(public_key):
    sha256_hash = hashlib.sha256(public_key).digest()
    ripemd160_hash = hashlib.new('ripemd160')
    ripemd160_hash.update(sha256_hash)
    return ripemd160_hash.digest()

# Function to convert a decimal number to a private key in hexadecimal format
def decimal_to_private_key_hex(decimal_number):
    private_key_bytes = int(decimal_number).to_bytes(32, byteorder='big')
    private_key_hex = private_key_bytes.hex()
    private_key_hex_flipped = private_key_hex.replace('2', '3', 2)
    return private_key_hex, private_key_hex_flipped

# Function to check if a target Hash 160 is found
def check_target_hash(public_key_hash, decimal_number, private_key_hex):
    if public_key_hash in target_public_key_hashes:
        target_hashes_found.append(public_key_hash)
        print(f"Target Hash 160 found: {public_key_hash.hex()}")
        print(f"Decimal Number: {decimal_number}")
        print(f"Private Key Hex: {private_key_hex}")

        # Write the found Hash 160 to the file found_addresses.txt
        with open("found_addresses.txt", "a") as found_file:
            found_file.write(f"Target Hash 160 found: {public_key_hash.hex()}\n")
            found_file.write(f"Decimal Number: {decimal_number}\n")
            found_file.write(f"Private Key Hex: {private_key_hex}\n\n")
            found_file.flush()  # Flush the buffer to ensure data is written immediately

        return True
    return False

# List of target Hash 160 values to search for
target_public_key_hashes = [
    bytes.fromhex('20d45a6a762535700ce9e0b216e31994335db8a5'),
    bytes.fromhex('739437bb3dd6d1983e66629c5f08c70e52769371'),
    bytes.fromhex('e0b8a2baee1b77fc703455f39d51477451fc8cfc'),
    bytes.fromhex('61eb8a50c86b0584bb727dd65bed8d2400d6d5aa'),
    bytes.fromhex('f6f5431d25bbf7b12e8add9af5e3475c44a0a5b8'),


]

target_hashes_found = []

# Define the lower and upper bounds for the decimal number search range
lower_bound = Decimal('37000000000000000000')
upper_bound = Decimal('55340232221128654832')

# List of additional hex numbers to modify the decimal number
additional_hex_numbers = ['3','4','5','6','7','8', '9', 'a', 'b', 'c', 'd', 'e', 'f','10','11','12','13','14','15','16','17','18','19','1a', '1b', '1c','1d', '1e', '1f'
,'40','41','42','43','44','45','46','47','48','49','4a', '4b', '4c','4d', '4e', '4f' ,'50','51','52','53','54','55','56','57','58','59','5a', '5b', '5c','5d', '5e', '5f' ,'60','61','62','63','64','65','66','67','68','69','6a', '6b', '6c','6d', '6e', '6f' ,'70','71','72','73','74','75','76','77','78','79','7a', '7b', '7c','7d', '7e', '7f' ]

# Initialize time and iteration tracking variables
start_time = time.time()
total_iterations = 0

# Function to search for target Hash 160 values within a specified range
def search_decimal_range(decimal_number, upper_bound):
    global total_iterations  # Use the global variable
    iterations = 0
    update_interval = 1
    step_size = 10000000000000000  # Initial step size

    while decimal_number <= upper_bound:
        private_key_hex, flipped_private_key_hex = decimal_to_private_key_hex(decimal_number)
        private_key = int(decimal_number).to_bytes(32, byteorder='big')
        signing_key = ecdsa.SigningKey.from_string(private_key, curve=ecdsa.SECP256k1, hashfunc=hashlib.sha256)
        verifying_key = signing_key.verifying_key
        public_key = verifying_key.to_string("compressed")
        public_key_hash = calculate_public_key_hash(public_key)

        if check_target_hash(public_key_hash, decimal_number, private_key_hex):
            return True  # Stop the loop if a match is found

        found_match = False

        additional_hashes = []
        for hex_number in additional_hex_numbers:
            modified_decimal_number = int(hex(int(decimal_number))[2:].replace('2', hex_number, 1), 16)
            modified_private_key_hex, _ = decimal_to_private_key_hex(modified_decimal_number)
            modified_private_key = int(modified_decimal_number).to_bytes(32, byteorder='big')
            modified_signing_key = ecdsa.SigningKey.from_string(modified_private_key, curve=ecdsa.SECP256k1, hashfunc=hashlib.sha256)
            modified_verifying_key = modified_signing_key.verifying_key
            modified_public_key = modified_verifying_key.to_string("compressed")
            modified_hash = calculate_public_key_hash(modified_public_key)
            additional_hashes.append(modified_hash)

            if check_target_hash(modified_hash, modified_decimal_number, modified_private_key_hex):
                found_match = True
                break

        if found_match:
            return True

        if len(target_hashes_found) == len(target_public_key_hashes):
            return True

        if iterations % update_interval == 0:
            elapsed_time = time.time() - start_time
            iterations_per_second = iterations / elapsed_time
            print(f"Reached {iterations} iterations.")
            print(f"Elapsed Time: {elapsed_time:.2f} seconds")
            print(f"Iterations per Second: {iterations_per_second:.2f}")
            print(f"Decimal Number: {decimal_number}")
            print(f"Private Key Hex: {private_key_hex}")
            print(f"Target Hash 160: {public_key_hash.hex()}")
            print(f"Target Decimal Number: {decimal_number}")
            if target_hashes_found:
                print_hashes_side_by_side(target_hashes_found[-1], decimal_number, private_key_hex, additional_hashes)
            print("\n")

        decimal_number += step_size  # Increase the decimal number by the current step size
        iterations += 1

        # Adjust the step size dynamically based on the search space
        if iterations % 1000 == 0:
            step_size *= 2  # Double the step size every 1 million iterations

# Function to print the target Hash 160 and additional Hash 160 values side by side
def print_hashes_side_by_side(target_hash, decimal_number, private_key_hex, additional_hashes):
    print(f"Decimal Number: {decimal_number}")
    print(f"Target Hash 160: {target_hash.hex()}")
    print(f"Private Key Hex: {private_key_hex}")
    print(f"Target Decimal Number: {decimal_number}")
    for i, hash in enumerate(additional_hashes):
        print(f" ({additional_hex_numbers[i]}): {hash.hex()}")
    print("\n")

# Function to continuously search for target Hash 160 values in the specified range
def continuous_search(lower_bound, upper_bound):
    global total_iterations, start_time  # Use the global variables
    current_decimal = lower_bound

    while True:
        elapsed_time = time.time() - start_time
        total_iterations += 1

        if search_decimal_range(current_decimal, upper_bound):
            print("All target Hash 160 values found. Restarting search...")
            time.sleep(0)  # Optional: Add a delay before restarting the search
            current_decimal = lower_bound  # Reset the current_decimal to the lower_bound
        else:
            current_decimal += 1484585542367  # Increment by 1

# Start the continuous search
while True:
    continuous_search(lower_bound, upper_bound)

# Add sound notification when the script completes
print("Glass sound (indicating script completion)")
subprocess.run(["afplay", "/System/Library/Sounds/glass.aiff"])


hows this one? ready for some fun?  Roll Eyes THIS ONE SCRIPT IS SEARCHING FOR PUZZLES 66 -71 from a single hex which is 20000000000000000...2ffffffffffffffff. I can also adjust the step size.
full member
Activity: 1162
Merit: 237
Shooters Shoot...
Quote
You know about point torsion? It subtracts 1 from target then divides either by 2 or anything you want, but we want similar code to subtract whatever we want, keeps all the subtracted keys, does the division and repeat the same with the results, in this *way when we work with scalar instead of points, we can observe and learn by tweaking our values step by step. That's how you learn, by studying the small details.

Lol, torsion. I know your "torsion".

I still do not know what you hope to learn versus running a script that divides a pub by x and stores results in a file, then rinse and repeat for other pubs that are related to the first pub.
Again, to me, your way is causing oneself confusion to keep track of everything.

And you have not given one example of what you have learned by all of your scripts or how it helps in reducing ranges/pubs. I think your comments/scripts confuse people more than helps them, IMO.
copper member
Activity: 1330
Merit: 899
🖤😏

Not sure what doing it that way would do, except cause confusion lol.
You know about point torsion? It subtracts 1 from target then divides either by 2 or anything you want, but we want similar code to subtract whatever we want, keeps all the subtracted keys, does the division and repeat the same with the results, in this *way when we work with scalar instead of points, we can observe and learn by tweaking our values step by step. That's how you learn, by studying the small details.


I just used my double point torsion script and it seems it doesn't work the way I wanted, that's why I tried to save the results of that script to separate files and use another script to subtract the results in the files.

One other thing, I thought if we multiply by n/4 -2 , 3, 4 or by  n/4 + 2, 3, 4 we could get for example target.75 or 1/75, or 1/25 of our target, I haven't tried it yet on scalar, but I know for sure that if you multiply by n/2 +2 you would get 1/5 or one and half of your target 1.5, then imagine dividing that by 2, you'd get 0.75 of target, then multiply that by 3 to get 2.25 of target, 2.25/2 = 1.125, then you could continue that and see what happens in scalar. You could find patterns that way.

I might cause some confusion sometimes, it's for the best, as hyenas are lurking around the corner.😉

Edit, I'm not sure if I have shared the 2 point torsion subtraction script before, it's useless. Ignore it.😅
*= 5 w in a row. Lol

Second edit : (hey Joe mentality mode activated, lol)

Anyone has any idea how to make this thing find lambda and beta quick? With small values it says there is no result very fast and for large values of P and N, it takes forever without any results. This is beyond my pay grade to handle properly, and AI, well this is the product of asking AI for help. 😂
Code:
import random
from math import isqrt

def find_lambda_beta(n: int, p: int) -> tuple[int, int]:
    # Check if n and p are valid inputs
    if not (is_prime(n) and is_prime(p)):
        raise ValueError("n and p must be prime numbers")
    if n <= 2 or p <= 2:
        raise ValueError("n and p must be greater than 2")

    # Find prime factors of n and p
    factors_n = prime_factors(n)
    factors_p = prime_factors(p)

    # Choose two different prime factors q, m of n and p, respectively
    found = False
    while not found:
        q = random.choice(factors_n)
        m = random.choice(factors_p)
        if q != m:
            found = True

    # Find a primitive root of 1 modulo q
    a = find_primitive_root(q)

    # Compute the cube root of 1 modulo q
    k = pow(a, (q-1)//3, q)

    # Find a primitive root of 1 modulo m
    b = find_primitive_root(m)

    # Compute lambda as the cube root of 1 modulo m
    lam = pow(b, (m-1)//3, m)

    # Check which cube root of 1 modulo q matches lambda
    match_found = False
    for c in [2, 3]:
        if pow(lam, c, q) == k:
            beta = pow(k, ((q-1)//3 * (m-1)//2) % (p-1), p)
            match_found = True
            break

    if match_found:
        return lam, beta
    else:
        raise ValueError("No solutions found")

def is_prime(n: int) -> bool:
    if n <= 3:
        return n > 1
    elif n % 2 == 0 or n % 3 == 0:
        return False
    else:
        i = 5
        while i*i <= n:
            if n % i == 0 or n % (i+2) == 0:
                return False
            i += 6
        return True

def prime_factors(n: int) -> list[int]:
    factors = []
    while n % 2 == 0:
        factors.append(2)
        n //= 2
    for i in range(3, isqrt(n) + 1, 2):
        while n % i == 0:
            factors.append(i)
            n //= i
    if n > 2:
        factors.append(n)
    return factors

def find_primitive_root(p: int) -> int:
    if not is_prime(p):
        raise ValueError("p must be a prime number")

    phi = p-1
    factors = prime_factors(phi)
    for r in range(2, p):
        is_primitive = True
        for factor in factors:
            if pow(r, phi//factor, p) == 1:
                is_primitive = False
                break
        if is_primitive:
            return r

    raise ValueError("Cannot find primitive root")

# Example usage:
n = 0xd82254710ec6131d
p = 0xa4dd92ac1ff9dd0f
lam, beta = find_lambda_beta(n, p)
print("Lambda:", lam)
print("Beta:", beta)
member
Activity: 499
Merit: 38
How is that i9 able to outperform the 4090 in straight brute forcing?

It depends on what the script calculates and how it calculates.
Are only compressed keys counted or all together? Is it a key or a hash?
Which parameters do you use in one script and which in the other? (user input)*
You can practice in Python to see how counting works.

Code:
import sys, os, time, secrets, multiprocessing, random
import binascii, base58, hashlib, ecdsa

def generate_private_key_WIF(start, miss):
    characters = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
    return start + "".join(secrets.choice(characters) for _ in range(miss))

def format_hash_rate(hash_rate):
    suffixes = ["", "k", "M", "G", "T", "P"]

    magnitude = 0
    while hash_rate >= 1000 and magnitude < len(suffixes) - 1:
        hash_rate /= 1000.0
        magnitude += 1

    return f"{hash_rate:.2f} {suffixes[magnitude]}Hash/s"

def check_private_key(start, miss, target_binary, min_range, max_range):
    while not STOP_EVENT.is_set():
        private_key_WIF = generate_private_key_WIF(start, miss)
        dec = int(binascii.hexlify(base58.b58decode(private_key_WIF))[2:-10].decode("utf-8")[0:64], 16)
        if min_range <= dec <= max_range:
            private_key_bytes = (b'\x00' * 32)[:-len(dec.to_bytes((dec.bit_length() + 7) // 8, 'big'))] + dec.to_bytes((dec.bit_length() + 7) // 8, 'big')
            signing_key = ecdsa.SigningKey.from_string(private_key_bytes, curve=ecdsa.SECP256k1)
            HASH160 = hashlib.new('ripemd160', hashlib.sha256(signing_key.get_verifying_key().to_string("compressed")).digest()).digest()

            hashes_per_second = 0
            target_hash_count = 1000000  # You can adjust this to your desired count
            start_time = time.time()

            while hashes_per_second < target_hash_count:
                HASH160.hex()
                hashes_per_second += 1

            end_time = time.time()
            elapsed_time = end_time - start_time
            hashes_per_second = target_hash_count / elapsed_time

            formatted_hash_rate = format_hash_rate(hashes_per_second)

            message = "\r[+] Hashes per second: {}".format(formatted_hash_rate)
            messages = []
            messages.append(message)
            output = "\033[01;33m" + ''.join(messages) + "\r"
            sys.stdout.write(output)

            if HASH160 == target_binary:
                dec_to_hex = hex(dec).split('x')[-1]
                HASH160_wif = base58.b58encode(b'\x80' + private_key_bytes + b'\x01' + hashlib.sha256(hashlib.sha256(b'\x80' + private_key_bytes + b'\x01').digest()).digest()[:4]).decode()
                bitcoin_address = base58.b58encode(b'\x00' + HASH160 + hashlib.sha256(hashlib.sha256(b'\x00' + HASH160).digest()).digest()[:4]).decode()
                t = time.ctime()
                sys.stdout.write(f"\033[0m\n\n")
                sys.stdout.write(f"[+] SOLVED:    |\033[32m {t}                                                                  \033[0m\n")
                sys.stdout.write(f"[+] Key Found: |\033[32m {dec_to_hex}                                                \033[0m\n"
                                 f"[+] WIF:       |\033[32m {HASH160_wif}                                                  \033[0m\n"
                                 f"[+] Address:   |\033[32m {bitcoin_address}                                           \033[0m")
                sys.stdout.flush()

                with open("KEYFOUNDKEYFOUND.txt", "a") as f:
                    f.write("SOLVED: " + str(t) + '\n' + "HEX: " + str(dec_to_hex) + '\n' + "WIF: " + str(HASH160_wif) + '\n' + "Address: " + str(bitcoin_address) + '\n\n')
                    f.flush()
                    f.close()

                STOP_EVENT.set()
                sys.stdout.write("\033[?25h")
                sys.stdout.flush()
                return

if __name__ == '__main__':
    start = "KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qZ"
    miss = 52 - (len(start))
    min_range = 36893488147419103231
    max_range = 73786976294838206463
    target_hex = "20d45a6a762535700ce9e0b216e31994335db8a5"
    target_binary = bytes.fromhex(target_hex)
    puzzle = 0
    while max_range >= 2 ** puzzle:
        puzzle += 1
    if min_range <= (2 ** puzzle) - 1:
        puzzle = puzzle

    STOP_EVENT = multiprocessing.Event()
    num_processes = multiprocessing.cpu_count()

    os.system("clear")
    t = time.ctime()
    sys.stdout.write(f"\033[01;33m[+] {t}\n")
    sys.stdout.write(f"\033[01;33m[+] Puzzle = {puzzle}\n")
    sys.stdout.write(f"\033[01;33m[+] Ending characters missing: {miss}\n")
    sys.stdout.write(f"\033[01;33m[+] Public Key Hash (Hash 160): {target_hex}\n")
    sys.stdout.flush()

    pool = multiprocessing.Pool(processes=num_processes)

    for i in range(num_processes):
        pool.apply_async(check_private_key, args=(start, miss, target_binary, min_range, max_range))

    pool.close()
    pool.join()


Let's say in raw Python you can achieve about 3.98 MHash/s on 12 cores

  • Fri Oct 27 10:06:46 2023
  • Puzzle = 66
  • Ending characters missing: 18
  • Public Key Hash (Hash 160): 20d45a6a762535700ce9e0b216e31994335db8a5
  • Hashes per second: 3.98 MHash/s

In the same Python with the kangaroo algorithm I have about 50 MKeys/s (if you count jumps)


In C++ everything is 10 or 100 times more (if is GPU).

What exactly is counted depends on which algorithm was used  and how is used. Grin

*It even depends on how it is compiled for which platform - for example: AMD Ryzen 9 7950X3D
Code:
gcc -Q -march=native --help=target | grep -E '^\s+-.*(sse|march)'

g++ -m64 -march=native -mtune=native -msse4.2 -pthread -O3 -I. -o ...etc...

The presence of SSE4.1 and SSE4.2 instruction sets can be particularly beneficial for cryptographic operations, as they include instructions that can accelerate certain mathematical operations required for SECPK1 calculations.
You can experiment with these flags for cryptographic workloads.

Effectiveness of this flag depends on the specific algorithms and code you are working with. It's a good practice to benchmark code with and without the flag. Wink
member
Activity: 122
Merit: 11
Luck + Fun + Polishing and 6.6 BTC is mine  Grin

... or you will burn your GPU and don't find anything anyway.

There are people here that have access to server farms and multi GPU miners. If they didn't found it till now it means that method is pointless.

And remember that comparing bitcrack speed and keyhunt speed is pointless.
full member
Activity: 1162
Merit: 237
Shooters Shoot...

Hello, is this what you need?
Hi, it's close but not so much, here is the logic:

Target = 3487790154155768 now if we subtract 99 G from it, on our 68th subtraction we will land on 3487790154155700, then we can divide it by 100, to get 34877901541557 now with this new key our 57th subtraction lands on  34877901541500 , then we divide it by 100 to get 348779015415 , but since we don't know which key is what, we would consider our target as 100 then by subtracting G 99 times from it, we will have 100 keys, 1, 2, 3, 4, ...........100. We divide and index them in order, like:
Target(100)/100 = 100/100, 99(which is -1 of our target)/100, 98/100, 97/100. We don't save them all, we just specify that we want our target to be divided by 100 for 30 times in a *row and it keeps doing that.

We just need to divide our key by 100, for 2 or 3 times as a test.

*= lol, I didn't calculate RAM needed for such exponentially large number.


How is that i9 able to outperform the 4090 in straight brute forcing?
By polishing.😉


Why would you do this?

Just divide by the total number from the beginning and let the program subtract then divide.

Not sure what doing it that way would do, except cause confusion lol.
copper member
Activity: 1330
Merit: 899
🖤😏

Hello, is this what you need?
Hi, it's close but not so much, here is the logic:

Target = 3487790154155768 now if we subtract 99 G from it, on our 68th subtraction we will land on 3487790154155700, then we can divide it by 100, to get 34877901541557 now with this new key our 57th subtraction lands on  34877901541500 , then we divide it by 100 to get 348779015415 , but since we don't know which key is what, we would consider our target as 100 then by subtracting G 99 times from it, we will have 100 keys, 1, 2, 3, 4, ...........100. We divide and index them in order, like:
Target(100)/100 = 100/100, 99(which is -1 of our target)/100, 98/100, 97/100. We don't save them all, we just specify that we want our target to be divided by 100 for 30 times in a *row and it keeps doing that.

We just need to divide our key by 100, for 2 or 3 times as a test.

*= lol, I didn't calculate RAM needed for such exponentially large number.


How is that i9 able to outperform the 4090 in straight brute forcing?
By polishing.😉
jr. member
Activity: 85
Merit: 2
How is that i9 able to outperform the 4090 in straight brute forcing?


Hello folks!

I've just got a new PC (latest i9 + 4090) and allocated it full-time for #66 just ~1h ago  Grin
Set it up in complete random mode (keyhunt & bitcrack) and it randomeforces #66 with the following pace:

CPU (keyhunt)
Total 50247107966976 keys in 10095 seconds: ~4 Gkeys/s (4977425256 keys/s)

GPU (bitcrack)
NVIDIA GeForce R / 24217MB | 1 target 3307.00 MKey/s (11,423,035,949,056 total) [00:56:47]

Here is my plan: gonna polish and tune up these scripts to get more performance out of it. As soon as I reach the ceil, I'll start looking into the algo part) Gonna be fun)

Luck + Fun + Polishing and 6.6 BTC is mine  Grin
newbie
Activity: 3
Merit: 0
Hello folks!

I've just got a new PC (latest i9 + 4090) and allocated it full-time for #66 just ~1h ago  Grin
Set it up in complete random mode (keyhunt & bitcrack) and it randomeforces #66 with the following pace:

CPU (keyhunt)
Total 50247107966976 keys in 10095 seconds: ~4 Gkeys/s (4977425256 keys/s)

GPU (bitcrack)
NVIDIA GeForce R / 24217MB | 1 target 3307.00 MKey/s (11,423,035,949,056 total) [00:56:47]

Here is my plan: gonna polish and tune up these scripts to get more performance out of it. As soon as I reach the ceil, I'll start looking into the algo part) Gonna be fun)

Luck + Fun + Polishing and 6.6 BTC is mine  Grin
Jump to: