Author

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

member
Activity: 499
Merit: 38
copper member
Activity: 1330
Merit: 899
🖤😏
can anyone kindly provide an example of public key subtraction code in python ?
Try this one.
Code:
import secp256k1 as ice

target_public_key = "032f3342152eff6aca5e7314db6d3301a28d6a90ddcfd189f96babadc2a053d392"
target = ice.pub2upub(target_public_key)
num = 1000  # number of times.
subtract = 1  # amount to subtract each time.

# Define the new generator point coordinates
new_generator = (new_x_coordinate, new_y_coordinate)  # Replace with actual coordinates

sustract_pub_new = ice.scalar_multiplication(subtract, new_generator)
res = ice.point_loop_subtraction(num, target, subtract_pub_new)

for t in range(num + 1):
    h = (res[t * 65:t * 65 + 65]).hex()
    hc = ice.to_cpub(h)
    data = open("data-base.txt", "a")
    data.write(str(hc) + "\n")
    data.close()

This will subtract 1G 1000 times from target, meaning if target is 2000, it will give you 1999, 1998, 1997... etc.
newbie
Activity: 30
Merit: 0


it does not work under windows, if you do not use the WSL subsystem
newbie
Activity: 21
Merit: 0
can anyone kindly provide an example of public key subtraction code in python ?
jr. member
Activity: 76
Merit: 4
jr. member
Activity: 64
Merit: 1
34Sf4DnMt3z6XKKoWmZRw2nGyfGkDgNJZZ
newbie
Activity: 30
Merit: 0
@nomachine - for another puzzle, do I need to change anything in the script other than keyrange and pubkey? Why am I asking you? Because, in order to test, I put the public key from #64 and a very small keyrange, between f7051f26b09112d4 and f7051f2ab09112d4 (17799667353283269332:17799667370463138516) and it is obvious that the search is done outside the keyrange, in decimal, from 10000000000000000000 to 29999999999999999999 or even greater.

https://www.talkimg.com/images/2023/10/16/RrO2l.gif
copper member
Activity: 1330
Merit: 899
🖤😏
Code:
import gmpy2 as mpz
from gmpy2 import powmod

# Define the ec_operations function
def ec_operations(start_range, end_range, scalar_1, scalar_2, n, divide_1_by_odd=True, divide_1_by_even=True, divide_2_by_odd=True, divide_2_by_even=True):
    for i in range(start_range + (start_range%2), end_range, 2):
        # divide scalar 1 by odd or even numbers
        if i%2 == 0 and not divide_1_by_even:
            continue
        elif i%2 == 1 and not divide_1_by_odd:
            continue
        try:
            # calculate inverse modulo of i
            i_inv = powmod(i, n-2, n)

            # multiply the scalar targets by i modulo n
            result_1 = scalar_2 * i_inv % n
            result_2 = scalar_1 * i_inv % n

            # divide scalar 2 by odd or even numbers
            if i%2 == 0 and not divide_2_by_even:
                continue
            elif i%2 == 1 and not divide_2_by_odd:
                continue

            # subtract the results
            sub_result = (result_2 - result_1) % n

            # print results separately
            (f"{hex(result_1)[2:]}")
            (f"{hex(result_2)[2:]}")
            print(f"{i}-{hex(sub_result)[2:]}")

        except ZeroDivisionError:
            pass


if __name__ == "__main__":
    # Set the targets and range for the operations
    scalar_1 = 0x000000000000000000000000000000000000000af55fc59c335c8ec67e66df97
    scalar_2 = 0x000000000000000000000000000000000000000af55fc59c335c8ec67e66df8b

    n = mpz.mpz("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141")

    start_range = 2
    end_range = 257

    ec_operations(start_range, end_range, scalar_1, scalar_2, n)

I always wondered when I work with target +1, 2, 3 etc what would be the results, so now I need to wonder no more. There are some interesting results when we start adding to our target and then divide.

In the script above, if you start by scalar_1 +1 without changing scalar_2, running the script and only look at keys similar to n/2, n/4, n/6 etc, then keep adding to scalar_1 and run again to see where those n/? values  appear.

Note that when we don't know the actual 2 targets, we can always know the resulting keys, but when we change one target with a known key, then knowing the resulting keys would solve the key for us, that's what is needed, however there are ways and tricks to hit one previously unknown key in one of the new results if we keep changing our known key at scalar_1 or 2.


Something to work with.
Let scalar_1 be :  0x000000000000000000000000000000000000000af55fc59c335c8ec67e66df8b
Subtract this from it :  af00000000000000000000000
Result: put at scalar_2
0x0000000000000000000000000000000000000000055fc59c335c8ec67e66df8b

Now run and see the results, you will see  af00000000000000000000000  being divided, so whatever we subtract from our target ( scalar_1 ), the results of script above will show us that number being divided even if we don't know it's key.

Now since we can always know the resulting keys as long as the 2 targets are unknown and we already know the distance between them, but now I'm interested to find out more.

Example:

Subtracting this from puzzle 130,
0000000000000000000000000000000400000000000000000000000000000000
Result: (offset1)
0308360beeb0177961b04eccc33decdf63e23d205abc8ef6355d659d1313459ba7
Subtracting above from #130, result : (offset2)
0283aac9d18b994b94c0d267921573958682a061d033e89d2b0c4614c760755e60

Now what if we use offset1 and offset2 as our targets and do the divide and sub like the script above? If we could find a known key in the results, we can solve #130, or any private key. 😉


Chop chop, don't just stare and forget, also remember when you find the solution to solve any key, if you like your head to stay on your shoulders, hands off the people's coins. ey 😉
newbie
Activity: 30
Merit: 0
..........
You can also setup smaller range in the frame in this mammoth
Code:
# Configuration for the puzzle
puzzle = 130
compressed_public_key = "03633cbe3ec02b9401c5effa144c5b4d22f87940259634858fc7e59b1c09937852"  # Puzzle 130  
lower_range_limit =   680564733841876926926749214863536422911    #2 ** (puzzle - 1)
upper_range_limit =  738823525229305890094942779208630272000    #(2 ** puzzle) - 1
...........

@nomachine ... the first time I tried to see if it works for me, now I changed the search range and the constant prefix of the seed.
Thank's

https://www.talkimg.com/images/2023/10/14/RkTR9.gif
jr. member
Activity: 75
Merit: 5
@Zahid888 and @nomachine and all other seed lovers, I have something for you.  https://www.bleepingcomputer.com/news/security/bounty-offered-for-secret-nsa-seeds-behind-nist-elliptic-curves-algo/
You guys are really talented and I'm sure you can come up with a script to brute force those seeds, don't forget to share the script.😉
that will not even be the case but the bounty alone is worth it if it would be paid in cryptocurrency but is the resources investment going to be covered with profits made afterwards? that is the real question here
newbie
Activity: 26
Merit: 0
hi, can anyone install the KeyHunt-Cuda strid?
newbie
Activity: 25
Merit: 0
@nomachine
Your #130 lotto script works very easily, gonna leave it running on one of my pcs 24/7!
I reckon:
  • [Lower range limit]: 1063382396627932698323045648224275660800
  • [Upper range limit]: 1334544907768055536395422288521465954303
copper member
Activity: 1330
Merit: 899
🖤😏
@Zahid888 and @nomachine and all other seed lovers, I have something for you.  https://www.bleepingcomputer.com/news/security/bounty-offered-for-secret-nsa-seeds-behind-nist-elliptic-curves-algo/
You guys are really talented and I'm sure you can come up with a script to brute force those seeds, don't forget to share the script.😉
member
Activity: 499
Merit: 38


Yo @nomachine, what's that error dev/urandom thingy?



................
If it doesn't exist, it might indicate a problem with system's configuration or user permissions. Or is not Linux.

"Looks random to me" - is a pretty poor judgment for me in determining if something is random. Grin


You can also setup smaller range in the frame in this mammoth
Code:
# Configuration for the puzzle
puzzle = 130
compressed_public_key = "03633cbe3ec02b9401c5effa144c5b4d22f87940259634858fc7e59b1c09937852"  # Puzzle 130  
lower_range_limit =   680564733841876926926749214863536422911    #2 ** (puzzle - 1)
upper_range_limit =  738823525229305890094942779208630272000    #(2 ** puzzle) - 1

or even smaller

Code:
# Configuration for the puzzle
puzzle = 130
compressed_public_key = "03633cbe3ec02b9401c5effa144c5b4d22f87940259634858fc7e59b1c09937852"  # Puzzle 130  
lower_range_limit =   680564733841876926926749214863536422911    #2 ** (puzzle - 1)
upper_range_limit =   680564733841876926926749314863536422911    #(2 ** puzzle) - 1

and so on...
newbie
Activity: 30
Merit: 0


Yo @nomachine, what's that error dev/urandom thingy?



................
If it doesn't exist, it might indicate a problem with system's configuration or user permissions. Or is not Linux.

"Looks random to me" - is a pretty poor judgment for me in determining if something is random. Grin


https://www.talkimg.com/images/2023/10/13/RExYZ.gif
member
Activity: 499
Merit: 38
So that means that most of the modern PC are cable to generate True Random data.

I have been working on artificial intelligence research for years. If randomness is good enough to simulate reality and intelligence is part of reality(assuming that we ourselves are not living in a simulation),  
it should be good enough to simulate emotions and physical abilities - true intelligence.
if you have a True randomness in your PC you will have possibility to have consciousness in your computer.
To cut a long story short.
If that is true (in absolute terms) ,  Singularity is close  Grin
hero member
Activity: 862
Merit: 662
Yo @nomachine, what's that error dev/urandom thingy?

There is no problem with urandom it is enough random for all cryptographic purposes.

Please all read the next article: https://www.2uo.de/myths-about-urandom/

@nomachine one of the Hardware device that it is include most modern Intel processors, that is used to feed the entropy of the CSRNG of the linux kernel and windows core, use Thermodinamic properties to generate True random data:

From: https://www.intel.com/content/www/us/en/developer/articles/guide/intel-digital-random-number-generator-drng-software-implementation-guide.html
Quote
The ES runs asynchronously on a self-timed circuit and uses thermal noise within the silicon to output a random stream of bits at the rate of 3 GHz. The ES needs no dedicated external power supply to run, instead using the same power supply as other core logic. The ES is designed to function properly over a wide range of operating conditions, exceeding the normal operating range of the processor.

So that means that most of the modern PC are cable to generate True Random data.
member
Activity: 499
Merit: 38


Yo @nomachine, what's that error dev/urandom thingy?



Computers are deterministic, predictable machines and are designed to blindly follow sets of instructions in a repeatable manner. This nature of computers has, of course, served us extremely well for most of the last century, but this design has a fundamental flaw: it cannot perform true random operations. True randomness is in quantum mechanics with time/space/gravity - I will stop here in order not to stray too far from the topic....

Most popular programming languages have some form of random number generator built in that programmers can use. These generators usually take as input the current date and time, encode this value using an algorithm and output a value so different from the input that we perceive them as random. A pseudorandom number generator, also known as a deterministic random bit generator, is an algorithm used to generate a sequence of numbers with properties that approximate those of truly random numbers.

On all Unix-like systems, including all Linux distributions, there is a pseudo device file
"/dev/urandom"

If it doesn't exist, it might indicate a problem with system's configuration or user permissions. Or is not Linux.

"Looks random to me" - is a pretty poor judgment for me in determining if something is random. Grin
newbie
Activity: 49
Merit: 0
member
Activity: 499
Merit: 38
Jump to: