Cryptographic Hash 101

A cryptographic hash function is a hash function that satisfies the properties of pre-image resistance, second pre-image resistance and collision resistance. Here, a hash function is a mathematical algorithm that maps data of an arbitrary size (or “message”) to a bit array of a fixed size (the “hash value”, “hash”, or “message digest”), that is, a function that takes a string of any size as input and produces a fixed length value.

Pre-image resistance
Given a hash value h, it should be difficult to find any message m such that

h = hash(m)

Second pre-image resistance (weak collision resistance)
Given an input m1, it should be difficult to find a different input m2 such that

hash(m1) = hash(m2)

Collision resistance (strong collision resistance)
It should be difficult to find two different messages m1 and m2 such that

hash(m1) = hash(m2)

A pair of messages that has the same hash value is called a cryptographic hash collision.

Similar Posts

  • How to get the hostname of the node in C++?

    In C++, how to get the hostname of the node? In C++, the C way works too. However, with Boost, you can use the boost::asio::ip::host_name() function to get the hostname as a std::string: namespace boost { namespace asio { namespace ip { /// Get the current host name. BOOST_ASIO_DECL std::string host_name(); … More at http://www.boost.org/doc/libs/1_63_0/boost/asio/ip/host_name.hpp…

  • Multisig 101

    Multisig, short for “multisignature,” is a cryptographic mechanism that requires multiple signatures to authorize and execute a transaction. What is Multisig Multisig ensures that multiple parties must collaborate and approve a transaction before it can be deemed valid. It provides an additional layer of security requiring multiple parties’ signatures to spend or transfer the crypto…

  • Decentralization 101

    Decentralization is a concept about control and management. It refers to that the control and decision-making in a distributed network are transferred away from a centralized entity (individual, organization, or group thereof). The resources in a decentralized network are owned and shared by network members. This concept is particularly significant in the world of blockchain…

  • Bitcoin 101

    Bitcoin is the world’s first cryptocurrency on the Bitcoin blockchain network. BTC has gained significant popularity since its inception in 2009. It functions as a decentralized, peer-to-peer electronic cash system, allowing users to make transactions without the need for a central authority. Bitcoin History Bitcoin’s story begins with the release of a whitepaper by an…

  • Cryptographic token 101

    Cryptographic tokens, or crypto tokens, are tradable digital units of assets that reside on blockchains. These tokens have become increasingly popular in recent years due to the rise of cryptocurrencies and the growing interest in non-fungible tokens (NFTs). Both fungible and non-fungible tokens play a significant role in the world of blockchain technology and digital…

  • NFT 101

    What is NFT? Non-Fungible Token (NFT) is a kind of blockchains. What distinguishes NFTs from fungible , and ownership of the NFT is often associated with a license to use the underlying asset. There are standards or convensions for NFTs on blockchain. For example, ERC-721 is a standard for representing non-fungible digital assets on the…

Leave a Reply

Your email address will not be published. Required fields are marked *