GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Update private_key.md by youngminpark2559 · Pull Request #81 · ProgrammingBlockchain/ProgrammingBlockchain

Conversation

@youngminpark2559

@youngminpark2559 youngminpark2559 commented Nov 13, 2017

Copy link
Copy Markdown
Contributor

For not making readers confused by giving them the idea that Bitcoin secret and private key are separated things.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@youngminpark2559
Update private_key.md
d4c9968
For not making readers confused by giving them the idea that Bitcoin secret and private key are separated things.
@NicolasDorier

NicolasDorier commented Nov 13, 2017

Copy link
Copy Markdown
Collaborator

I agree, the turn of the sentence is a bit weird though.
I would have said

Bitcoin secret is nothing more than Private key represented in Base58Check
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@youngminpark2559
Update comment
2845c76
By getting Nicolas advice.
@youngminpark2559

youngminpark2559 commented Nov 13, 2017

Copy link
Copy Markdown
Contributor Author

Sir, how do you think that below content will be attached in "private key" section as a Tip?
There are some wrong idea? Or is this needless?
In Bitcoin, we don't put raw private key into wallet or transaction for security reason.
Instead, we hash and encode raw private key into some format such as Bitcoin Secret represented in Base58Check, and generally use private key in such format. But again, Bitcoin secret is nothing more than Private key represented in Base58Check.
Since this format of private key can be used with Wallet, Bitcoin Secret is also known as Wallet Import Format(WIF).
You can see the more details and uses in "spend your coins" section of this chapter.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@youngminpark2559
Is adding "key" along with address more precise?
fa5e560
I saw like that in BIP38 (Part 2) section.
@youngminpark2559

youngminpark2559 commented Nov 13, 2017

Copy link
Copy Markdown
Contributor Author

Please anyone tells me if it's something wrong or not.
In P2PK[H] (Pay to Public Key [Hash]) section, the sentence says We learned that a Bitcoin Address was the hash of a public key.
However, they're different like this:
Console.WriteLine(publicKeyHash); // 41e0d7ab8af1ba5452b824116a31357dc931cf28
Console.WriteLine(bitcoinAddress); // 171LGoEKyVzgQstGwnTHVh3TFTgo5PsqiY

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@NicolasDorier

NicolasDorier commented Nov 13, 2017

Copy link
Copy Markdown
Collaborator

Using Base58 does not increase security. It is just a standard to present and import public key in a human friendly way.

Code should normally use Key, and only use BitcoinSecret at the UI Layer.

But for preventing from being confused note that Bitcoin secret is nothing more than Private key represented in Base58Check.

This sentence is strange. Maybe should you add some punctuation or remove "But for preventing from being confused".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@NicolasDorier

NicolasDorier commented Nov 13, 2017

Copy link
Copy Markdown
Collaborator

Bitcoin Address is the hash of the public key encoded in Base58.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

youngminpark2559 and others added 4 commits November 13, 2017 19:46
@youngminpark2559
Update private_key.md
6c1474e
Thank for explanations.
I personally think that in that context, "But for preventing from being confused" is better placed there for understanding. So, I put a punctuation at the end of it.
@youngminpark2559
Add contents about CombineSignatures()
0833f44
@youngminpark2559
Merge pull request #1 from youngmtool/youngmtool-patch-1
2360117
Add contents about CombineSignatures()
@nopara73
Merge branch 'master' into master
474bc99
@nopara73

nopara73 commented Nov 15, 2017

Copy link
Copy Markdown
Contributor

@bokobza I resolved this conflict the same way we resolved back then. As you can see it didn't get resolved, just like back then. Do you remember what was the GitHub bug we encountered and how we solved it?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

youngminpark2559 added 3 commits November 16, 2017 08:04
@youngminpark2559
Update bitcoin_address.md
7b44a07
I was confused when I was first reading this section by Key privateKey = new Key(); // generate a random private key
new Key() can be said as a private key? I think it's more near to a kind of key object.
So I edit that, if it's not appropriate, I will back to the original one.
And I add some contents for giving background basics about Base64, Base58 etc.
@youngminpark2559
Edit code block separation
967fda6
@youngminpark2559
Fix grammatical typos and add section separations
646bda1
NicolasDorier
NicolasDorier reviewed Nov 16, 2017
View reviewed changes
Comment thread other_types_of_ownership/multi_sig.md Outdated
Before sending the transaction to the network, examine the need of CombineSignatures() method.
Try to compare a full detail of transaction between bobSigned and fullySigned.
It will seem both are identical.
For this reason, it seems like the CombineSignatures() method is needless because mulit-signing has achieved without the CombineSignatures() method.

@NicolasDorier NicolasDorier Nov 16, 2017

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo mulit

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
NicolasDorier
NicolasDorier reviewed Nov 16, 2017
View reviewed changes
Comment thread other_types_of_ownership/multi_sig.md Outdated
.BuildTransaction(sign: false);


Transaction aliceSigned =

@NicolasDorier NicolasDorier Nov 16, 2017

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

identation

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
NicolasDorier
NicolasDorier reviewed Nov 16, 2017
View reviewed changes
Comment thread other_types_of_ownership/multi_sig.md Outdated
.AddKeys(alice)
.SignTransaction(unsignedNew);

Transaction bobSigned =

@NicolasDorier NicolasDorier Nov 16, 2017

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

identation

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
NicolasDorier
NicolasDorier reviewed Nov 16, 2017
View reviewed changes
Comment thread bitcoin_transfer/bitcoin_address.md Outdated

The Base58Check encoding has some neat features, such as checksums to prevent typos and a lack of ambiguous characters such as '0' and 'O'.
The Base58Check encoding also provides a consistent way to determine the network of a given address; preventing a wallet from sending MainNet coins to a TestNet address.
## Encoindg schemes {# encoindg-schemes}

@NicolasDorier NicolasDorier Nov 16, 2017

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo Encoindg

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
youngminpark2559 added 3 commits November 16, 2017 10:46
@youngminpark2559
Fix multi-signing to multi-sig
3123abb
@youngminpark2559
Fix an indentation
79d86de
@youngminpark2559
Fix typo
853b29e
@youngminpark2559

youngminpark2559 commented Nov 16, 2017

Copy link
Copy Markdown
Contributor Author

Thanks, Nicolas. I edited.
And I have a question.
In Multi Sig section, the words "multi-sig" and "ScriptPubKey" or the process of generating a ScriptPubKey don't make sense at the same time because sig means signing signature but generating a ScriptPubKey doesn't require signing signature but just a public key.
I think it's more appropriate that a ScriptPubKey is decorated by a kind of multi-publicKey rather than a multi-sig.

I wonder this.
Does the concept of multi-sig contain largely the following whole process?
1.Generating a ScriptPubKey by multiple publicKeys, and putting it into TxOut of an other getting coins transaction.
2.Proofing ownership of the recieved coins by multiple private keys or by multi-sig which is combined into one thing by multiple privatekeys.
3.Generating a scriptSig by processing multi-sig for a TxIn of a spending transaction.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

youngminpark2559 added 2 commits November 16, 2017 11:02
@youngminpark2559
Put a punctuation
23ece61
@youngminpark2559
Add additional explanation
10c85ab
@youngminpark2559

youngminpark2559 commented Nov 16, 2017

Copy link
Copy Markdown
Contributor Author

I also wonder this point.
1.
Can I solidify an idea that the process of generating a ScriptPubKey is eleminating a version byte which identifies a network type, and getting publicKey hash from a Bitcoin address(a version byte + a publicKey hash), and putting some script commands?

From above statement, can I consider the process of generating a Bitcoin address by a ScriptPubKey and network type as the same process of generating a Bitcoin address by a publicKey hash and network, except for direction(forwards for the latter, backwards for the former) and the fact that a ScriptPubKey only contains additional script commands, compared to a publicKey hash?

Can a ScriptPubKey be said as an address? Or can it be said as a value?
Got wondered from this sentence:
Notice the ScriptPubKey for testnet and mainnet address is the same ?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

youngminpark2559 added 3 commits November 16, 2017 12:43
@youngminpark2559
Update bitcoin_address.md
43d0674
@youngminpark2559
Update bitcoin_address.md
089cb6e
@youngminpark2559
Update bitcoin_address.md
515eecc
@NicolasDorier

NicolasDorier commented Nov 20, 2017

Copy link
Copy Markdown
Collaborator
  1. yes byte array of 32 bytes

  2. Encoders.Hex.EncodeData("key.ToBytes()")

  3. Not sure what you mean, a key is needed for many operations in Bitcoin. BitcoinSecret is a Key + Network. In Bitcoin processing code, Network information is never needed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@youngminpark2559

youngminpark2559 commented Nov 20, 2017

Copy link
Copy Markdown
Contributor Author

Thanks the review.
I tried this way.

I don't understand what you mean by Is it just a key object rather than specifying it as a private key

I thought this way,"Is it just a key object rather than specifying it as a private key?" or "Should it be named by keyObject rather than a privateKey?", when I was seeing this code:
Key privateKey = new Key();
So I thought readers would think this way too when they were seeing the code.
I'll change to the latter of the sentence which is more clear in the intention.

you instantiate a new object, not a class.

Fixed this way:
When you instantiate a Key object,

not necessarily true. On non-windows plateform it is untrue.

I think RNGCryptoServiceProvider things would be helpful for readers to understand widely, so I want to add explanations by your suggestion like this:
under the hood, in the case of .NET, you should invoke RNGCryptoServiceProvider to generate a key data and store it into a key object, which is a .NET wrapper around the Windows Cryto API. However, in the .NET, particular RNGCryptoServiceProvider is not mandatory, you can choose different generators you want to use. And also, since the RNGCryptoServiceProvider wouldn't work on the non-windows platform, you should choose appropriate generators on each platform.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

youngminpark2559 added 3 commits November 21, 2017 07:36
@youngminpark2559
Update bitcoin_address.md
0fe52c9
@youngminpark2559
Update arbitrary.md
53da20f
@youngminpark2559
Update arbitrary.md
ef6aa73
@NicolasDorier

NicolasDorier commented Nov 21, 2017

Copy link
Copy Markdown
Collaborator

I think RNGCryptoServiceProvider things would be helpful for readers to understand widely, so I want to add explanations by your suggestion like this:
under the hood, in the case of .NET, you should invoke RNGCryptoServiceProvider to generate a key data and store it into a key object, which is a .NET wrapper around the Windows Cryto API. However, in the .NET, particular RNGCryptoServiceProvider is not mandatory, you can choose different generators you want to use. And also, since the RNGCryptoServiceProvider wouldn't work on the non-windows platform, you should choose appropriate generators on each platform.

I prefer the book does not go into such details. People can easily look the source code, the only thing they need to know is that the default is using a secure RNG.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

youngminpark2559 added 2 commits November 21, 2017 12:24
@youngminpark2559
Update bitcoin_address.md
42ce6ed
@youngminpark2559
Update bitcoin_address.md
284c111
@youngminpark2559

youngminpark2559 commented Nov 21, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Okay, I agree on it and I'll keep that point in mind when I'm writing.
Fixed:
42ce6ed
284c111

I have some questions on the ScriptPubKey page:
https://github.com/ProgrammingBlockchain/ProgrammingBlockchain/blob/master/bitcoin_transfer/payment_script.md

Does that mean some ScriptPubKey doesn't contain the hashed public key like this?:
OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG
And if the omitted hashed public key represents the recipient, what's the role of that ScriptPubKey without the recipient but just script commands which are conditions?

I understood like this.
ScriptPubKey is composed of both of script commands which are opcodes and hashed public key.
Script commands may play a role explaining the conditions which should be met to claim ownership of the coins.
Hashed public key related to corresponding public key and private key may play a role explaining the address for the recipient.

But this sentence:
A ScriptPubKey does not necessarily contain the hashed public key(s) permitted to spend the bitcoin.

Hashed public key is the thing permitting someone to spend the coin which is the task related to proof the ownership of the coin?

Under my understanding, I think hashed public key just represents the recipient like the address, not being related to some tasks of permitting coins.

ScriptPubKey seems like it doesn't have the network information because hashed public key doesn't have it.
Blockchain sees the ScriptPubKey as the address of recipient but how does Blockchain distinguish the kind of network?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

youngminpark2559 added 13 commits November 21, 2017 13:16
@youngminpark2559
Update private_key.md
6fb599a
@youngminpark2559
Update transaction.md
e624bb2
@youngminpark2559
Update blockchain.md
1a79cb6
@youngminpark2559
Update blockchain.md
3caa60d
@youngminpark2559
Update blockchain.md
e3b4f8d
@youngminpark2559
Update blockchain.md
2a6dcd7
@youngminpark2559
Update blockchain.md
d3c9b31
@youngminpark2559
Update blockchain.md
c83cce3
@youngminpark2559
Update the_blockchain_is_more_than_just_bitcoin.md
21726d5
@youngminpark2559
Update proof_of_ownership_as_an_authentication_method.md
c8abaee
@youngminpark2559
Update proof_of_ownership_as_an_authentication_method.md
cb2bd3b
@youngminpark2559
Update spend_your_coin.md
a4c9f4a
@youngminpark2559
Update colored_coins.md
220b3de
NicolasDorier
NicolasDorier reviewed Nov 27, 2017
View reviewed changes
Comment thread bitcoin_transfer/blockchain.md Outdated

See the illustraion depicting a block and a blockchain, drawn by Youngmin Park, in the following link:

See the illustraion depicting a block and a blockchain, drawn by Youngmin Park(Youngmtool), in the following link:

@NicolasDorier NicolasDorier Nov 27, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*illustraion typo, and a TxIn IS an input. This is not a different thing.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@youngminpark2559
Update blockchain.md
9458ef8
@youngminpark2559

youngminpark2559 commented Nov 27, 2017

Copy link
Copy Markdown
Contributor Author

@NicolasDorier
Thanks. Fixed. But of TxIn and input. That's the point I asked to @nopara73
But I'm still confused by the terms for them.

Hope you review this thread from top one by one and give the opinion:
#94

And if you don't mind, I want to hear about above question of ScriptPubKey.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

youngminpark2559 added 5 commits November 28, 2017 00:12
@youngminpark2559
Update issuing_an_asset.md
f8bcaa5
@youngminpark2559
Update README.md
354703e
@youngminpark2559
Update bitcoin_address.md
8881763
@youngminpark2559
Update payment_script.md
971b4f8
@youngminpark2559
Update private_key.md
869b59f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@NicolasDorier NicolasDorier NicolasDorier left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@youngminpark2559 @NicolasDorier @nopara73
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.