Bitcoin Forum
April 26, 2024, 09:30:26 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Public Key & Private Key (number of digits)  (Read 422 times)
BITHISPANIA (OP)
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
January 05, 2018, 09:19:08 PM
 #1

We assume that we have created a "cold wallet" (Paper).

I am going to try to clarify some doubts related to the Public Key & Private Key.

According to BitcoinWiki:

Public Key

EN >  https://en.bitcoin.it/wiki/Address

ES > https://es.bitcoin.it/wiki/Dirección

The public key has a variable number of digits.
Exactly what variable number of digits  (In the Wiki there are contradictions.)?


Private Key

EN > https://en.bitcoin.it/wiki/Private_key

ES > https://es.bitcoin.it/wiki/Clave_privada


The private key has a variable number of digits.
Exactly what variable number of digits (In the Wiki there are contradictions.)?



1714167026
Hero Member
*
Offline Offline

Posts: 1714167026

View Profile Personal Message (Offline)

Ignore
1714167026
Reply with quote  #2

1714167026
Report to moderator
1714167026
Hero Member
*
Offline Offline

Posts: 1714167026

View Profile Personal Message (Offline)

Ignore
1714167026
Reply with quote  #2

1714167026
Report to moderator
1714167026
Hero Member
*
Offline Offline

Posts: 1714167026

View Profile Personal Message (Offline)

Ignore
1714167026
Reply with quote  #2

1714167026
Report to moderator
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
BITHISPANIA (OP)
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
January 05, 2018, 10:07:40 PM
 #2


Quote
You asked about "Public Key" and then you linked to "Address"?

The address and public key are not the same, but if they match; it is a fact.


We assume that we have created a "cold wallet" (Paper).
We are going to import the public key and the private key to Armory or Electrum.

How many digits (+ -) can a public key have?
"Can have" in usual format.

How many digits (+ -) can a private key have?
"Can have" in usual format.
BITHISPANIA (OP)
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
January 05, 2018, 11:13:42 PM
 #3


Quote
Define "Usual format".


Sorry.

Usual format: 3FkenCiXpSLqD8L79intRNXUgjRoH9sjXa (https://bitcoin.org/)
BITHISPANIA (OP)
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
January 05, 2018, 11:19:07 PM
 #4




3FkenCiXpSLqD8L79intRNXUgjRoH9sjXa  > 35 digits

Do public keys always have 35 digits?
Always (100%)?


And the private keys?
kahc
Member
**
Offline Offline

Activity: 350
Merit: 13


View Profile
January 05, 2018, 11:26:44 PM
 #5


Quote
You asked about "Public Key" and then you linked to "Address"?

The address and public key are not the same, but if they match; it is a fact.


We assume that we have created a "cold wallet" (Paper).
We are going to import the public key and the private key to Armory or Electrum.

How many digits (+ -) can a public key have?
"Can have" in usual format.

How many digits (+ -) can a private key have?
"Can have" in usual format.

Public addresses are part of a public key. So they can't match.
Technically speaking RIPEMD160(SHA256(public key)), and typically encoded as 34 base58 characters.

Private Key in uncompressed Hexadecimal Format is 32 bytes, or 64 characters in the range 0-9 or A-F.
Public key in uncompressed Hexadecimal Format is 65 bytes, or 130 characters in the range 0-9 or A-F.
BITHISPANIA (OP)
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
January 05, 2018, 11:40:15 PM
 #6



3FkenCiXpSLqD8L79intRNXUgjRoH9sjXa is a address & public key.
BITHISPANIA (OP)
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
January 05, 2018, 11:54:49 PM
 #7


I am going to change the question.


> https://www.bitaddress.org/

http://i63.tinypic.com/262761s.jpg


Do all the bitcoin addresses (100%) have 35 digits?

* 19rKUeffPYi8v81Y6Zurm8AvCMWqrNo3ha


Do all the private key (100%) have 52 digits?

* L3B6ErSDT6JThKiKgP2uT2HRP9nzdArDRtRSgNdChEdn5DFDwoVf
kahc
Member
**
Offline Offline

Activity: 350
Merit: 13


View Profile
January 06, 2018, 12:04:16 AM
 #8



3FkenCiXpSLqD8L79intRNXUgjRoH9sjXa is a address & public key.

3FkenCiXpSLqD8L79intRNXUgjRoH9sjXa is a public address, not a public key.


Do all the bitcoin addresses (100%) have 35 digits?
* 19rKUeffPYi8v81Y6Zurm8AvCMWqrNo3ha
19rKUeffPYi8v81Y6Zurm8AvCMWqrNo3ha is 34 characters.
Bitcoin addresses can be 26-35 characters long.


Do all the private key (100%) have 52 digits?
* L3B6ErSDT6JThKiKgP2uT2HRP9nzdArDRtRSgNdChEdn5DFDwoVf

Only WIF compressed private keys have 52 characters.
BITHISPANIA (OP)
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
January 06, 2018, 12:21:50 AM
 #9

Quote
Only WIF compressed private keys have 52 characters.

* L3B6ErSDT6JThKiKgP2uT2HRP9nzdArDRtRSgNdChEdn5DFDwoVf is private key compressed.


The uncompressed private key would have 51 digits.

Could you calculate an uncompressed private key?


Do  Multi-signature addresses fulfill the same characteristics (number digits)?
kahc
Member
**
Offline Offline

Activity: 350
Merit: 13


View Profile
January 06, 2018, 01:20:40 AM
 #10

Quote
Only WIF compressed private keys have 52 characters.

* L3B6ErSDT6JThKiKgP2uT2HRP9nzdArDRtRSgNdChEdn5DFDwoVf is private key compressed.
The uncompressed private key would have 51 digits.
Could you calculate an uncompressed private key?

Yes it is possible after some processing, here is an example with your above WIF compressed private key.

Code:
Compressed WIF private key.
L3B6ErSDT6JThKiKgP2uT2HRP9nzdArDRtRSgNdChEdn5DFDwoVf

1. Convert WIF Compressed to a byte string using Base58Check encoding.
80B1AD3B4DD66B34C8733077F7490ACF9007CCB833B6B4346B2515B784455E9BE2016CF7A0E6

2. Remove the last 5 Bytes (1 "Compress flag" Byte + 4 Checksum Bytes).
80B1AD3B4DD66B34C8733077F7490ACF9007CCB833B6B4346B2515B784455E9BE2

3. Remove the 1 Byte(Version Byte 0x80).
B1AD3B4DD66B34C8733077F7490ACF9007CCB833B6B4346B2515B784455E9BE2

4. Now you have the private key.
B1AD3B4DD66B34C8733077F7490ACF9007CCB833B6B4346B2515B784455E9BE2

5. Add version Byte to the front(0x80).
80B1AD3B4DD66B34C8733077F7490ACF9007CCB833B6B4346B2515B784455E9BE2

6. Perform SHA-256 hash on 5.
8073DE6EF5F032F8A2F8BADD0AFC36E76C36632B92F81B5CEF99E9B1CC1E628F

7. Perform SHA-256 hash on 6.
9985CF7A93E94280F204D605C3581D0B1EA50E91E6085C7AE664F11097EE5514

8. Take the first 4 bytes of the second SHA-256 hash, this is the checksum.
9985CF7A

9. Add the 4 checksum Bytes to the end of what you got on 5.
80B1AD3B4DD66B34C8733077F7490ACF9007CCB833B6B4346B2515B784455E9BE29985CF7A

10. Convert the result from a byte string into a base58 string using Base58Check encoding.
5KAY6QSCRwfr6WceJz6sQ7doJhxjWVWjEo65usfZZE4MBY8b7cM

If I haven't made any mistakes during the process,your WIF private key should be 5KAY6QSCRwfr6WceJz6sQ7doJhxjWVWjEo65usfZZE4MBY8b7cM



Do  Multi-signature addresses fulfill the same characteristics (number digits)?

A multi-signature address is basically the same as a normal public address, except for they always begins with a '3', instead of a '1'.
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!