Professional Documents
Culture Documents
RGPV IS501 Unit 3
RGPV IS501 Unit 3
Bitcoin (as well as Ethereum and many other cryptocurrencies) uses a technology
called public-private key encryption. This allows them to be “trustless” – and
makes secure transactions between strangers possible without a “trusted
intermediary” like a bank or Paypal in the middle.
3.2 Hashing
Hashing is the backbone of the blockchain, ensuring data integrity and preventing
fraudulent transactions.
Hashing in blockchain implies the transformation of input data into a fixed size
output through a specific algorithm. It establishes data integrity and averts
fraudulent transactions. At the core of this process are hash functions, which
create unique digital fingerprints for data.
The output, known as a hash value, is unique to the input data, even if the input
data is altered slightly, the hash value will be drastically different. This property of
hash functions makes them an indispensable component of various data
structures, including blockchain technology, where each block contains the hash
of the previous block.
Bitcoin utilizing the Secure Hashing Algorithm 256 (SHA-256) as its hashing
algorithm. SHA-256 is a mathematical algorithm that generates a 256-bit hash
Unit 3 1
value. It is widely used in various data structures, including blockchain
technology, to ensure the security and integrity of data.
Deterministic outputs: The same input will always produce the same hash,
making it easy to verify data consistency.
Here, the private key of the sender encrypts the message. And the
corresponding public key of the sender, earlier shared with the receiver, can
decrypt the message.
Unit 3 2
For example, Rachel wants Ross to send a digitally signed copy of the documents
for Rachel to confirm if the document sent by Ross hasn’t been changed on the
way by other network participants. Digital Signing works by the following process.
Ross encrypts the hash of the document using his private key. Now, when he
sent the document to Rachel, he added the encrypted hash.
Rachel can only decrypt the hash using Ross’s public key.
Now on the receiver’s end, Rachel decrypted the hash. Afterward, she
calculates the hash of the document by herself as well. To ensure if it’s not
altered on the way.
She compares her hash of the document with the decrypted hash sent by
Ross. If the two hashes match, Rachel knows that both document and hash
came from Ross. And haven’t been changed on the way.
Unit 3 3
private key for decryption. Here, The pair of keys ie, the encrypt and decrypt keys
should be of the same user (receiver).
Now, Rachel and Ross don’t want anyone in the network to know about the signing
of documents
So now, after Ross encrypting the hash using his private key and adding the
document with it. He again encrypts the document and hash using Rachel’s
shared public key.
On the receiver’s end, Rachel first decrypts documents and then encrypted
hash with her private key. Then uses Ross’s public key to decrypt the hash
Afterward, she calculates her own hash of the document and matches it with
the decrypted hash sent by Ross.
Definition
Unit 3 4
An elliptic curve for current ECC
purposes is a plane curve over a
finite field which is made up of the
points satisfying the equation:
y2 = x3 + ax + b
ECDSA
ECDSA uses “elliptic curves” instead of finite fields. ECSDA relies on the discrete
log problem instead of the difficulty of factoring primes for security. The problem
is as follows:
Unit 3 5
Let a, b, and c be integers such that a^b = c. If you are given c
and a, it is difficult to find b if b is a large enough number. Now
apply this equation to an elliptic curve group and compute Q =
nP, where n is some integer, P is a point on the curve, and Q is
the result of the operation (“multiplying” points).
The ECDSA algorithm relies on this to generate signatures that are difficult to
forge and easy to verify.
2. Shorter key lengths: ECC requires shorter key lengths than RSA to achieve
the same level of security.
Unit 3 6
simpler and require less processing power.
Working of VRF
Here's a quick rundown of how VRFs work:
1. Input and Key Generation: Each participant has a secret key and a public key.
The secret key is used to generate a unique public key, and this public key is
what others use to verify the randomness.
2. Random Output: When a participant wants a random output, they use their
secret key and an input value. The VRF then produces a random output that is
unique to that specific combination of input and key.
3. Proof Generation: Along with the random output, the participant generates a
proof. This proof can be verified by anyone using the public key, ensuring that
the output is indeed the result of the correct combination of input and key.
4. Verification: Others in the network can use the public key and the proof to
verify that the random output is legitimate. If everything checks out, they can
trust that the randomness was generated fairly.
Core Features
Unit 3 7
2. Random—The output of a VRF is entirely unpredictable (uniformly distributed)
to anyone who doesn’t know the seed or private key and follows no pattern. In
a VRF, every possible output is equally likely. The randomness is generated by
combining the seed and private key in a unique manner.
VRF is being used as a secure source of on-chain randomness across the Web3
ecosystem, including in leading GameFi, DeFi, and NFT projects.
Assigning randomized attributes to NFTs— VRF can help create unique NFTs
during the minting process.
Unit 3 8