nomachine
|
 |
October 02, 2023, 02:49:17 PM Last edit: October 02, 2023, 03:06:01 PM by nomachine |
|
- we run keyhunt in BSGS mode on 8 CPU threads with about 16GB RAM allocation and get about 80 PKey/s.
Is Kangaroo with multi-GPU usage more advantageous and more likely to get a hit, even though keyhunt with CPU usage in BSGS can process 80 PKey/s?
Try changing the random generator in both. Play what works best in your environment. example keyhunt.cpp replace #include <sys/random.h> to #include <random> replace seed random generator with minstd_rand rng #if defined(_WIN64) && !defined(__CYGWIN__) // Any Windows secure random source goes here rseed(clock() + time(NULL) + rand()); #else std::random_device rd; std::minstd_rand rng(rd()); // Seed the random number generator rseed(rng()); #endif I have from 80 to ~177 Pkeys/s (177940438134284990 keys/s)  These apps can't get better if we don't all work on them and test them.
|
BTC: bc1qdwnxr7s08xwelpjy3cc52rrxg63xsmagv50fa8
|
|
|
WanderingPhilospher
Sr. Member
  
Offline
Activity: 1372
Merit: 268
Shooters Shoot...
|
 |
October 02, 2023, 06:08:05 PM |
|
Alek, for the win. Long time no hear/see. Glad you’ve made it back.
What does your new program do exactly? The VanitySearch one.
Myself, no one wanted to combine forces to attack 130, so I’ve just been tinkering on different things. Nothing new, not any closer than I was months ago.
|
|
|
|
Kostelooscoin
Member

Offline
Activity: 206
Merit: 16
|
 |
October 02, 2023, 06:32:13 PM |
|
- we run keyhunt in BSGS mode on 8 CPU threads with about 16GB RAM allocation and get about 80 PKey/s.
Is Kangaroo with multi-GPU usage more advantageous and more likely to get a hit, even though keyhunt with CPU usage in BSGS can process 80 PKey/s?
Try changing the random generator in both. Play what works best in your environment. example keyhunt.cpp replace #include <sys/random.h> to #include <random> replace seed random generator with minstd_rand rng #if defined(_WIN64) && !defined(__CYGWIN__) // Any Windows secure random source goes here rseed(clock() + time(NULL) + rand()); #else std::random_device rd; std::minstd_rand rng(rd()); // Seed the random number generator rseed(rng()); #endif I have from 80 to ~177 Pkeys/s (177940438134284990 keys/s)  These apps can't get better if we don't all work on them and test them. An windows version ?
|
|
|
|
nomachine
|
 |
October 02, 2023, 07:51:40 PM |
|
- we run keyhunt in BSGS mode on 8 CPU threads with about 16GB RAM allocation and get about 80 PKey/s.
Is Kangaroo with multi-GPU usage more advantageous and more likely to get a hit, even though keyhunt with CPU usage in BSGS can process 80 PKey/s?
Try changing the random generator in both. Play what works best in your environment. example keyhunt.cpp replace #include <sys/random.h> to #include <random> replace seed random generator with minstd_rand rng #if defined(_WIN64) && !defined(__CYGWIN__) // Any Windows secure random source goes here rseed(clock() + time(NULL) + rand()); #else std::random_device rd; std::minstd_rand rng(rd()); // Seed the random number generator rseed(rng()); #endif I have from 80 to ~177 Pkeys/s (177940438134284990 keys/s)  These apps can't get better if we don't all work on them and test them. An windows version ? #if defined(_WIN64) && !defined(__CYGWIN__) // On Windows, use a combination of clock, time, and rand as the seed return std::minstd_rand(static_cast<unsigned>(clock() + time(nullptr) + rand())); #else // On non-Windows platforms (including Linux), use std::random_device to seed std::random_device rd; return std::minstd_rand(rd()); This code should work on both Windows and Linux. I also use -O3 flag during compilation. Aggressive optimizations can greatly improve performance, they may also increase compilation time, and in some cases, they can make debugging more challenging because the optimized code may differ significantly from the original source code.
|
BTC: bc1qdwnxr7s08xwelpjy3cc52rrxg63xsmagv50fa8
|
|
|
albert0bsd
|
 |
October 02, 2023, 08:47:07 PM |
|
@nomachine what is the problem with the original code? if a non-deterministic source (e.g. a hardware device) is not available to the implementation. In this case each std::random_device object may generate the same number sequence.
For Linux the best source of entropy is the internal RNG. I strongly advice not use that code provide by @nomachine if you are using the program to generate your vanity addresses.If the code is not going to be used for that and you are pretty sure that your machine have a RNG Hardware device the it is ok to use it
|
|
|
|
digaran
Copper Member
Hero Member
   
Offline
Activity: 1330
Merit: 903
🖤😏
|
 |
October 03, 2023, 12:22:21 AM |
|
WP, for the android, no lung no ear, glad you made it back from where ever you were. Lol.
Ahhh, Joes? Jules? Sup. Try this, I just messed up when trying to divide each target by different scalar, so I can't tell whether this is dividing 1 target by odd and the other target by even values or not, if you could try it with scalar mod n instead of points, do try and also share it with us, I have no time to do it right now. import gmpy2 as mpz from gmpy2 import powmod
# Define the EllipticCurve class class EllipticCurve: def __init__(self, a, b, p): self.a = mpz.mpz(a) self.b = mpz.mpz(b) self.p = mpz.mpz(p)
def contains(self, point): x, y = point.x, point.y return (y * y) % self.p == (x * x * x + self.a * x + self.b) % self.p
def __str__(self): return f"y^2 = x^3 + {self.a}x + {self.b} mod {self.p}"
# Define the Point class class Point: def __init__(self, x, y, curve): self.x = mpz.mpz(x) self.y = mpz.mpz(y) self.curve = curve
def __eq__(self, other): return self.x == other.x and self.y == other.y and self.curve == other.curve
def __ne__(self, other): return not self == other
def __add__(self, other): if self.curve != other.curve: raise ValueError("Cannot add points on different curves")
# Case when one point is zero if self == Point.infinity(self.curve): return other if other == Point.infinity(self.curve): return self
if self.x == other.x and self.y != other.y: return Point.infinity(self.curve)
p = self.curve.p s = 0 if self == other: s = ((3 * self.x * self.x + self.curve.a) * powmod(2 * self.y, -1, p)) % p else: s = ((other.y - self.y) * powmod(other.x - self.x, -1, p)) % p
x = (s * s - self.x - other.x) % p y = (s * (self.x - x) - self.y) % p
return Point(x, y, self.curve)
def __sub__(self, other): if self.curve != other.curve: raise ValueError("Cannot subtract points on different curves")
# Case when one point is zero if self == Point.infinity(self.curve): return other if other == Point.infinity(self.curve): return self
return self + Point(other.x, (-other.y) % self.curve.p, self.curve)
def __mul__(self, n): if not isinstance(n, int): raise ValueError("Multiplication is defined for integers only")
n = n % (self.curve.p - 1) res = Point.infinity(self.curve) addend = self
while n: if n & 1: res += addend
addend += addend n >>= 1
return res
def __str__(self): return f"({self.x}, {self.y}) on {self.curve}"
@staticmethod def from_hex(s, curve): if len(s) == 66 and s.startswith("02") or s.startswith("03"): compressed = True elif len(s) == 130 and s.startswith("04"): compressed = False else: raise ValueError("Hex string is not a valid compressed or uncompressed point")
if compressed: is_odd = s.startswith("03") x = mpz.mpz(s[2:], 16)
# Calculate y-coordinate from x and parity bit y_square = (x * x * x + curve.a * x + curve.b) % curve.p y = powmod(y_square, (curve.p + 1) // 4, curve.p) if is_odd != (y & 1): y = -y % curve.p
return Point(x, y, curve) else: s_bytes = bytes.fromhex(s) uncompressed = s_bytes[0] == 4 if not uncompressed: raise ValueError("Only uncompressed or compressed points are supported")
num_bytes = len(s_bytes) // 2 x_bytes = s_bytes[1 : num_bytes + 1] y_bytes = s_bytes[num_bytes + 1 :]
x = mpz.mpz(int.from_bytes(x_bytes, byteorder="big")) y = mpz.mpz(int.from_bytes(y_bytes, byteorder="big"))
return Point(x, y, curve)
def to_hex(self, compressed=True): if self.x is None and self.y is None: return "00" elif compressed: prefix = "03" if self.y & 1 else "02" return prefix + hex(self.x)[2:].zfill(64) else: x_hex = hex(self.x)[2:].zfill(64) y_hex = hex(self.y)[2:].zfill(64) return "04" + x_hex + y_hex
@staticmethod def infinity(curve): return Point(-1, -1, curve)
# Define the ec_mul function def ec_mul(point, scalar, base_point): result = Point.infinity(point.curve) addend = point
while scalar: if scalar & 1: result += addend
addend += addend scalar >>= 1
return result
# Define the ec_operations function def ec_operations(start_range, end_range, target_1, target_2, curve, divide_1_by_odd=True, divide_1_by_even=True, divide_2_by_odd=True, divide_2_by_even=True): # Define parameters for secp256k1 curve n = mpz.mpz("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141") G = Point( mpz.mpz("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"), mpz.mpz("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"), curve )
for i in range(start_range + (start_range%2), end_range, 3): # divide target 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)
# divide the targets by i modulo n result_1 = ec_mul(target_1, i_inv, G) result_2 = ec_mul(target_2, i_inv, G)
# divide target 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
# write the results to separate files print(f"{i}-{sub_result.to_hex()}")
except ZeroDivisionError: pass
if __name__ == "__main__": # Set the targets and range for the operations curve = EllipticCurve( mpz.mpz(0), mpz.mpz(7), mpz.mpz("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F") )
target_1 = Point.from_hex("037564539e85d56f8537d6619e1f5c5aa78d2a3de0889d1d4ee8dbcb5729b62026", curve)
target_2 = Point.from_hex("03633cbe3ec02b9401c5effa144c5b4d22f87940259634858fc7e59b1c09937852", curve) start_range = 0 end_range = 256 ec_operations(start_range, end_range, target_2, target_1, curve) Haters gonna keep hatin', bitches gonna keep bitchin. Beware of the old lady ahead, her whining kills.😉
|
🖤😏
|
|
|
nomachine
|
 |
October 03, 2023, 06:09:55 AM |
|
@nomachine what is the problem with the original code? if a non-deterministic source (e.g. a hardware device) is not available to the implementation. In this case each std::random_device object may generate the same number sequence.
Everything is great with the code. Even std::random_device works great for me. I am experimenting with different generators and speeds. It's not even an ordinary platform. I'm currently on an ARM machine.
There is no pattern here. But there is a time when a puzzle was created. I even went back in time and generating numbers from 2015. Every second of that year. add = "13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so" # Specify the start date and time start_datetime = datetime(2015, 1, 13, 19, 7, 14) current_datetime = start_datetime
# Specify the end date and time end_datetime = datetime(2015, 1, 15, 19, 7, 14)
while current_datetime <= end_datetime: # Convert the current datetime to a Unix timestamp timestamp = int(current_datetime.timestamp())
random.seed(timestamp) key = random.randint(start_range, end_range) public_key = private_key_to_public_key(key) bitcoin_address = public_key_to_address(public_key, compressed=True) public_key = public_key_to_hex(public_key)
# Increment the current datetime by one second for the next timestamp current_datetime += timedelta(seconds=1) you won't believe what I've tried so far.
|
BTC: bc1qdwnxr7s08xwelpjy3cc52rrxg63xsmagv50fa8
|
|
|
zahid888
Member

Offline
Activity: 328
Merit: 24
the right steps towerds the goal
|
 |
October 03, 2023, 11:13:24 AM |
|
There is no pattern here. But there is a time when a puzzle was created. I even went back in time and generating numbers from 2015. Every second of that year.
https://bitcointalk.org/index.php?topic=1306983.msg62144570#msg62144570Almost six months ago, I undertook various tasks of a similar stuffs..
|
1BGvwggxfCaHGykKrVXX7fk8GYaLQpeixA
|
|
|
alek76
Member

Offline
Activity: 93
Merit: 16
|
 |
October 03, 2023, 08:09:08 PM |
|
Alek, for the win. Long time no hear/see. Glad you’ve made it back.
What does your new program do exactly? The VanitySearch one.
Myself, no one wanted to combine forces to attack 130, so I’ve just been tinkering on different things. Nothing new, not any closer than I was months ago.
Thanks! This is a fork, it’s not mine programm, the program is optimized for a puzzle, but I removed everything unnecessary from the code and introduced a new random generator - no predictable random, as it was before.
|
|
|
|
frozenen
Newbie
Offline
Activity: 42
Merit: 0
|
 |
October 04, 2023, 10:07:38 AM |
|
Has anyone ever found a key matching: 13zb1hQbWVsc ? just would be interesting to see!
|
|
|
|
citb0in
|
 |
October 04, 2023, 10:14:42 AM |
|
Has anyone ever found a key matching: 13zb1hQbWVsc ? just would be interesting to see!
what for ? why should anyone be interested in finding a partly matching string of a puzzle BTC address ? it's completely useless
|
Some signs are invisible, some paths are hidden - but those who see, know what to do. Follow the trail - Follow your intuition - [bc1qqnrjshpjpypepxvuagatsqqemnyetsmvzqnafh]
|
|
|
GR Sasa
Member

Offline
Activity: 200
Merit: 14
|
 |
October 04, 2023, 10:21:44 AM |
|
Has anyone ever found a key matching: 13zb1hQbWVsc ? just would be interesting to see!
what for ? why should anyone be interested in finding a partly matching string of a puzzle BTC address ? it's completely useless for the first time in my life i agree with citb0in
|
|
|
|
frozenen
Newbie
Offline
Activity: 42
Merit: 0
|
 |
October 04, 2023, 10:38:29 AM |
|
Very boring comments, please DM to me only if anyone has one! thanks
|
|
|
|
citb0in
|
 |
October 04, 2023, 10:41:39 AM |
|
for the first time in my life i agree with citb0in
cauz' you didn't like or understand that reply?  love it or hate it - off-topic enough. Very boring
indeed, such requests (asking for partial matched strings) are boring even if reoccurring from time to time
|
Some signs are invisible, some paths are hidden - but those who see, know what to do. Follow the trail - Follow your intuition - [bc1qqnrjshpjpypepxvuagatsqqemnyetsmvzqnafh]
|
|
|
digaran
Copper Member
Hero Member
   
Offline
Activity: 1330
Merit: 903
🖤😏
|
 |
October 04, 2023, 11:46:52 AM |
|
If anyone is interested in comparing base58 character match, rmd160 character match etc, I have an idea and if you are a coder you might be able to pull it off.
Basically what you need is a color encoding tool to create colors from base58 or rmd160 hash characters, once you have your algorithm ready, you just need encode addresses or hashes with this new algo, then you should take a look at the color spectrum of the addresses you find in a certain range and compare it for example with #66 address and it's color composition, if the found similar matches were of the same colors, you might have a chance to determine whether you are close to puzzle address or not.
First thing you should do is converting adds/hashes into color bars something like this:
1111111111111111111114oLvT2
Rmd160 :
0000000000000000000000000000000000000000
Add: 11111111111111111111BZbvjr Rmd160: 0000000000000000000000000000000000000001 Add: 11111111111111111C3CPpNyMcq Rmd160: 0000000000000000000000000000000001234567
Or you could base the colors on a certain range, like the above hexadecimal rmd160 converted to decimal is : 19088743, then you could mix color hues together like 1908, 1+9+8= 18, so you'd set a color for any sum of 4 digits less than 20 to red, if the sum of next 4 digits are 8+7+4+3= 22 between 22 and 25 you'd set a different color, if the sum of 4 digits is between 25 and 30, another color and so on.
Then you won't need to look at the hex/decimal values anymore, just pure color compositions of certain hashes in different bit ranges. And then check to see if you can find any pattern.
|
🖤😏
|
|
|
citb0in
|
 |
October 04, 2023, 11:54:52 AM |
|
And then check to see if you can find any pattern.
would you expect one ?
|
Some signs are invisible, some paths are hidden - but those who see, know what to do. Follow the trail - Follow your intuition - [bc1qqnrjshpjpypepxvuagatsqqemnyetsmvzqnafh]
|
|
|
GR Sasa
Member

Offline
Activity: 200
Merit: 14
|
 |
October 04, 2023, 12:12:07 PM |
|
And then check to see if you can find any pattern.
would you expect one ? Lol. We've gone way off topic damn the son of the sun... I think Satoshi should recharge our batteries and boost our motivation by skyrocketing the puzzles again by 10x. Would you agree guys?
|
|
|
|
citb0in
|
 |
October 04, 2023, 12:15:46 PM |
|
I think Satoshi should recharge our batteries and boost our motivation by skyrocketing the puzzles again by 10x.
Would you agree guys?
Well, I don't think anyone would mind if the prize money was increased tenfold again. But I don't think that would increase the chances of our potential success. It is difficult, we know that. Instead of increasing the prize money, I would appreciate more hints from the puzzle creator 
|
Some signs are invisible, some paths are hidden - but those who see, know what to do. Follow the trail - Follow your intuition - [bc1qqnrjshpjpypepxvuagatsqqemnyetsmvzqnafh]
|
|
|
GR Sasa
Member

Offline
Activity: 200
Merit: 14
|
 |
October 04, 2023, 12:20:20 PM |
|
I think Satoshi should recharge our batteries and boost our motivation by skyrocketing the puzzles again by 10x.
Would you agree guys?
Well, I don't think anyone would mind if the prize money was increased tenfold again. But I don't think that would increase the chances of our potential success. It is difficult, we know that. Instead of increasing the prize money, I would appreciate more hints from the puzzle creator  Yes, if the puzzle prize has increased it doesn't mean that it would increase the chances of success, but it give us more motivation espeically for developers to develop new ideas. @citb0in: How are you online here in the forum when you have work to do? I thought you work from 9 to 17 like all other people that are stuck in the matrix inside the planet..? 
|
|
|
|
citb0in
|
 |
October 04, 2023, 12:49:09 PM |
|
@citb0in: How are you online here in the forum when you have work to do? I thought you work from 9 to 17 like all other people that are stuck in the matrix inside the planet..?  One does not exclude the other. I am not in the matrix. I created the matrix. 
|
Some signs are invisible, some paths are hidden - but those who see, know what to do. Follow the trail - Follow your intuition - [bc1qqnrjshpjpypepxvuagatsqqemnyetsmvzqnafh]
|
|
|
|