Bitcoin Forum
May 02, 2024, 10:25:06 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Two questions about bitcoin public key  (Read 273 times)
javadsalehi (OP)
Member
**
Offline Offline

Activity: 364
Merit: 13


View Profile
September 10, 2019, 11:03:24 AM
Merited by ABCbits (1), o_e_l_e_o (1)
 #1

1. Why doesn't any public key contain "zero" ?
2. As far as I know there is no difference between uppercase and lowercase letters when we make a transaction. So, why are there both uppercase and lowercase letters in the public key when they are shown on different block explorers?
1714645506
Hero Member
*
Offline Offline

Posts: 1714645506

View Profile Personal Message (Offline)

Ignore
1714645506
Reply with quote  #2

1714645506
Report to moderator
Every time a block is mined, a certain amount of BTC (called the subsidy) is created out of thin air and given to the miner. The subsidy halves every four years and will reach 0 in about 130 years.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3131



View Profile
September 10, 2019, 11:11:05 AM
Last edit: September 10, 2019, 11:22:10 AM by BitCryptex
Merited by Foxpup (2), ABCbits (1), Pmalek (1), o_e_l_e_o (1)
 #2

1. Why doesn't any public key contain "zero" ?

Bitcoin addresses are encoded in a way which makes it easier for a human to read them. Zero could be mistaken for 'o'. The public key itself can contain zero.

Bitcoin addresses are implemented using the Base58Check encoding of the hash of either:
Pay-to-pubkey-hash (p2pkh): payload is RIPEMD160(SHA256(ECDSA_publicKey)) where ECDSA_publicKey is a public key the wallet knows the private key for

Here's an example of an ECDSA publicKey - 0250863ad64a87ae8a2fe83c1af1a8403cb53f53e486d8511dad8a04887e5b2352

2. As far as I know there is no difference between uppercase and lowercase letters when we make a transaction.

There is a difference. Only native SegWit addresses (the ones starting with bc1) are not case sensitive. They are encoded in a different way.
aundroid
Legendary
*
Offline Offline

Activity: 1232
Merit: 1247



View Profile
September 10, 2019, 12:05:34 PM
Merited by ABCbits (1), o_e_l_e_o (1)
 #3

1. Why doesn't any public key contain "zero" ?

As far as I know, the Base58 encoding removes all the characters 0, O, I, l

2. As far as I know there is no difference between uppercase and lowercase letters when we make a transaction. So, why are there both uppercase and lowercase letters in the public key when they are shown on different block explorers?

only bech32 type addresses (starting with bc1) are case-INsensitive, the others are case sensitive.

►►►     MY TOPICS     ◄◄◄
➤ Blockchain Basics - FAQ DE    ➤ [Guide] Protect your Crypto: Security tips for your home computer & network DE | EN    ➤ Crypto SCAM - HowTo protect yourself EN    ➤ [CHECKLISTE] zur Bewertung von ICOs  DE
➤ [Overview] Exchanges, IEOs and their ROIs DE | EN   ➤ [Howto] Use Ledger Nano as Security Key DE | EN    ➤ [OVERVIEW] Recommended Crypto Telegram Bots  DE | EN    ➤ [Overview] GUI Miner DE | EN
➤ Activity, Merit und Ranganforderungen im Forum DE    ➤ Alternativen zu Piggy's Notification Bot DE    ➤ [Howto] Give Bitcoin as a gift  DE | EN
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18509


View Profile
September 10, 2019, 03:02:11 PM
Merited by Foxpup (1), ABCbits (1), aundroid (1)
 #4

As far as I know, the Base58 encoding removes all the characters 0, O, I, l
It also removes the characters "+" and "/" when compared to the more familiar Base64.

A key is just a long number. It can be expressed in any base you like. You could use Base10 if you wanted, or even Base2, in which case there would be loads of zeroes. We use Base58 to make the number shorter, more easily readable, and reduce the chance of mistaken characters as above.

Bech32 addresses use a custom character set of 32 characters - all case insensitive letters (26) and numbers (10), minus "1", "b", "i" and "o" (outside of the first 3 characters "bc1", known as the human readable part and the separator). This has the advantage of being impossible to make mistakes regarding upper or lower case, as well as generating smaller QR codes. You can read more about this in BIP 173.
javadsalehi (OP)
Member
**
Offline Offline

Activity: 364
Merit: 13


View Profile
September 10, 2019, 07:53:36 PM
Merited by ABCbits (1)
 #5

Bech32 addresses use a custom character set of 32 characters - all case insensitive letters (26) and numbers (10), minus "1", "b", "i" and "o" (outside of the first 3 characters "bc1", known as the human readable part and the separator). This has the advantage of being impossible to make mistakes regarding upper or lower case, as well as generating smaller QR codes. You can read more about this in BIP 173.
So, characters that are excluded in generating Bech32 and P2PKH addresses are different.
Bech32: 1 , b , i , o
P2PKH: O , I ( uppercase letter) , l (lowercase letter) , 0
Am I right?
I wonder why "b" and "i" are excluded in Bech32 addresses. I think uppercase letter "I" and lowercase letter "l" can cause visual ambiguity much more than "b" and "i". Every one will distinguish "b" and "i" from other characters easily.
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18509


View Profile
September 10, 2019, 08:24:11 PM
Merited by ABCbits (1), TalkStar (1), javadsalehi (1)
 #6

Bech32: 1 , b , i , o
P2PKH: O , I ( uppercase letter) , l (lowercase letter) , 0
Am I right?
Yes, this is correct.

I wonder why "b" and "i" are excluded in Bech32 addresses. I think uppercase letter "I" and lowercase letter "l" can cause visual ambiguity much more than "b" and "i". Every one will distinguish "b" and "i" from other characters easily.

You can read about the reasoning behind excluding those characters here in the BIP 173 link I posted above:

The character set is chosen to minimize ambiguity according to this visual similarity data, and the ordering is chosen to minimize the number of pairs of similar characters (according to the same data) that differ in more than 1 bit

Also see this quote from Greg Maxwell:

We did, the character set does not include "1", "b", "i", or "o"; which is the unique selection which minimizes the number of visually confusing pairs, at least given the NIST visual confusion data we had available to us at the time.

By excluding "1" and "i" you remove the confusion with "l". By excluding "o", you remove the confusion with "0". By excluding "b", you remove any confusion with "h" or "6", or in case of using all uppercase, "B" and "8".
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!