Bitcoin Forum

Other => Beginners & Help => Topic started by: Orca. on August 23, 2022, 12:20:17 AM



Title: Shorter privatekey
Post by: Orca. on August 23, 2022, 12:20:17 AM
Hello,   am   newbie.
I just want generate the privatekey to get own address.
Can anyone suggest me shorter privatekey please?

Cause WIF or HEX is quite long for me,I can't written them to my object.


Title: Re: Shorter privatekey
Post by: nc50lc on August 23, 2022, 03:04:33 AM
I would just make room be able to write a WIF privKey, but if you really have to use a shorter format, you can use a "mini private key".
If you're using Windows, casascius had a compiled binary of his "Bitcoin-Address-Utility" repository (https://github.com/casascius/Bitcoin-Address-Utility) on his website but was later removed.

You can still access it though through archive.org's server: web.archive.org/web/20210801000000*/http://casascius.com/btcaddress-alpha.zip (https://web.archive.org/web/20210801000000*/http://casascius.com/btcaddress-alpha.zip)
To get the file: Select a year (pref 2021), point to a highlighted date (April 16) and click the time of the snapshot.
That will lead you to the archived url which is the copy of the old download link.

After downloading "btcaddress-alpha.zip", extract it.
Run "BtcAddress.exe", create a Minikey in "Tools->Address Utility".

Note: Mini Private keys aren't compatible with some wallets. AFAIK, Electrum supports it.


For Linux, compile it yourself.


Title: Re: Shorter privatekey
Post by: pooya87 on August 23, 2022, 04:22:57 AM
Bitcoin private keys are 256-bit numbers which is why they are long and they should be long otherwise they won't have the required security level to make them secure. Encoding a 256-bit integer would obviously result in a rather long string in small encoding bases like 16 or 58. You could try changing the encoding scheme to compress it a little but it still going to be long.

The reason why mini private keys are shorter is because they aren't keys, they are an entropy used to derive the key from and that entropy is smaller than the actual key in bits.


Title: Re: Shorter privatekey
Post by: bitmover on August 23, 2022, 08:08:15 PM
Hello,   am   newbie.
I just want generate the privatekey to get own address.
Can anyone suggest me shorter privatekey please?

Cause WIF or HEX is quite long for me,I can't written them to my object.

Do you know you can just generate a seed here (https://iancoleman.io/bip39/) with 12 words, which is quite easy and not very long?

There is a nice method for generating a private key without a computer,  just a coin.
Just flip the coin 256 times and write 0 / 1 for each result.

There is a video here about it:
https://m.youtube.com/watch?v=WyBdYhwweaE&feature=youtu.be

You can also read about it here:
https://www.oreilly.com/library/view/mastering-bitcoin/9781491902639/ch04.html
Quote
Tip

The bitcoin private key is just a number. You can pick your private keys randomly using just a coin, pencil, and paper: toss a coin 256 times and you have the binary digits of a random private key you can use in a bitcoin wallet. The public key can then be generated from the private key.


Title: Re: Shorter privatekey
Post by: PowerGlove on August 24, 2022, 09:16:31 AM
There is a nice method for generating a private key without a computer,  just a coin.
Just flip the coin 256 times and write 0 / 1 for each result.
You should be careful when flipping coins to generate private keys, both the coin you use and the flipping technique can (negatively) influence the amount of entropy gathered. There's a simple way [1] to protect against that, but it involves flipping the coin many more times than normal and so unless you're very patient and use this method or are knowledgeable enough to vouch for the fairness of the coin you use and the soundness of your flipping technique then I wouldn't recommend using coins to generate private keys.

[1] "Flipping coins and extracting randomness" https://bitcointalk.org/index.php?topic=5405901.0


Title: Re: Shorter privatekey
Post by: dkbit98 on August 24, 2022, 04:03:47 PM
I just want generate the privatekey to get own address.
Can anyone suggest me shorter privatekey please?
Easy way to export private keys and import them quickly is by using QR codes, so you don't have to worry if key is short or long.
You can print this using your own printer at home (if you have it) or you can even draw it on paper using square spaces something like SeedSigner is doing.
Whatever method you choose you should always test to see if private keys are correct, and make several backup copies.


Title: Re: Shorter privatekey
Post by: pooya87 on August 25, 2022, 04:11:42 AM
Easy way to export private keys and import them quickly is by using QR codes, so you don't have to worry if key is short or long.
It depends on what the usage is for. OP doesn't really give us any explanation why he wants shorter keys, but we know at least one use case that requires private keys to be short and that is collectibles also known as physical bitcoins. Since they are usually very small objects and have to have the key etched on them, the key can not be long. Hence the creation of mini-key algorithm.


Title: Re: Shorter privatekey
Post by: witcher_sense on August 25, 2022, 05:20:01 AM
It depends on what the usage is for. OP doesn't really give us any explanation why he wants shorter keys, but we know at least one use case that requires private keys to be short and that is collectibles also known as physical bitcoins. Since they are usually very small objects and have to have the key etched on them, the key can not be long. Hence the creation of mini-key algorithm.
Given that he said he is a newbie, I would assume that he was talking about making a backup of a private key. Maybe he is planning to itch his private key on a small metal plate, which he later can easily hide in his backyard. Needless to say that dealing with raw private keys is a horrible idea, especially for people who come into the bitcoin space recently and have no idea how to maintain their wallets in a proper manner. He is risking making a mistake upon writing down his private key, and the situation is complicated by the fact that, as far as I am concerned, there is no checksum to verify the integrity of raw private keys. Spending from such keys is a pain in the ass because importing requires a private key being converted to a WIF format, which in itself may accidentally lead to the loss of funds. Also, single keypairs don't out-of-the-box support the concept of change, and the funds must be spent in their entirety unless you want to sponsor bitcoin miners by using change as fees. It is also terrible for privacy in general because it promotes bad privacy practices such as address re-use and unnecessary leakage of public keys. If I were in his shoes, I would follow standards of wallet creation and refrain from using obsolete methods to maintain bitcoin wallets.


Title: Re: Shorter privatekey
Post by: Orca. on September 03, 2022, 08:41:30 AM
I swap them to QR-Code as solution, thank you for sharing guys. it's means a lot for me, and glad to learn something new with privatekey.