An in-depth review of blockchain - cryptography and metaverse (part twelve - cryptography - digitale Signatur -HASH Function)

An in-depth review of blockchain - cryptography and metaverse (part twelve - cryptography - digitale Signatur -HASH Function)

What is a digital signature?

The digital signature is based on encryption methods using public and private keys. Currently, it is used in many countries for various applications, from issuing e-mails, to financial transfers, to signing binding documents, as a tool that gives life to information, and its use in electronic networks has become a necessity, and in In a situation where e-mails sent to a person's e-box cannot be security-certified, digital signatures enable the person concerned to carry out their transactions in a security-conscious manner.

What security does a digital signature offer?

Authentication: Authentication is the assurance that the person or party with whom we are communicating is who we expect and who they claim to be.

Confidentiality: The information in the messages or exchanges is confidential and can only be understood and read by the sender and recipient.

Confidentiality: The information contained in the messages or exchanges is not accidentally or intentionally tampered with along the way.

Non-repudiation: The sender cannot deny sending a message or financial exchange, nor can the recipient deny receiving it.


How is a digital signature created?

Before you know how a digital signature works, you must first become familiar with a few terms related to this topic:

Keys: Keys are used to create digital signatures. Every digital signature has a public key and a private key. The private key is the part of the key that you use to sign a message. The private key is a protected password and should not be shared with others. The public key is the part of the key that can be used by other people. If the above key is sent to a public key ring or a specific person, they can use it to verify your signature.

Keyring: Contains public keys. A keyring consists of the public keys of the people who sent you their keys, or the keys that you received from a public key service provider. A public-key server holds the keys of people who are allowed to send public keys.

Fingerprint: When a key is verified, the uniqueness of a series of letters and numbers that contain a key's fingerprint is confirmed.

Key Certificates: When you select a key from a keyring, you can view the key certificate (license). Various information such as key owner, creation date and key validity can be obtained.

I have fully explained the rest of the explanations in the previous sections and there is no need to explain them again


HASH

HASH FUNCTION

No alt text provided for this image

Let's say you're sending a very important file and you want to make sure it gets to your recipient in one piece with no changes. You can use some trivial methods like: For example, sending the file multiple times, calling the contact and getting a confirmation of receipt of the file, etc., but there's a much better way to ensure the file is sent lossless: using a hash algorithm. But what is the hash function? What is its use and how can hash be used?

Definition of the hash algorithm in simple language

A hash algorithm is a cryptographic hash function. As mentioned earlier, this mathematical algorithm converts any input into a fixed-size hash.

A hash function algorithm is designed to be a one-way function and cannot be reversed. However, in recent years, several hashing algorithms have uncovered vulnerabilities and compromised data. For example, MD5 hash algorithm faces such a problem and it is easy to reverse it and get the original data.


An ideal hash algorithm should have the following properties:

  • ? Can accept any type of input data quickly
  • ? A reconstruction of the original message from the hash value is not possible
  • ? It is impossible to create the same hash for two different primary data
  • ? Any change in the message, even the smallest change, results in a change in the hash value. (which is called the avalanche effect)

No alt text provided for this image

Cryptographic hash functions are widely used in information technology. We can use them for digital signatures, message authentication codes (MACs), and other forms of authentication. We can also use them to index data in hash tables to create fingerprints, identify files, identify duplicates or as a checksum of data (we can determine if a file sent has been corrupted accidentally or intentionally).

Another use of hashes in computers is to store passwords. If you have a website, you don't necessarily need to save the entire password. With the hash algorithm, you only need to check if the user's registered password matches the entered password. Hash algorithms help you with this. When registering a password, a hash is created from it.

Their hashes will not match unless the password input value is exactly the same as the password registered on subsequent visits to the site. That's why the password is case-sensitive. Because even this small change changes the hash value.

No alt text provided for this image

If you also send the hash of the file this way along with your friend, they can convert the file to a hash using the same algorithm and make sure that the hash you sent and the hash created from the file they received are the same. .

Since one of the properties of the hash is that no two different files will have the same hash even with the slightest change, the same hash of the sent and received file means it has not been changed. In the same way, when buying Litecoin, you can ensure that no changes are made to your sent and received data on the network by using the SHA-256 algorithm (Bitcoin algorithm and its forks).

What is the Bitcoin hash function?

The Bitcoin network uses the SHA-256 algorithm, which is considered to be a very secure algorithm. Bitcoin's hash function is 256-bit and can provide cryptographic security to the network. This hash function cannot create identical hashes for different data and has a relatively high hashing speed. DuPont's Treadwell Stanton announced that he was able to crack this algorithm. However, this does not call into question the security of Bitcoin.

Miners on the Bitcoin network match the hash of the sender and receiver, making sure they are the same. The existence of miners can significantly increase the security of the network. However, increasing the difficulty of the network by increasing the number of transactions and increasing the number of hashes has meant that miners need powerful devices to verify the correctness of events. Miners with a high hash rate can analyze a large number of hashes per second. Therefore, the hash rate or the number of hash operations performed on the network is very important.

Ethan Mehta

Connecting Innovators in the Crypto Space | Business Development Specialist | Blockchain Enthusiast | Singapore-Based with Indian Roots

2 个月

Mor, thanks for sharing!

回复
Maiia Sariia

?? Researcher in WANTED | People & Tech Insights

1 年

Mor, thanks for sharing!

要查看或添加评论,请登录

Mor Monshizadeh的更多文章

社区洞察

其他会员也浏览了