Bitcoin Forum
May 01, 2024, 02:17:13 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Mini private key format  (Read 253 times)
rheticus (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
March 06, 2023, 07: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.
1714529833
Hero Member
*
Offline Offline

Posts: 1714529833

View Profile Personal Message (Offline)

Ignore
1714529833
Reply with quote  #2

1714529833
Report to moderator
1714529833
Hero Member
*
Offline Offline

Posts: 1714529833

View Profile Personal Message (Offline)

Ignore
1714529833
Reply with quote  #2

1714529833
Report to moderator
1714529833
Hero Member
*
Offline Offline

Posts: 1714529833

View Profile Personal Message (Offline)

Ignore
1714529833
Reply with quote  #2

1714529833
Report to moderator
According to NIST and ECRYPT II, the cryptographic algorithms used in Bitcoin are expected to be strong until at least 2030. (After that, it will not be too difficult to transition to different algorithms.)
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714529833
Hero Member
*
Offline Offline

Posts: 1714529833

View Profile Personal Message (Offline)

Ignore
1714529833
Reply with quote  #2

1714529833
Report to moderator
Upgrade00
Legendary
*
Offline Offline

Activity: 2016
Merit: 2172


Professional Community manager


View Profile WWW
March 06, 2023, 08:08:40 PM
Merited by pooya87 (2), hosseinimr93 (2), ABCbits (1)
 #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.

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
UdtaParinda1
Member
**
Offline Offline

Activity: 71
Merit: 10


View Profile
March 06, 2023, 08:21:43 PM
Merited by examplens (3)
 #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..


hosseinimr93
Legendary
*
Offline Offline

Activity: 2380
Merit: 5235



View Profile
March 06, 2023, 08:56:34 PM
Merited by vapourminer (1), tbct_mt2 (1), rat03gopoh (1)
 #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.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
witcher_sense
Legendary
*
Offline Offline

Activity: 2310
Merit: 4316

🔐BitcoinMessage.Tools🔑


View Profile WWW
March 07, 2023, 06:19:36 AM
Merited by albert0bsd (1)
 #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.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
tbct_mt2
Hero Member
*****
Offline Offline

Activity: 2310
Merit: 835



View Profile WWW
March 07, 2023, 11:07:02 AM
Merited by vapourminer (2), ABCbits (1)
 #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).

.
 airbet 
██
██
██
██
██
██
██
██
██
██
██
██
██
 .

▄████▄▄▄██████▄
███████████████
███████████████
███████▀▀▀▀████
██████████████
▀███▀███████▄██
██████████▄███
██████████████
███████████████
███████████████
██████████████
█████▐████████
██████▀███████▀
▄███████████████▄
████████████████
█░██████████████
████████████████
████████████████
█████████████████
█████████████████
███████░█░███████
████████████████
█████████████████
██████████████░█
████████████████
▀███████████████▀
.
.
.
.
██▄▄▄
████████▄▄
██████▀▀████▄
██████▄░░████▄
██████████████
████████░░▀███▌
░████████▄▄████
██████████████▌
███░░░█████████
█████████░░░██▀
░░░███████████▀
██████░░░██▀
░░▀▀███▀

   
|.
....
██
██
██
██
██
██
██
██
██
██
██
██
██
.
 PLAY NOW 
pooya87
Legendary
*
Offline Offline

Activity: 3430
Merit: 10519



View Profile
March 07, 2023, 12:30:50 PM
Merited by vapourminer (1)
 #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

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Aanuoluwatofunmi
Sr. Member
****
Offline Offline

Activity: 574
Merit: 409



View Profile
March 07, 2023, 05: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.

.
SPIN

       ▄▄▄██████████▄▄▄
     ▄███████████████████▄
   ▄██████████▀▀███████████▄
   ██████████    ███████████
 ▄██████████      ▀█████████▄
▄██████████        ▀█████████▄
█████████▀▀   ▄▄    ▀▀▀███████
█████████▄▄  ████▄▄███████████
███████▀  ▀▀███▀      ▀███████
▀█████▀          ▄█▄   ▀█████▀
 ▀███▀   ▄▄▄  ▄█████▄   ▀███▀
   ██████████████████▄▄▄███
   ▀██████████████████████▀
     ▀▀████████████████▀▀
        ▀▀▀█████████▀▀▀
.
RIUM
.
███
███
███
███
███
███
███
███
███
███
███
███
SAFE GAMES
WITH WITHDRAWALS
       ▄▀▀▀▀▀▀▄▄▄▄
 ▄▀▀▀▀▀▀▀▀▀▀▀▀▄  ▀▀▄
█    ▄         █   ▀▌
█   █ █        █    ▌
█      ▄█▄     █   ▐
█     ▄███▄    █   ▌
█    ███████   █  ▐
█    ▀▀ █ ▀▀   █  ▌
█     ▄███▄    █ ▐
█              █▐▌
█        █ █   █▌
 ▀▄▄▄▄▄▄▄▄█▄▄▄▀
       ▄▀▀▀▀▀▀▄▄▄▄
 ▄▀▀▀▀▀▀▀▀▀▀▀▀▄  ▀▀▄
█    ▄         █   ▀▌
█   █ █        █    ▌
█      ▄█▄     █   ▐
█     ▄███▄    █   ▌
█    ███████   █  ▐
█    ▀▀ █ ▀▀   █  ▌
█     ▄███▄    █ ▐
█              █▐▌
█        █ █   █▌
 ▀▄▄▄▄▄▄▄▄█▄▄▄▀
.
███
███
███
███
███
███
███
███
███
███
███
███
▄▀▀▀











▀▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
SIGN UP


▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▄











▄▄▄▀
nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5568


Self-proclaimed Genius


View Profile
March 08, 2023, 04:05:44 AM
 #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

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
pooya87
Legendary
*
Offline Offline

Activity: 3430
Merit: 10519



View Profile
March 08, 2023, 04:58:16 AM
 #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.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5568


Self-proclaimed Genius


View Profile
March 08, 2023, 06:05:09 AM
Merited by pooya87 (2)
 #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'.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
rheticus (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
April 25, 2023, 08: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
Pages: [1]
  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!