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

Trusted by Top Technology Companies

We've built our reputation as educators and bring that mentality to every project. When you partner with us, your team will learn best practices and grow along the way.

30,000+

Engineers Trained

1,000+

Companies Worldwide

14+

Years in Business