Blockchain Blog 06 — Cryptography, Security, and Crypto Wallets

Aakash S
Coinmonks
10 min readFeb 21, 2022

--

Since the beginning of the banking system, banks and credit card companies have helped us in protecting our money. But when it comes to cryptocurrencies, it will be different security aspects that we need to understand.

Cryptography is the core of cryptocurrencies. In this new digital reality, it will be cryptography that will protect your money.

Cryptography is the study of secure communications techniques that allow only the sender and intended recipient of a message to view its contents. The term is derived from the Greek word kryptos, which means hidden. Cryptography is closely associated with encryption, which is the act of scrambling ordinary text into what’s known as ciphertext and then back again upon arrival. If the message is intercepted, a third party has everything they need to decrypt and read the message. (Source: Kaspersky)

In 1976, Martin Hellman along with Whitfield Diffie published a paper: New Directions in Cryptography. It introduced a radically new method of distributing cryptographic keys, which went far toward solving one of the fundamental problems of cryptography, key distribution. It has become known as Diffie–Hellman key exchange. The article stimulated the development of a new class of encryption algorithms, known variously as public-key encryption and asymmetric encryption. After some years, an undergraduate, Merkle devised Merkle’s Puzzles, a scheme for communication over an insecure channel, as part of a class project. The scheme is now recognized to be an early example of public-key cryptography.

By contrast, in a public key system, the public keys can be disseminated widely and openly, and only the corresponding private keys need to be kept secret by its owner.

The public key is like an email address, through which you can send the cryptocurrency. Where a private key is like a password that only you can access in order to have access to our cryptos. So if someone needs to send cryptocurrencies to me then they need my public key, and if I need to have access to the cryptocurrencies which has been sent to me, I need a private key. Public-key cryptography, or asymmetric cryptography, is a cryptographic system that uses pairs of keys. Each pair consists of a public key (which may be known to others) and a private key (which may not be known by anyone except the owner). The generation of such key pairs depends on cryptographic algorithms which are based on mathematical problems termed one-way functions. Effective security requires keeping the private key private; the public key can be openly distributed without compromising security. If a public key is lost, through private key new public key can be generated, but if you lose your private key then there is no recovery.

Now when we talk about cryptocurrencies, it is better to know the basics of cryptography because whenever there is computer programming-related innovation then there is always vulnerability associated with it, and when we are talking about something where huge money is involved it is better to stay aware of above terms.

Secure Hash Algorithm

There is something called SHA stands for Secure Hash Algorithm. SHA is the acronym for Secure Hash Algorithm, used for hashing data and certificate files SHA-256 is used for cryptographic security. A cryptographic hash is a kind of ‘signature’ for a text or a data file.

A hash is not ‘encryption’ — it cannot be decrypted back to the original text (it is a ‘one-way’ cryptographic function, and is a fixed size for any size of source text). This makes it suitable when it is appropriate to compare ‘hashed’ versions of texts, as opposed to decrypting the text to obtain the original version.

SHA-256 is one of the successor hash functions to SHA-1 (collectively referred to as SHA-2) and is one of the strongest hash functions available. SHA-256 is not much more complex to code than SHA-1 and has not yet been compromised in any way. The algorithm is a variant of the SHA-2 (Secure Hash Algorithm 2), developed by the National Security Agency (NSA). SHA-256 is also used in popular encryption protocols such as SSL, TLS, SSH, and open-source operating systems such as Unix/Linux. The hash algorithm is extremely secure. It’s used by the United States government to protect sensitive information, thanks to its ability to verify the content of data without revealing it due to the use of digital signatures. Furthermore, it is also utilized for password verification, since it conveniently does not require the storage of exact passwords, as the hash values can be stored and matched with the user entry to verify if it’s correct or not.

Even if we change 1 text the entire hash will be newly generated.

Secure Hashing Algorithm (SHA) -256 is the hash function and mining algorithm of the Bitcoin protocol, referring to the cryptographic hash function that outputs a 256 bits long value. It moderates the creation and management of addresses and is also used for transaction verification.

A cryptographic hash function that generates a 256-bit signature for a text, used in Bitcoin proof-of-work (PoW).

Secure Hashing Algorithm (SHA) -256 is the hash function and mining algorithm of the Bitcoin protocol, referring to the cryptographic hash function that outputs a 256 bits long value. It moderates the creation and management of addresses and is also used for transaction verification. Bitcoin uses double SHA-256, meaning that it applies the hash functions twice. It is nearly impossible to reveal the initial data from a hash value itself. Moreover, a brute force attack is extremely unlikely to succeed thanks to the astronomical number of potential combinations. In addition, it’s also severely unlikely that two data values (known as collision) have the same hash.

Cryptocurrency, Public and Private Keys

A cryptocurrency wallet works by a theoretical or random number being generated and used with a length that depends on the algorithm size of the cryptocurrency’s technology requirements. The number is then converted to a private key using the specific requirements of the cryptocurrency cryptography algorithm requirement. A public key is then generated from the private key using whichever cryptographic algorithm requirements are required. The private key is utilized by the owner to access and send cryptocurrency and is private to the owner, whereas the public key is to be shared with any third party to receive cryptocurrency.

Up to this stage, no computer or electronic device is required and all key pairs can be mathematically derived and written down by hand. The private key and public key pair (known as an address) are not known by the blockchain or anyone else. The blockchain will only record the transaction of the public address when cryptocurrency is sent to it, thus recording in the blockchain ledger the transaction of the public address.

Cryptocurrency Wallet

We need a wallet for storing fiat currencies or paper currencies, in a similar way we need a wallet in order to store cryptocurrencies, now these cryptocurrencies can not be stored in all kinds of digital wallets, some wallets are designed for particular cryptocurrencies, and some to store multiple of those.

Cold Wallet and Hot Wallet:

Anything that can be stored offline is called cold storage. And anything which is stored on the internet or which requires the internet to access is called hot storage.

The money we store in our home, in a locker, or a cryptocurrency which is stored on hardware that can be connected to a computer without the need of internet access can be said to have hot storage, whereas the cryptocurrencies stored online on cloud storage is called cold storage wallet. for example Coinbase. Crypto wallets keep your private keys — the passwords that give you access to your cryptocurrencies — safe and accessible, allowing you to send and receive cryptocurrencies like Bitcoin and Ethereum. They come in many forms, from hardware wallets like Ledger (which looks like a USB stick) to mobile apps like Coinbase Wallet, which makes using crypto as easy as shopping with a credit card online.

Using an app like Coinbase Wallet or Exodus gives you easy access to your crypto holdings. You can:

  • Manage all your digital assets in one secure place
  • Control your own private keys
  • Send and receive cryptocurrency to and from anywhere in the world
  • Interact with usernames rather than long, hexadecimal “public key” addresses
  • Browse dapps (decentralized finance apps)
  • Shop at stores that accept cryptocurrency

A cryptocurrency wallet is a device, physical medium, program or service which stores the public and/or private keys or cryptocurrency transactions. In addition to this basic function of storing the keys, a cryptocurrency wallet more often also offers the functionality of encrypting and/or signing information. Signing can for example result in executing a smart contract, a cryptocurrency transaction (see “bitcoin transaction” image), identification or legally signing a ‘document’

Why are crypto wallets important? Unlike a normal wallet, which can hold actual cash, crypto wallets technically don’t store your crypto. Your holdings live on the blockchain, but can only be accessed using a private key. Your keys prove your ownership of your digital money and allow you to make transactions. If you lose your private keys, you lose access to your money. That’s why it’s important to keep your hardware wallet safe or use a trusted wallet provider like Coinbase.

Types of Crypto Wallets?

Crypto wallets range from simple-to-use apps to more complex security solutions. The main types of wallets you can choose from include:

  • Paper wallets: Keys are written on a physical medium like paper and stored in a safe place. This, of course, makes using your crypto harder, because digital money it can only be used on the internet.
  • Hardware wallets: Keys are stored in a thumb-drive device that is kept in a safe place and only connected to a computer when you want to use your crypto. The idea is to try to balance security and convenience.
  • Online wallets: Keys are stored in an app or other software — look for one that is protected by two-step encryption. This makes sending, receiving, and using your crypto as easy as using an online bank account, payment system, or brokerage.

Each type has its tradeoffs. Paper and hardware wallets are harder for malicious users to access because they are stored offline, but they are limited in function and risk being lost or destroyed. Online wallets offered by a major exchange like Coinbase are the simplest way to get started in crypto and offer a balance of security and easy access. (Because your private info is online, your protection against hackers is only as good as your wallet provider’s security — so make sure you look for features like two-factor verification.)

In this part, we covered cryptography, security, and types of crypto wallets that can be used to store a cryptocurrency. In the future part, we will explore Crypto Exchanges. Almost all the cryptocurrencies trades which take place today happen through crypto exchanges.
But before exploring the crypto exchanges it will be better if we further dive deeper into Blockchain Technology, and try to answer the questions like What is Mining?, How Bitcoin Mining takes place? and etc.

--

--