0% found this document useful (0 votes)
13 views

Cryptography in Blockchain Applications - Updated

blockchain notes

Uploaded by

rosemoses765
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Cryptography in Blockchain Applications - Updated

blockchain notes

Uploaded by

rosemoses765
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

How Blockchain works-

Cryptography
Outline
 The blockchain foundation concepts
 Blockchain foundation concept roles
 Cryptography
 How cryptography works in general
 Hashing Algorithms in Blockchain
 Types of cryptography
 Symmetric Vs Asymmetric Encryption
 Cryptographic Hash Functions
 Hashing Algorithms in Blockchain
 Digital Signature Algorithm
 Public and Private Keys in Blockchain
 Role of Cryptography in Blockchain
 References
The Blockchain Foundation

• Technically, blockchain is a brilliant amalgamation of the concepts from cryptography,


game theory, and computer science engineering,
Foundation Concepts Roles
Cryptography
• Irrespective of the use case, the transactions are secured using cryptography.
• Using cryptography, it can be ensured that a valid user is initiating the transaction and no one can forge a
fraudulent transaction.
• This means, cryptographically it can be ensured that Alice in no way can make a transaction on behalf of
Bob by forging his signature.
Game theory
Game theory is a study of strategies involved in complex games. It is the art of making the best move, or
opting for a best strategy in a given situation based on the objective. Game theory plays a significant role in
the design and operation of blockchain technologies, particularly in ensuring decentralized consensus
and the secure, efficient operation of blockchain networks..
Computer Science Engineering
• Data structures
• Peer-to-peer network communication technique.
• Smart software engineering
• Decentralized and distributed computing
• Network communication components
Cryptography

• Cryptography is the most important component of blockchain to


ensure security in the system
• Cryptography has been around for more than two thousand years
now
• It is the science of keeping things confidential using encryption
techniques
• Cryptography also ensures confidentiality, Data integrity,
Authentication and Non-repudiation
How cryptography works in general
• Any information in the form of a text
message, numeric data, or a computer
program can be called plaintext
• The plaintext is encypted using an
encryption algorithm and a key to
produce a ciphertext.
• The ciphertext can then be transmitted to
the intended recipient, who decrypts it
using the decryption algorithm and the
key to get the plaintext.
• Alice wants to send a message (m) to Bob.
• If she just sends the message as is, any
adversary, say, Eve can easily intercept the
message and the confidentiality gets
compromised. So, Alice wants to encrypt
the message using an encryption
algorithm (E) and a secret key (k) to
produce the encrypted message called
“ciphertext.” An adversary has to be aware
of both the algorithm (E) and key (k) to
intercept the message.
Cryptography

Types of Cryptographic Algorithms

Symmetric Encryption Asymmetric Encryption Hashing Algorithms

Symmetric encryption uses the same Asymmetric encryption employs a Hashing algorithms convert data into
key for both encryption and pair of keys: a public key for a fixed-size string of characters,
decryption. It is efficient for encryption and a private key for which is unique to the input data.
encrypting large amounts of data but decryption. This method enhances They ensure data integrity and are
requires secure key management. security and is widely used for secure essential in creating blockchain
transactions. blocks.
Types of cryptography
• Broadly, there are two kinds of • Asymmetric Key Cryptography
cryptography:
• Symmetric key (a.k.a. private key) and
asymmetric key (a.k.a. public key)
cryptography
Symmetric Key Cryptography
Encryption

Symmetric vs Asymmetric Encryption

Pros of Symmetric Encryption Cons of Symmetric Encryption

● Faster processing speed compared to asymmetric ● Key distribution can be problematic, as both
encryption due to the simpler algorithm structure. parties need to securely share the same key
beforehand.
● Ideal for encrypting large volumes of data, making
it suitable for applications requiring bulk data ● If the key is compromised, all data encrypted with
encryption. that key is vulnerable, posing a significant security
risk.
● Widely used in securing data at rest and in transit,
providing a robust level of confidentiality. ● Scalability issues arise in environments with many
users, as each user needs a unique key for secure
communication.
Cryptographic Hash Functions
• A cryptographic hash function is a one-
way function that converts input data of
arbitrary length and produces a fixed- • Hash function in its basic form
length output
• The output is usually termed “hash value”
or “message digest.”
• Input can be any string of any size, but the
output is of fixed length, say, a 256-bit
output or a 512-bit output as examples.
• It is deterministic, in the sense that the
same input when provided to the same
hash function produces the same hash
value every time.
• It is infeasible (though not impossible!) to
invert and generate the message from its
hash value, except trying for all possible
messages.
Cryptography

Hashing Algorithms in Blockchain

● Hashing algorithms are fundamental to blockchain technology, ensuring the integrity and
immutability of data stored in blocks.

● Each block in a blockchain contains a unique hash generated by a cryptographic hashing


algorithm, such as SHA-256, which represents the contents of the block.

● When data is added or altered, the hash of the block changes, signaling tampering and
invalidating the entire blockchain, which enhances security.

● Hashing algorithms also link blocks together; each block contains the hash of the previous
block, creating a secure chain that prevents unauthorized modifications.

● The use of hashing algorithms enables efficient verification of data integrity, as only the hash
needs to be checked to confirm that the block's content has not changed.
Digital Signature Algorithm (DSA)
• The DSA is a cryptographic algorithm used
for creating digital signatures.Its primary
objective is to sign messages digitally
• DSA provides the following security
properties:
• Authenticity: Signed by private key and
verified by public key
• Data integrity: Hashes will not match if the
data is altered.
• Non-repudiation: Since the sender signed it,
they cannot deny later that they did not send
the message. Non-repudiation is a property
that is most desirable in situations where
there are chances of a dispute over the
exchange of data. For example, once an order
is placed electronically, a purchaser cannot
deny the purchase order if non-repudiation is
enabled in such a situation
Security

Public and Private Keys in blockchains

Understanding Public and Private Keys

● Public keys are cryptographic keys that can be shared openly and are used
to encrypt data or verify signatures.

● Private keys must be kept secret and are used to decrypt data or create
digital signatures, ensuring that only the owner can access or authorize
transactions.

● In blockchain, public keys serve as wallet addresses allowing users to


receive funds, while private keys provide the control to spend or transfer
those funds securely.

● The combination of public and private keys creates a secure system where
only the holder of the private key can access and manage their blockchain
assets.
Cryptography

Role of Cryptography in Blockchain


Securing Transactions ● Cryptography ensures the confidentiality of transaction data through
encryption methods.

● Digital signatures authenticate transactions, confirming the identity of the


sender.

● Public key infrastructure allows users to exchange information securely


without prior contact.

Ensuring Data Integrity ● Hashing algorithms create unique fingerprints for data, making it tamper-
evident.

● Any alteration in the transaction data changes its hash, signaling potential
fraud.

● Blockchain's decentralized nature enhances data integrity by distributing


copies across nodes.
References
• Drescher, D. (2017). Blockchain basics: A non-technical introduction in 25 steps.
Apress.
• Kumar, A., & Bhushan, B. (2021). A comprehensive study on blockchain
technology. Journal of Cryptography and Network Security, 9(3), 45-58.
• Miller, A., Juels, A., Shi, E., Parno, B., & Katz, J. (2020). Blockchain and
cryptography: Building trust in a decentralized world. MIT Press.
• Nakamoto, S. (2008). Bitcoin: A peer-to-peer electronic cash system.

You might also like