You are on page 1of 35

Block chain Architecture

Block chain Hash Function


Create Crypto currency
Block chain Architecture :
Block chain is a technology where multiple parties involved in
communication can perform different transactions without third-party
intervention. Verification and validation of these transactions are
carried out by special kinds of nodes.
• Header: It is used to identify the particular block in the entire
blockchain. It handles all blocks in the blockchain. A block header
is hashed periodically by miners by changing the nonce value as
part of normal mining activity, also Three sets of block metadata
are contained in the block header.
• Previous Block Address/ Hash: It is used to connect the
i+1th block to the ith block using the hash. In short, it is a reference
to the hash of the previous (parent) block in the chain.
• Timestamp: It is a system verify the data into the block and assigns a
time or date of creation for digital documents. The timestamp is a string
of characters that uniquely identifies the document or event and indicates
when it was created.
• Nonce: A nonce number which uses only once. It is a central part of the
proof of work in the block. It is compared to the live target if it is smaller
or equal to the current target. People who mine, test, and eliminate many
Nonce per second until they find that Valuable Nonce is valid.
• Merkel Root: It is a type of data structure frame of different blocks of
data. A Merkle Tree stores all the transactions in a block by producing a
digital fingerprint of the entire transaction. It allows the users to verify
whether a transaction can be included in a block or not.
Key Characteristics of Block chain Architecture
• Decentralization: In centralized transaction systems, each transaction
needs to be validated in the central trusted agency (e.g., the central
bank), naturally resulting in cost and the performance jam at the
central servers. In contrast to the centralized mode, a third party is not
needed in the block chain. Consensus algorithms in block chain are
used to maintain data stability in a decentralized network.
• Persistency: Transactions can be validated quickly and invalid
transactions would not be admitted by persons or miners who mining
the crypto. It is not possible to delete or roll back transactions once
they are included in the block chain network. Invalid transactions do
not carry forward further.
• Anonymity: Each user can interact with the blockchain with a
generated address, which does not disclose the real identity
of the miner. Note that blockchain cannot guarantee perfect privacy
preservation due to the permanent thing.
• Auditability: Blockchain stores data of users based on the Unspent
Transaction Output (UTXO) model. Every transaction has to refer
to some previous unspent transactions. Once the current
transaction is recorded into the blockchain, the position of those
referred unspent transactions switches from unspent to spent. Due
to this process, the transactions can be easily tracked and not
harmed between transactions.
• Transparency: The transparency of block chain is like crypto
currency, in bit coin for tracking every transaction is done by the
address. And for security, it hides the person’s identity between and
after the transaction. All the transactions are made by the owner of
the block associated with the address, this process is transparent
and there is no loss for anyone who is involved in this transaction.
• Cryptography: The block chain concept is fully based on security
and for that, all the blocks on the block chain network want to be
secure. And for security, it implements cryptography and secures
the data using the cipher text and ciphers.
Block chain Hash Function :
• A hash function is a mathematical function that takes an
input string of any length and converts it to a fixed-length
output string. The fixed-length output is known as the
hash value.
Types of Cryptographic Hash Functions :
• There are several different classes of hash functions.
Some of the popular classes are:
1. RACE Integrity Primitives Evaluation Message Digest (RIPEMD)
2. Message-Digest Algorithm

3. BLAKE2
4. BLAKE3
5. Whirlpool

6. Secure Hashing Algorithm


• RIPEMD(RACE Integrity Primitives Evaluation Message Digest)
is a group of hash function which is developed by Hans Dobbertin,
Antoon Bosselaers and Bart Preneel in 1992.
• The development idea of RIPEMD is based on MD4 which in itself
is a weak hash function. It is developed to work well with 32-bit
processors.
• Types of RIPEMD:

• RIPEMD-128
• RIPEMD-160
• RIPEMD-256

• RIPEMD-320
• Out of these RIPEMD-160 is the most common.
• The original RIPEMD-128 is based on the design principles used
in MD4.
• The RIPEMD-256 and 320 have fewer chances of the accidental
collision but do not have higher levels of security as compared to
RIPEMD-128 and RIPEMD-160.
• It is a sub-block of the RIPEMD-160 hash algorithm. The message
is processed by compression function in blocks of 512 bits and
passed through two streams of this sub-block by using 5 different
versions in which the value of constant ‘k’ is also different.
Message Digest is used to ensure the integrity of a message
transmitted over an insecure channel (where the content of the
message can be changed). The message is passed through a
Cryptographic hash function. This function creates a compressed
image of the message called Digest.
• This message and digest pair is equivalent to a physical document
and fingerprint of a person on that document. Unlike the physical
document and the fingerprint, the message and the digest can be
sent separately.
• Most importantly, the digest should be unchanged during the
transmission.
• The cryptographic hash function is a one way function, that is, a
function which is practically infeasible to invert. This
cryptographic hash function takes a message of variable length as
input and creates a digest / hash / fingerprint of fixed length,
which is used to verify the integrity of the message.
• Message digest ensures the integrity of the document. To provide
authenticity of the message, digest is encrypted with sender’s
private key. Now this digest is called digital signature, which can
be only decrypted by the receiver who has sender’s public key.
Now the receiver can authenticate the sender and also verify the
integrity of the sent message.
• This family comprises hash functions MD2, MD4, MD5, and
MD6.
• MD5 is the most widely used cryptographic hash function.
• It is used to generate a 128-bit digest from a 512-bit string broken
down into 16 words composed of 32 bits each.
• Ronald Rivest designed this algorithm in 1991 to use for digital signature
verification.
• These are no longer considered cryptographically secure methods and
should not be used for cryptographic authentication.

BLAKE2: It was announced on December 21, 2012.BLAKE2 is a


cryptographic hash function based on BLAKE, designed with the aim to
replace MD5 and SHA-1 algorithms in applications requiring high
performance in software. It provides better security than SHA-2 and is
similar to that of SHS-3. It provides the following features:

• It provides immunity to length extensions.

• It removes the addition of constants to message words.

• It simplifies padding and reduces the number of rounds from 16 to 12.


• BLAKE3: It was announced on January 9, 2020. BLAKE3 is a
cryptographic function based on Bao and BLAKE2. It is a few
times faster than BLAKE2. This algorithm provides many features
like parallelism, XOF, KDF, etc.

• Whirlpool: It is a cryptographic hash function, first described in


2000. It is a modified version of the Advanced Encryption Standard
(AES). Whirlpool produces a hash of 512 bits.
Secure Hashing Algorithm: The family of SHA comprises four SHA
algorithms: SHA-0, SHA-1, SHA-2, and SHA-3.
• SHA-0 is a 160-bit hash function that was published by the
National Institute of Standards and Technology in 1993.
• SHA-1 was designed in 1995 to correct the weaknesses of SHA-0.
In 2005, a method was found to uncover collisions in the SHA-1
algorithm due to which long-term employability became doubtful.
• SHA-2 has the following SHA variants, SHA-224, SHA-256, SHA-
384, SHA-512, SHA-512/224, and SHA-512/256. It is a stronger
hash function and it still follows the design of SHA-1.
• In 2012, the Keccak algorithm was chosen as the new SHA-3
standard.
• SHA-256 is the most famous of all cryptographic hash functions
because it’s used extensively in blockchain technology. The SHA-
256 Hashing algorithm was developed by the National Security
Agency (NSA) in 2001.
CREATE A CRYPTOCURRENCY :

• Crypto currencies are digital currencies that work just like their
traditional counterparts: People use them to make purchases or to
receive funds from sales of goods or services.

• The difference between crypto currencies and traditional ones is


that, in order for crypto currencies to work, an online network
must facilitate and verify all transactions.
1. Determine the use for your crypto currency.
2. Select a block chain platform.

3. Prepare the nodes.


4. Choose a block chain architecture.
5. Establish APIs.

6. Create a suitable interface.


7. Understand the legal considerations.
Determine the Use for Your Crypto currency
• The first step in creating a crypto currency is obvious but essential:
Developers (the term used for crypto currency creators) must find a
compelling use for their proposed digital currency. Traditional and
crypto currencies can serve many purposes:
• Transfer of money

• Alternative wealth storage


• Smart contract support
• Data verification

• Smart asset management


Select a Block chain Platform : All crypto currencies are
anchored by a block chain platform. This ensures that every
transaction is recorded and distributed across the block chain, creating
a system of accountability. This approach makes it impossible for
outside parties to hack, trick, or change the digital ledger.

Platforms vary depending on the consensus mechanism used. At its


core, a block chain is a kind of digital ledger that permanently lists
every crypto currency transaction. However: not all transactions are
considered. Some, for example, might be fraudulent. Therefore, a
screening process is required. In the world of blockchains, that’s what
a consensus mechanism provides.
A consensus mechanism is, in simple terms, a communications
protocol that determines if a blockchain network will consider a
specific transaction. There are multiple
consensus mechanisms available, including:

1. Proof of Work. Miners solve complex math puzzles to create a


block. Miners who finish the block creation process are rewarded in
cryptocurrency.

2. Proof of Stake. Miners work together to create each block, with a


random miner receiving the reward. Miners must prove they own a
sizeable stake in the currency they are mining.
3. Delegated Proof of Stake. This measure is similar to proof of
stake, but, after staking their crypto coins, users vote for specific
miners who create blocks and get the reward.

4. Proof of Elapsed Time. The reward goes to the miner who has
spent the longest time verifying transactions.
Prepare the Nodes : Once you’ve selected a blockchain, the nodes
that work in the blockchain must be created.
Nodes are, usually, fast computers that connect to a blockchain
network to verify and process transactions. Nodes keep the currency
running while recording and sharing the data that eventually gets
added to the digital ledger.
There are four key considerations when setting up nodes:

1. Determining who has access to nodes. Some ledgers are publicly


accessible; others remain private.
2. Determining where nodes are hosted. A cloud network can host a
node, but local nodes may be preferred in order to provide on-
premise support for computers that act as nodes.

3. Choosing which operating system is ideal. An open-source


operating system like Ubuntu or Fedora is usually preferred, as
developers can reconfigure the OS to their cryptocurrencies’
unique needs.

4. Deciding what hardware is required. Components like processors,


RAM, GPUs, and hard drives are important considerations
because nodes require faster hardware so that they can process
more transactions in less time.
Choose a Block chain Architecture
When it comes to sharing data, block chains don’t all operate the
same way. Digital architecture is a lot like building architecture: It
must not only consider design but also how everything fits together to
work best. Consider these three prominent block chain architecture
formats :

1. Centralized — One central node on the block chain receives


information from multiple other nodes.

2. Decentralized — Nodes on the block chain share data together.


3. Distributed — The block chain ledger moves between nodes. A
publically distributed ledger system allows users to review the
content; a privately distributed system lets the users adjust the
ledger data.
Establish APIs
The application programming interface (or API) is an interface linking
to a blockchain node or a client network. For example, an API can
interface between the currency exchange and an application that
collects data about that currency. APIs can work for many purposes in
the world of cryptocurrencies, but the most common include trading
currencies, providing data security, and obtaining currency analysis.

Developers may find many blockchain API solutions, including


Bitcore, Factom, and Infura Ethereum APIs.
Note that outside API developers may be necessary for creating API
setups. You can also incorporate multiple APIs for different
programming needs such as tracking the price of your crypto currency
or pulling publically available information off its block chain.
Create a Suitable Interface
Developers who wish to make it easy for others to interact with their
cryptocurrency must consider the user interface (UI) and
user experience (UX). The easier the UI and UX, the more likely it is
that consumers and miners will be able to easily configure their
settings and manage their investments. Interfaces require a server and
database to work, plus someone should be ready to program a website
or program that allows someone to review and configure data.

7. Understand the Legal Considerations


Considering the legal aspects of creating a new currency prior to
beginning is both wise and necessary. Developers must:
• Set up a legal entity, such as an LLC or Corporation.
• Acquire a license from their local governments.
• Register with certified groups that are devoted to stopping money
laundering and other harmful activities, such as the
Financial Crimes Enforcement Network in the United States.

You might also like