Bitcoin Forum
December 15, 2024, 02:30:47 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Developer: Write code to generate all possible private keys  (Read 673 times)
cookiebro (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 1


View Profile
December 12, 2021, 09:00:52 AM
 #1

I'm looking for a developer to write a script to generate all possible private keys and write them to an SQL database. Payment available
enzogla
Jr. Member
*
Offline Offline

Activity: 50
Merit: 11


View Profile
December 12, 2021, 09:20:33 AM
 #2

There are already websites that do that.

https://keys.lol

Good luck though, the chances of finding an active one are ridiculously low.
cookiebro (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 1


View Profile
December 12, 2021, 09:26:46 AM
Merited by Quickseller (1)
 #3

I know. It's not for anything nefarious. I need the data locally.
PawGo
Legendary
*
Offline Offline

Activity: 952
Merit: 1386


View Profile
December 12, 2021, 09:39:32 AM
 #4

What do you mean by "all possible private keys"?
All possible addresses from a given private key (so for one key to generate addresses bc1... 3... 1..., compressed/uncompressed) or you want to iterate each possible private key, one by one and generate address for that - then technically it is easy and doable, the problem I see is that you will need eons to have work finished, you will need a lot of energy and enormous amount of disk space.
But if you want, I may do it for you...
pooya87
Legendary
*
Offline Offline

Activity: 3668
Merit: 11107


Crypto Swap Exchange


View Profile
December 12, 2021, 10:24:53 AM
Merited by achow101 (10), Welsh (10), vapourminer (5), NeuroticFish (4), LoyceV (4), hugeblack (4), o_e_l_e_o (4), ABCbits (1), Quickseller (1), nc50lc (1), JohanM (1)
 #5

I'm looking for a developer to write a script to generate all possible private keys and write them to an SQL database. Payment available
Code:
using AlienTechnologies.TimeTravel;
using Encoders;

public void Main()
{
  var storage = TimeTravelToFuture();
  var sql = new SqlDatabase(storage);
  for (BigInteger i = 1; i < 115792089237316195423570985008687907852837564279074904382605163141518161494337; i++)
  {
    sql.Write(Base58Encoder.GetWif(i));
  }
}

private Storage TimeTravelToFuture()
{
  TimeMachine.Engine.TurnOn();
  TimeMachine.Time.Set("2120-01-01-12-45-00");
  TimeMachine.Travel();
  return TimeMachine.RetreiveStorageDisk();
}

You're welcome.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1736
Merit: 8452


Fiatheist


View Profile WWW
December 12, 2021, 10:38:43 AM
Merited by vapourminer (1), pooya87 (1)
 #6

I'm looking for a developer to write a script to generate all possible private keys and write them to an SQL database. Payment available
In Bitcoin? What to do the bitcoins if you know my private key?  Roll Eyes

[...]
This will be insanely slow. Consider using Foxpup.TimeTravel; instead.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18771


View Profile
December 12, 2021, 11:14:02 AM
Merited by Welsh (6), hugeblack (4), Cookdata (1)
 #7

2256 private keys * 32 bytes each = 3.7*1054 yottabytes.

The combined storage capacity of every device on the planet is not yet at 1 yottabyte. Good luck!

I'm also wondering where you are keeping the several million Dyson spheres you'll need to generate enough electricity to perform this?

Yes yes, I know it's not really 2256. I'm just making a point.

-snip-
I initially glossed over this because I assumed you had written the actual code knowing full well it would just fill his available storage space. Glad I went back and read it properly though. Cheesy

Edit: @o_e_l_e_o beat me almost by a minute.
As BHC has said above, Foxpup.TimeTravel is the superior function. Cheesy
mamuu
Member
**
Offline Offline

Activity: 79
Merit: 20


View Profile
December 12, 2021, 01:53:56 PM
 #8

I'm looking for a developer to write a script to generate all possible private keys and write them to an SQL database. Payment available
Code:
using AlienTechnologies.TimeTravel;
using Encoders;

public void Main()
{
  var storage = TimeTravelToFuture();
  var sql = new SqlDatabase(storage);
  for (BigInteger i = 1; i < 115792089237316195423570985008687907852837564279074904382605163141518161494337; i++)
  {
    sql.Write(Base58Encoder.GetWif(i));
  }
}

private Storage TimeTravelToFuture()
{
  TimeMachine.Engine.TurnOn();
  TimeMachine.Time.Set("2120-01-01-12-45-00");
  TimeMachine.Travel();
  return TimeMachine.RetreiveStorageDisk();
}

You're welcome.

I'll be damned! to this answer  Grin

1DWA3Sa8i6eHVWV4AG4UP2SBhYB2XrfiHW
mynonce
Full Member
***
Offline Offline

Activity: 233
Merit: 253


View Profile
December 12, 2021, 05:59:35 PM
 #9

I'm looking for a developer to write a script to generate all possible private keys and write them to an SQL database. Payment available

You're too late. Someone else did it already.

https://allprivatekeys.com

'All private keys list
Whole range of Bitcoin and Bitcoin Cash Private Keys, compressed/ uncompressed, SegWit and HD wallet. Whole wallets including YOURS.
Don't believe?

Just open to see.'
larry_vw_1955
Sr. Member
****
Offline Offline

Activity: 1190
Merit: 469


View Profile
December 13, 2021, 03:06:59 AM
 #10



You're welcome.

you shouldn't be doing that pooya. that's a job for someone they could put food on the table but not now!
NotATether
Legendary
*
Offline Offline

Activity: 1820
Merit: 7476


Top Crypto Casino


View Profile WWW
December 13, 2021, 09:57:07 AM
 #11

It should be assumed that the first 2^40 private keys have already been broken and are inside some local database (330*64GB or about 21TB large uncompressed) so they must not be used for whatever reason.
Same for last 2^40 private keys, first 2^40 even PKs, first couple prime number PKs and so on.

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
larry_vw_1955
Sr. Member
****
Offline Offline

Activity: 1190
Merit: 469


View Profile
December 14, 2021, 02:39:15 AM
 #12

It should be assumed that the first 2^40 private keys have already been broken and are inside some local database (330*64GB or about 21TB large uncompressed) so they must not be used for whatever reason.
Same for last 2^40 private keys, first 2^40 even PKs, first couple prime number PKs and so on.

but how would someone know if their private key was in that range? especially with hd wallets and such they aren't checking things like that. hopefully their funds dont get stolen. oh also the middle 2^40 private keys whatever those are would probably be sitting inside some kid in their basement on their hard drive.
PrimeNumber7
Copper Member
Legendary
*
Offline Offline

Activity: 1666
Merit: 1901

Amazon Prime Member #7


View Profile
December 14, 2021, 03:40:50 AM
Merited by hugeblack (4), pooya87 (2), ABCbits (2)
 #13

It should be assumed that the first 2^40 private keys have already been broken and are inside some local database (330*64GB or about 21TB large uncompressed) so they must not be used for whatever reason.
Same for last 2^40 private keys, first 2^40 even PKs, first couple prime number PKs and so on.

but how would someone know if their private key was in that range? especially with hd wallets and such they aren't checking things like that. hopefully their funds dont get stolen. oh also the middle 2^40 private keys whatever those are would probably be sitting inside some kid in their basement on their hard drive.
The chances of a private key being in any 2^40 range is approximately 1 in 10^67, or approximately zero.

Wallets could potentially black list those private keys, but if that was a mainstream thing, crackers could simply monitor the next 2^40 set of keys (and this process would continue).

I seriously doubt that the key 2^35 is being actively monitored, and I doubt that someone that naturally generates this key is going to have their coin stolen.

Sure, if you say to send coin to an address associated with a key in that range in the next month, there would be a guarantee that monitoring those addresses would present an opportunity to see coin stolen. But monitoring all those addresses for years, or even decades would be much more expensive, with no assurance that the attacker would be able to receive any coin as a result of monitoring all those addresses.
NotATether
Legendary
*
Offline Offline

Activity: 1820
Merit: 7476


Top Crypto Casino


View Profile WWW
December 14, 2021, 05:52:17 AM
 #14

It should be assumed that the first 2^40 private keys have already been broken and are inside some local database (330*64GB or about 21TB large uncompressed) so they must not be used for whatever reason.
Same for last 2^40 private keys, first 2^40 even PKs, first couple prime number PKs and so on.

but how would someone know if their private key was in that range? especially with hd wallets and such they aren't checking things like that. hopefully their funds dont get stolen. oh also the middle 2^40 private keys whatever those are would probably be sitting inside some kid in their basement on their hard drive.

I meant if the private key was generated directly, or you're using a wallet that allows you to see the private key of your address.

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
dextronomous
Full Member
***
Offline Offline

Activity: 437
Merit: 105


View Profile
December 15, 2021, 03:44:11 AM
 #15

was thinking 
how much is it gonna be in data TB , if range 64 would be safed uncompressed,
raw txt file, and only this range is it doable?
pooya87
Legendary
*
Offline Offline

Activity: 3668
Merit: 11107


Crypto Swap Exchange


View Profile
December 15, 2021, 03:49:50 AM
 #16

was thinking 
how much is it gonna be in data TB , if range 64 would be safed uncompressed,
raw txt file, and only this range is it doable?
It would be silly to store things in string form, for example in this case it would be 51-52 bytes versus 32. So to compute the total size needed you just multiply the number of items by the raw-byte size which is 32.
Code:
32 * 2^64 = 2^69 = 5.9E+20 bytes = 590,000,000 terabytes

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
larry_vw_1955
Sr. Member
****
Offline Offline

Activity: 1190
Merit: 469


View Profile
December 15, 2021, 06:36:08 AM
 #17


Code:
32 * 2^64 = 2^69 = 5.9E+20 bytes = 590,000,000 terabytes

when will that be feasible? probably not in the next 10 years right?
pooya87
Legendary
*
Offline Offline

Activity: 3668
Merit: 11107


Crypto Swap Exchange


View Profile
December 15, 2021, 07:07:06 AM
 #18

when will that be feasible? probably not in the next 10 years right?
I don't really follow hardware development to be able to give an informed response but considering that over past 10 years we've gone from about 60 TB to the maximum 100 TB SSDs which is roughly a 2x rise, I don't see how a revolution could occur in the next 10 years that could increase this maximum capacity 5.9 million times!

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
PrimeNumber7
Copper Member
Legendary
*
Offline Offline

Activity: 1666
Merit: 1901

Amazon Prime Member #7


View Profile
December 15, 2021, 07:46:31 AM
 #19


Code:
32 * 2^64 = 2^69 = 5.9E+20 bytes = 590,000,000 terabytes

when will that be feasible? probably not in the next 10 years right?
Storing all private keys is pretty pointless, IMO. Simply storing a list of private keys without the ability to a) quickly access the corresponding public key and address, and b) quickly check if the associated address in "a" has received any transactions, will not provide much value to anyone.

As an example, I currently have all possible private keys stored in my head. This includes all of your private keys (although I have no way of filtering out all private keys that do not belong to you). However, my brain cannot quickly calculate an associated address from a private key, so the process of obtaining an address from any private key in my head is very slow. The process for me to look up if an address has received a transaction is even slower.

The above concept can be applied to a computer that is able to store all private keys on a hard drive. Even if a computer could quickly check many private keys to see if a private key's associated address has received a transaction, in order to check n private keys, the computer would need to perform n calculations. The number of private keys is too large for any computer to ever perform any calculation on all possible private keys, given theoretical computational limits.

was thinking 
how much is it gonna be in data TB , if range 64 would be safed uncompressed,
raw txt file, and only this range is it doable?
It would be silly to store things in string form, for example in this case it would be 51-52 bytes versus 32. So to compute the total size needed you just multiply the number of items by the raw-byte size which is 32.
Code:
32 * 2^64 = 2^69 = 5.9E+20 bytes = 590,000,000 terabytes
If I am not mistaken, you are describing the amount of space required to store all private keys as 32 bit integers. Most private keys are numbers that are greater than 32 bits.
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1736
Merit: 8452


Fiatheist


View Profile WWW
December 15, 2021, 08:08:17 AM
 #20

The question is why would one save 264 private keys in their hard drive? I mean what's the point? Do you also want to store the addresses after each key, just to make searching easier for the first 264 uncompressed addresses? There's no reason to store only the keys.

If I am not mistaken, you are describing the amount of space required to store all private keys as 32 bit integers. Most private keys are numbers that are greater than 32 bits.
He's talking about the [1, 264] range. Storing all the private keys would cost much much more space.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1] 2 »  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!