0

Ultimate Go: Advanced Engineering Episode 12

 1 year ago
source link: https://www.ardanlabs.com/blog/2023/01/ultimate-go-advanced-engineering-episode-12.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Ultimate Go: Advanced Engineering Episode 12

Author image

Cheikh Seck

January 4, 2023

Introduction

In episode 11, Bill highlighted the issue of identity verification and provided a solution to this problem. The solution proposed was to cryptographically sign a transaction to verify its authenticity. Bill chose to implement a solution making use of the Elliptic Curve Digital Signature Algorithm (ECDSA) as the public key can be extracted from a signature. Although a small distinction, the ability to re-compute a public key is essential in a decentralized and distributed environment.

In this video, Bill will begin to write Go code for his scratch program. He will define a package with the single responsibility of managing the cryptographical aspects of his blockchain. Prior to writing any code in this package, Bill cites the features he wants to see for his hashing function. Bill states that the hash function should: create consistent hashes from similar values, be impossible to correlate two hashes and reduce the risk of collision as much as possible. Watch and learn how to generate the hash of a transaction with packages found in Go’s standard library.

Things you will learn in this video

  • How to hash a data type in Go with the standard library.
  • How to generate the hexadecimal value of a hash with the Ethereum Go library.
  • The qualities of the ideal hashing algorithm.

Video


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK