Home headlines How blockchain is protected using cryptography

How blockchain is protected using cryptography

Mar 10, 2018 am 09:19 AM
Protect Blockchain password

Cryptography is the science of applying mathematical functions to ensure data security.

Many popular film and television works imply to people that as long as there are powerful enough hackers, any system can be broken into. This type of "Hollywood hack" is not a real-world scenario - hackers must find exposed vulnerabilities in the system, such as unlocked server rooms, easy-to-guess passwords, unprotected network ports, or internally installed "backdoors" , thereby achieving unauthorized access.

While it is true that we can never ensure that a system is free from any vulnerabilities - after all, systems are built by imperfect humans, the idea that "any system can be broken" is wrong. Since the early 1990s, we have been completely immune to hackers using cryptography. However, the application of this technology sometimes leaves room for hackers to exploit it.

Cryptography itself cannot be hacked to generate forged digital signatures (definition will be given shortly), just like mathematics cannot be hacked to make 2+2=5-although cryptography and Mathematics can all be used incorrectly. If a system using cryptography is broken, it can only be because the designer applied the cryptography incorrectly. It's not because cryptography doesn't work, or because someone "broken" cryptography - it's not a math error when your bank mishandles your account, or your mom infects her computer by downloading an unfamiliar attachment. Viruses are not the same as email bugs. This is an important feature because Bitcoin is a very straightforward cryptography application.

Cryptography is not an untested new technology. All of the cryptographic techniques used by Bitcoin have been in use since the dawn of the Internet and are important parts of many common Internet protocols used every day. Computer scientists consider cryptography to be reliable and necessary, just as NASA considers aerospace science to be reliable and necessary.

Public-private key pair: the cornerstone of cryptography

The public-private key pair is the cornerstone of cryptography used in blockchain. A public-private key pair contains two parts: the private key and the public key. These two keys are really nothing more than large integers with a specific mathematical relationship that are used in place of passwords and usernames.

You will have a public key, just like your name or username: in most cases, you can share your public key with any requester, and the person who owns it can use it to To quote or contact you. It is tied to your reputation (or your transaction history in Bitcoin), so you may have multiple public keys (and therefore multiple public-private key pairs) for different purposes. The public key can be used to reference or view an account, but by itself it cannot do anything with the account.

The private key should be like a password: it should not be shared with anyone, it is used to verify certain actions, such as sending BTC (Bitcoin).

But there is an important difference between a private key and a password. To use a password, you must send it to a person or server so that it can be verified. You need to trust that the password will be handled responsibly after it is sent. In contrast, a private key can be used to prove one's identity without sending it to anyone. The only place it has ever been stored or used directly is on your local device.

This is important because if you can authenticate yourself without sending your secret information to anyone, you are guaranteed to have full control over its security - you are less vulnerable to other systems. Impact of security breaches. This is an important part of what makes Bitcoin unshakable. Bitcoin itself does not store passwords or private keys that could be leaked to attackers, but users can still verify transactions.

But if you never send your private key to anyone, how do you use your private key to verify transactions? The answer has to do with the mathematical relationship between private and public keys: digital signatures.

Digital Signatures

There are many different techniques for generating and verifying digital signatures, and the mathematics that underpin their work are well beyond the scope of this article. For those unfamiliar with cryptography, the process described here may initially sound unbelievable. I distinctly remember feeling this way when I first started studying Bitcoin four years ago.

Now I will briefly mention again that these techniques are used in many common Internet protocols and are an established part of information science.

Imagine there are two people, Alice and Bob, who have exchanged public keys privately. Alice wants to send a message to Bob, but Bob is a very suspicious person and does not believe that the message really comes from Alice unless he can prove it mathematically and deterministically. To facilitate proof, they agreed to use digital signatures.

To generate a signature, Alice uses a signature generation algorithm in her computer, which takes as input her private key and the complete message to generate a digital signature. She then sends this message/signature combination to Bob - but importantly, she does not send her private key.

When Bob receives the message and signature, he can invoke a complementary signature verification algorithm. The algorithm takes as input a message and a signature to determine the public key from the public-private key pair used by Alice to generate the signature. When Bob sees that his algorithm outputs Alice's public key, he has mathematically proven that the signature was indeed generated using Alice's public-private key pair, even if he does not know and cannot calculate the private key in Alice's public-private key pair. key.

More succinctly, this process of digital signing allows Bob to verify that the message was not created or modified by some third party, but must have been generated using Alice's private key, without having to (or cannot) Know her private key. All he needs is the message/signature combination and her public key.

Intuitively, this may seem implausible, and you may feel as if there is a misunderstanding somewhere. If Alice's private key and public key are closely related, and Alice uses her private key to generate the signature that Bob receives, then why can he only derive her public key but not her private key? Understanding the answer to this question requires a deeper understanding of mathematics than most people have, and is well beyond the scope of this book.

Despite this, the technology is relied upon every day and is considered rock solid within the cryptography community. When you visit a website whose address begins with https, the "s" indicates that the website authenticated itself using a digital signature. Your computer uses a signature verification algorithm, like Bob in the example above, to verify that the website actually comes from the correct public-private key pair. Digital signatures ensure that any further interactions between you and the website are encrypted and authenticated. If verification fails, the browser will warn you and mark the site as dangerous.

Big enough integer

Before this, I briefly mentioned that private and public keys function just like usernames and passwords, but in fact they just have a special mathematical relationship of large integers. Given this, I often get asked the following question: "Could you use a computer to guess or calculate a bunch of numbers and try to use them as a private key? Could they eventually hit a target public or private key?" "In fact, in the case of Bitcoin, this would make it possible for an attacker to steal some of the Bitcoins held by the public-private key pair."

That's a good question, but it's not going to happen. As mentioned before, there are several Bitcoin addresses that hold millions of dollars worth of BTC, but they have not been moved in years - even though all it takes to steal them is the right private key - which is the right big integer ! If you can guess the private keys of these addresses, then you can send the money from them to anyone. Unlike passwords, you can verify private keys locally on your machine, and there is no server limiting the number or frequency of your attempts.

Then why hasn’t anyone stolen the money yet? The answer lies in the almost ridiculous size of the numbers used as private keys. They are big enough.

We start with a simple thought experiment. Imagine that your private key is large enough that all the computers in the world working together would take them 24 hours to guess it. If you add just one digit to your private key, the computer will need ten times the computational effort, which means it will take ten days instead of one. Adding six digits would bring that time to 27,000 years.

In any case, the computational power required to create random numbers to generate a private key is trivial. Generating signatures using private keys and verifying these signatures using public keys is also computationally simple. But the amount of work required to guess the private key increases exponentially with each additional number added. To make a private key "immune" to brute force, we just need to add enough numbers - we just need to make them large enough.

How big is it? The private key used in Bitcoin is a 256-bit integer, which is equivalent to a number with a length of 76 bits. The size of this number is incredible. Most of the following explanations come from Bruce Schneier's book "Applied Cryptography", which provides an intuitive explanation of large enough integers.

First of all, you need to understand that a specific conclusion of the second law of thermodynamics is the minimum energy required to change the existence of a single binary bit of information (change 1 to 0 or vice versa). This means that regardless of the hardware used, any computational process requires some minimal energy to perform.

Now imagine that you are able to harness the entire energy output of the sun to power a specially designed computer whose job is to calculate or guess the private key to find a public-private key pair (that can control BTC ).

Using a little math and thermodynamics, you'll find that a highly efficient computer with the power to calculate the sun's energy output for an entire year can calculate 2178 values. If we divide this value by the number of possible private keys, which is 2256, we find that this hypothetical computer with the computing power of the sun's annual energy output can only guess or calculate 0.0000000000000000000003% of the total number of possible private keys.

Also, this is just a count and does not include the more complex task of actually checking each private key to verify that it corresponds to the correct public key. So this computer could miss the correct private key 0.0000000000000000000003% of the time in a year without it even realizing it.

These numbers have nothing to do with the technology of the device; they are the maximum possible values ​​based on the laws of thermodynamics established since the 1930s. These numbers mean that a brute force attack on a 256-bit key (the one used by Bitcoin) would be infeasible unless the computer was built from something other than matter and took up something other than space.

This is the ability of large enough integers. No matter how powerful a hacker is, unless he can use the power of 3×1023 suns to calculate a year, or the power of one sun to calculate 3×1023 years, his computer cannot even finish counting all the private keys—let alone Test or otherwise use them.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1664
14
PHP Tutorial
1268
29
C# Tutorial
1245
24
What kind of software is a digital currency app? Top 10 Apps for Digital Currencies in the World What kind of software is a digital currency app? Top 10 Apps for Digital Currencies in the World Apr 30, 2025 pm 07:06 PM

With the popularization and development of digital currency, more and more people are beginning to pay attention to and use digital currency apps. These applications provide users with a convenient way to manage and trade digital assets. So, what kind of software is a digital currency app? Let us have an in-depth understanding and take stock of the top ten digital currency apps in the world.

Quantitative Exchange Ranking 2025 Top 10 Recommendations for Digital Currency Quantitative Trading APPs Quantitative Exchange Ranking 2025 Top 10 Recommendations for Digital Currency Quantitative Trading APPs Apr 30, 2025 pm 07:24 PM

The built-in quantization tools on the exchange include: 1. Binance: Provides Binance Futures quantitative module, low handling fees, and supports AI-assisted transactions. 2. OKX (Ouyi): Supports multi-account management and intelligent order routing, and provides institutional-level risk control. The independent quantitative strategy platforms include: 3. 3Commas: drag-and-drop strategy generator, suitable for multi-platform hedging arbitrage. 4. Quadency: Professional-level algorithm strategy library, supporting customized risk thresholds. 5. Pionex: Built-in 16 preset strategy, low transaction fee. Vertical domain tools include: 6. Cryptohopper: cloud-based quantitative platform, supporting 150 technical indicators. 7. Bitsgap:

How to download, install and register the Hong Kong Digital Currency Exchange app 2025 How to download, install and register the Hong Kong Digital Currency Exchange app 2025 Apr 30, 2025 pm 07:18 PM

The download, installation and registration process of the Hong Kong Digital Currency Exchange app is very simple. Users can quickly obtain and use this app through the official app download link provided in this article. This article will introduce in detail how to download, install and register the Hong Kong Digital Currency Exchange app to ensure that every user can complete the operation smoothly.

Huobi Digital Currency Trading App Download Official Website. Correct Address. Domestic Huobi Digital Currency Trading App Download Official Website. Correct Address. Domestic Apr 30, 2025 pm 07:21 PM

Huobi Digital Currency Trading App is one of the world's leading digital asset trading platforms and is favored by the majority of users. In order to facilitate users to quickly and safely download and install Huobi app, this article will provide you with detailed download and installation tutorials. Please note that this article provides a download link to Huobi official app. Use the download link to this article to download safely to avoid mistakenly entering a copycat website or downloading to unofficial versions. Next, let us download and install Huobi app step by step.

Is the digital currency app formal? Top 10 formal and legal virtual currency trading apps in the world Is the digital currency app formal? Top 10 formal and legal virtual currency trading apps in the world Apr 30, 2025 pm 07:09 PM

Recommended cryptocurrency trading platforms include: 1. Binance: the world's largest trading volume, supports 1,400 currencies, FCA and MAS certification. 2. OKX: Strong technical strength, supports 400 currencies, approved by the Hong Kong Securities Regulatory Commission. 3. Coinbase: The largest compliance platform in the United States, suitable for beginners, SEC and FinCEN supervision. 4. Kraken: a veteran European brand, ISO 27001 certified, holds a US MSB and UK FCA license. 5. Gate.io: The most complete currency (800), low transaction fees, and obtained a license from multiple countries. 6. Huobi Global: an old platform that provides a variety of services, and holds Japanese FSA and Hong Kong TCSP licenses. 7. KuCoin

Is there a future for digital currency apps? Apple mobile digital currency trading platform app download TOP10 Is there a future for digital currency apps? Apple mobile digital currency trading platform app download TOP10 Apr 30, 2025 pm 07:00 PM

The prospects of digital currency apps are broad, which are specifically reflected in: 1. Technology innovation-driven function upgrades, improving user experience through the integration of DeFi and NFT and AI and big data applications; 2. Regulatory compliance trends, global framework improvements and stricter requirements for AML and KYC; 3. Function diversification and service expansion, integrating lending, financial management and other services and optimizing user experience; 4. User base and global expansion, and the user scale is expected to exceed 1 billion in 2025.

uniswap on-chain withdrawal uniswap on-chain withdrawal Apr 30, 2025 pm 07:03 PM

Uniswap users can withdraw tokens from liquidity pools to their wallets to ensure asset security and liquidity. The process requires gas fees and is affected by network congestion.

How to download the Hong Kong Digital Currency Exchange app? The top ten digital currency exchange apps are included How to download the Hong Kong Digital Currency Exchange app? The top ten digital currency exchange apps are included Apr 30, 2025 pm 07:12 PM

The methods to download the Hong Kong Digital Currency Exchange APP include: 1. Select a compliant platform, such as OSL, HashKey or Binance HK, etc.; 2. Download through official channels, iOS users download on the App Store, Android users download through Google Play or official website; 3. Register and verify their identity, use Hong Kong mobile phone number or email address to upload identity and address certificates; 4. Set security measures, enable two-factor authentication and regularly check account activities.