Crypotographic Primitives-I
Crypotographic Primitives-I
1. Hash Function
2. SHA 256
3. Puzzle friendly
We will see
● Basic Cryptographic Primitives behind blockchain technology
○ Cryptographically secure hash functions
○ Digital Signatures
● Hash functions used to connect “blocks’ in a ‘chain” in “tamper
proof way”
● Digital Signature: digitally sign the data so that no one can deny
about their own activities, also others can check whether it is
authentic
Cryptographic Hash Function
1. It takes arbitrarily sized string as input (Input M: Message)
2. Fixed Size Output (typically 256 bits used in blockchain)
3. Output H(M): this is called message digest
4. Efficiently computable
Important Properties Cryptographic Hash Function
1. Deterministic
Always yields identical hash value for identical input data
2. Collision Free
It two messages are different their digests should also
differ.
3. Hiding
Hide the original message; remember about avalanche effect.
4. Puzzle friendly
Given X &Y , find out k such that Y = H(X||k) - used to solve the
mining puzzle in bitcoin Proof of Work
Collision Free
Hash functions are one way; Given an x it is easy to find H(x); However given H(x)
one cannot find x.
Try with randomly chosen inputs to find out a collision - but it takes too
long
Collision Free: How do we gurantee
If a hash function produces N bits of output, an attacker needs to compute
2N/2
Hash operations on a random input to find two matching outputs with
probability > 0.98
Puzzle friendly property implies that random searching is the best strategy to solve
the above puzzle.