Author

Topic: uppercase private key? (Read 3371 times)

legendary
Activity: 905
Merit: 1011
August 28, 2012, 08:42:26 PM
#14
base32?
hero member
Activity: 778
Merit: 1002
August 28, 2012, 12:06:29 PM
#13
An easy way may be to convert to hex and then modify the hex so that 0-9 becomes A-J and A-F becomes K-P.

I am guessing he has access to print numbers, so he could just as well express the entire key in hex.

Yep, A-Z, 0-9.
sr. member
Activity: 434
Merit: 250
August 28, 2012, 11:31:40 AM
#12
Thanks everyone. Letters and numbers are fine, but the stamps/punches come in uppercase.

Then just turn them sideways for lowercase.
vip
Activity: 1386
Merit: 1136
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
August 28, 2012, 11:27:47 AM
#11
An easy way may be to convert to hex and then modify the hex so that 0-9 becomes A-J and A-F becomes K-P.

I am guessing he has access to print numbers, so he could just as well express the entire key in hex.
legendary
Activity: 1190
Merit: 1004
August 28, 2012, 11:13:07 AM
#10
An easy way may be to convert to hex and then modify the hex so that 0-9 becomes A-J and A-F becomes K-P.
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
August 28, 2012, 11:07:11 AM
#9
Just a comment:

Addresses and keys are usually expressed as Base58.  This doesn't have to be the case.

Take your regular key, and instead of encoding it as base 58, encode it as Base26, with [A-Z] ~ [0-25].  Or Base36:  [A-Z,0-9]~[0,35].  Add an extra line or in parentheses "BASE26" to the plate, to identify how it was created.  Regardless of whether it is Base58 or Base26, it still needs to end up in Base256 before it is interpreted by the computer.  If someone knows it's a private key, it will be recoverable...

Also, if you are etching this in metal, the checksum isn't quite as important:  I imagine this is going to be extremely resilient, so the extra checksum characters won't make much of a difference -- you're much more likely to lose the whole thing, or have it completely destroyed by accident, than somehow losing only one or two characters.  But you can add it anyway: just start with your binary (Base256) private key, add the four-byte checksum, then convert all 36 bytes to Base26.  Done.
vip
Activity: 1386
Merit: 1136
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
August 28, 2012, 02:20:20 AM
#8
A hidden feature of Casascius Bitcoin Utility: add a question mark to the end of any Base58-encoded string to disregard the checksum.

https://casascius.com/btcaddress.zip

Quick way to generate an uppercase private key:

1. generate a normal private key
2. manually change all the lowercase letters to uppercase (except O and I, which are not allowed as uppercase but are allowed as lowercase - change them to something else of your choice)... make sure the length is not changed.
3. Add a question mark to the end (that increases the length by 1)
4. Convert it to hex by clicking the button
5. Convert it back to a WIF private key (which calculates the correct checksum)
6. If correcting the checksum caused lowercase letters to be added, then start changing (incrementing) the last hex digit or two, and convert to WIF again, until you find something without lowercase letters.
hero member
Activity: 778
Merit: 1002
August 28, 2012, 12:53:57 AM
#7
Thanks everyone. Letters and numbers are fine, but the stamps/punches come in uppercase.

I will take a look at the code tomorrow at my desk. I'm sure I can whip something up real quick to generate a key.

I will be happy to post the final result... Without the private or public key of course.
vip
Activity: 1386
Merit: 1136
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
August 27, 2012, 11:46:01 PM
#6
Here is an example private key:

5JABCDEFGHJKLMNPQRSTUVWXYZABCDEFGHJKLMNPQRSTPRQDTCD

Its corresponding Bitcoin address:

16XGpiDjnSq6H7bXuxAJiYQYGjpvz4BCh6

To get it, I just used the sequential letters you see as a private key (ignoring the invalid checksum at first), and then incremented it until it satisfied the capital letter condition with its correctly computed checksum.

I assume you don't mind the leading 5, you can't really get rid of it if you want to use this format.
hero member
Activity: 812
Merit: 1000
August 27, 2012, 11:29:50 PM
#5
private keys are simply random numbers encoded in various formats (there are more than one).  Understand you are significantly reducing the entropy of your private key by eliminating all the incompatible digits.

One method would be to randomly generate each digit (A-Z) and concatenate the values.

*very* rough code with lots of bugs:

Code:
function upper_key($num) {
  $key = '';

   while ($num > 26) {
       $char_num = $num % 26;
       $num = ($num - $char_num) / 26;

      $key = chr($char_num+65) . $key;
    }

   $key = chr($num+65) . $key;

   return $key;
}
kjj
legendary
Activity: 1302
Merit: 1025
August 27, 2012, 11:13:38 PM
#4
Don't let anyone trick you into posting pictures here on the forums when you are done.
vip
Activity: 1386
Merit: 1136
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
August 27, 2012, 10:55:06 PM
#3
The checksum value at the end is outside of your control, but given that it's only 32 bits (~5 characters) you can simply try different keys until you get a value that meets your needs, which should be relatively easy.
donator
Activity: 1218
Merit: 1079
Gerald Davis
August 27, 2012, 10:48:28 PM
#2
private keys are simply random numbers encoded in various formats (there are more than one).  Understand you are significantly reducing the entropy of your private key by eliminating all the incompatible digits.

One method would be to randomly generate each digit (A-Z) and concatenate the values.
hero member
Activity: 778
Merit: 1002
August 27, 2012, 10:37:38 PM
#1
How would one go about generating creating custom private keys? My specific need is for one in all caps. The idea is to create a private key that can be punched in to a solid block of aluminum with a simple set of metal punches. That way the key is never out of my possession.

Thanks!
Jump to: