Author

Topic: Mini private key format (Read 288 times)

newbie
Activity: 11
Merit: 0
April 25, 2023, 03:10:34 PM
#12
Thank you to everybody for the great replies! You are very kind to take the time to explain this thing  Smiley
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
March 08, 2023, 01:05:09 AM
#11
and there's an interesting answer that identifies the "S" as "Spend", he didn't included a source though.
Small makes more sense though since these are indeed "small" strings that are used to derive a private key -snip-
I think it's just following the (old) standard paper wallet print format which labels the private key as "Spend".
Notice that in most paper wallet generators or some printable wallet private key exports, the private key is printed with the word 'Spend'.
legendary
Activity: 3472
Merit: 10611
March 07, 2023, 11:58:16 PM
#10
"S" as "Spend"
Small makes more sense though since these are indeed "small" strings that are used to derive a private key and we couldn't use "m/M" for mini since "m" is used for addresses on testnet already and could create confusion.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
March 07, 2023, 11:05:44 PM
#9
Maybe the same author but there's a similar question in Bitcoin Stackexchange
and there's an interesting answer that identifies the "S" as "Spend", he didn't included a source though.

Link: bitcoin.stackexchange.com/questions/117486/mini-private-key-format
sr. member
Activity: 672
Merit: 416
stead.builders
March 07, 2023, 12:50:31 PM
#8
I want to understand why the format for a mini private key necessarily has to always start with an "S". Why is this? Is there a specific reason for it? I would imagine so but I dont know what it might be.

If you look into bitcoin addresses, you will discover that same pattern of letter is common to each type of address generated, either legacy, taproot or segwit address all have their own unique identification character they begins with, so that once seing any you could easily predict the address type, this is also common to other cryptocurrencies, each have a unique means of identifying their own addresses, but the reason to using this is best known to them, but what we could predict is for easy identification.
legendary
Activity: 3472
Merit: 10611
March 07, 2023, 07:30:50 AM
#7
@Upgrade00 is correct, the letter S is simply for identification of mini private keys, in fact if you look at the original source code you can see that S is simply added to the start of the randomly generated string[1] instead of being a meaningful version integer as is normal with other base58 encodings like addresses.

[1] https://github.com/casascius/Bitcoin-Address-Utility/blob/dcfc3b99a3df1427fc19fcfbe18c1bfedfdad4eb/Model/MiniKeyPair.cs#L50
hero member
Activity: 2366
Merit: 838
March 07, 2023, 06:07:02 AM
#6
Simple answer is because its Base58Check so it starts with "S" as for the public keys there some standards.

  • Taproot address - P2TR : bc1p
  • Bech32 / Segwit: bc1q
  • Script address: 3
  • Legacy address: 1  
They are public addresses, not public key, not private key.

Private key has some representations: Raw, Hex, WIF, WIF-compressed. Private key formats (Mastering Bitcoin)

With WIF, WIF-compressed formats, you can recognize them by prefix (WIF with prefix 5; WIF-compressed with prefix K or L).
legendary
Activity: 2450
Merit: 4415
🔐BitcoinMessage.Tools🔑
March 07, 2023, 01:19:36 AM
#5
I want to understand why the format for a mini private key necessarily has to always start with an "S". Why is this? Is there a specific reason for it? I would imagine so but I dont know what it might be.
The reason why mini private keys always start with the uppercase letter "S" is that cryptocurrency users need to somehow distinguish important information from random gibberish. That is why standards exist. For example, if you are familiar with standards describing the creation of these mini private keys, every time you see a string starting with "S" and consisting of 30 characters, you immediately assume that it is a key that can be converted to another key. But how do you know how to convert it? Again, mini private key specifications describe the process: just take a sha256 of a given string, convert it to WIF format, and import it to your wallet. Without standards dictating in which format data needs to be written to be distinguished from other types of data, you would have to try hundreds of different algorithms to convert it to a correct output.
legendary
Activity: 2380
Merit: 5213
March 06, 2023, 03:56:34 PM
#4
There serval reason for the S to be used as you know in the mini private keys there some uppercase, lowercase and Numbers mixture with the total 30 characters.
It may worth mentioning that a mini private key can be also in 22 character format.
For more information, visit Mini private key format on Bitcoin Wiki.
member
Activity: 71
Merit: 10
March 06, 2023, 03:21:43 PM
#3
The basic answer to this question which you can google as well is Base58Check encoding. There serval reason for the S to be used as you know in the mini private keys there some uppercase, lowercase and Numbers mixture with the total 30 characters. So sometimes what happen people gets confused with the 0 and O for this reason in Base58Check encoding for error free encoding of data eliminates such latter's and numbers.
Simple answer is because its Base58Check so it starts with "S" as for the public keys there some standards.

  • Taproot address - P2TR : bc1p
  • Bech32 / Segwit: bc1q
  • Script address: 3
  • Legacy address: 1  

You could also wait for other members who may have more appropriate answers to respond, if there is such answer.

There is no such answer as its commonly considered because of its encoding type..


legendary
Activity: 2114
Merit: 2248
Playgram - The Telegram Casino
March 06, 2023, 03:08:40 PM
#2
I'm not aware of any particular reason for this distinction. Most likely it's for identification, just how segwit addresses, legacy addresses and even compressed and uncompressed private keys start with a particular character(s).

You could also wait for other members who may have more appropriate answers to respond, if there is such answer.
newbie
Activity: 11
Merit: 0
March 06, 2023, 02:31:04 PM
#1
I want to understand why the format for a mini private key necessarily has to always start with an "S". Why is this? Is there a specific reason for it? I would imagine so but I dont know what it might be.
Jump to: