Bitcoin Deep Dive | Part 1 — The Cryptographic Pillars

Mark Vaykhansky
3 min readFeb 5, 2022

This post series is a deep dive into Bitcoin. I will also try to make it a simple as possible. The following article explains the cryptographic pillars upon which Bitcoin is built.

Bitcoin is a digital currency and it is the first digital currency that utilized the concept of a Blockchain, which is now widely spread, to store transactions.

Blockchain is only one of many components, alongside proof of work which is mentioned below, put together that made Bitcoin innovative and popular.

Cryptography

All the ‘good’ properties of Bitcoin are based on a few cryptographic truths. Cryptography is the field which studies the means of secure messages exchange between sender and recipient which allows both parties to view it’s content.

The origins of cryptography are ancient, the widely known Caesar cipher date over 2000 years ago. In the modern computer age we encounter cryptography almost every moment. For example TLS, more commonly known as SSL, provides Privacy, Integrity and Authentication and it is used in Browsers, VoIP, communication in the Cloud, Banking, etc.

All modern computer programs require some form of cryptographic capabilities to provide minimum viable experience for their customers.

Hash Functions

A hash function is a mathematic function that takes an arbitrary input (i.e of any length) and returns a string of a fixed length called a hash (or digest). A cryptographic hash function is a hash function that has a few security properties, mainly:

  1. Collision resistant Hash function f is said to be collision resistant if and only if it is infeasible to find in two inputs x and y such that f(x) == f(y) within a reasonable timeframe.
  2. Random — A change of a single bit of an input x results in a completely different and unpredictable hash. Thus given an input x and it’s hash h it is infeasible to find and input y such that f(x) == f(y) within a reasonable timeframe.
  3. Irreversible — Given a hash value h it is infeasible to find an input x such that f(x) == h within a reasonable timeframe.

The insistence upon “within a reasonable timeframe” is very important. All cryptographic hash functions can be broken with a brute force approach — but it would take more years than the earth exists which is, as stated above, infeasible.

Cryptographic hash functions are at the hart of current security protocols, including said TLS for example.

SHA-256, which is part of the SHA-2 hash functions family, is the hash function used in Bitcoin. It is used for the proof of work which is what makes it hard to mine Bitcoin, more on that in future articles.

Asymmetric Cryptography

Asymmetric cryptography refers to cryptography systems that have two sets of keys — a public key and a private key. One use case of asymmetric cryptography is digital signatures. Given a private and public key pair and a document, the holder of the private key can sign the document with the private key and the signature can be verified with the public key.

The public key being public allows everyone in the world to verify that the particular document was signed by the particular individual that claims to posses the private key.

If someone attempts to sign the document with a different key it will be found out using the public key. Moreover, the assertion of a signature using the public key is immediate, as opposed to the signing with the private key which can take some computational power and thus time.

This ability to sign documents, or any array of bits for that matter, is what Bitcoin uses to validate that transactions were made by the owner of the account.

Conclusion

Cryptography allows a secure way for message exchange in the presence of adversaries. Cryptographic hash functions and asymmetric cryptography are the bedrock of the Bitcoin technology.

Public and private key pairs are used for the signing of transactions and hash functions are a critical component of Bitcoin’s proof of work concept.

In further posts I will explain step by step how Bitcoin works how the concepts discussed above fit in.

--

--

Mark Vaykhansky

I'm a Software Engineer passionate about technology and leadership