2. Use of Cryptography in Blockchain
• To protect user privacy.
• To protect transaction information.
• To protect ensure data consistency.
• To encode the rules for creation of new units of the currency into a
mathematical protocol.
• To utilize many advanced Cryptographic Techniques and Algorithm’s
into the blockchain network.
3. Hashing Algorithms
• A hash function is an algorithm that generates a fixed-length result or
hash value from a specific input data. It is different from encryption
which converts plain text to encrypted text and with the help of
decryption, converts the encrypted text back to the original plain
text.
• Types - RipeMD, Tiger, xxhash, MD5, SHA-2,CRC32 etc.
4.
5. • Hashing algorithm – properties
• - plain text of any size - is converted into a fixed size hashed text through a
cryptographic hash function
• Efficiently computable
• - difficult for hackers to make sense of it. (A hash length of 160 to 512 bits is
good).
• - it doesn’t provide a way to go back to the original text.
7. 1. Collision‐resistance.
• The first property that we need from a cryptographic hash function is
that it’s collision‐resistant. A collision occurs when two distinct inputs
produce the same output.
• A hash function H(.) is collision‐resistant if nobody can find a collision
8. • The number of inputs exceeds the number of outputs, we are
guaranteed that there must be at least one output to which the hash
function maps more than one input.
9.
10. Collision-Resistance
• Means it should be hard to find two different inputs of any length
that result in the same hash. This property is also referred to as
collision free hash function.
• Since, hash function is compressing function with fixed hash length, it
is impossible for a hash function not to have collisions. This property
of collision free only confirms that these collisions should be hard to
find.
• This property makes it very difficult for an attacker to find two input
values with the same hash.
14. Birthday Paradox – Finding collisions
• if you gather up 20-30 people in one room, the odds of two people sharing the
exact same birthday rises up astronomically. In fact, there is a 50-50 chance for 2
people of sharing the same birthday in this scenario!
• assuming that all days of the year have the same likelihood of having a
birthday, the chances of another person sharing your birthday is 1/365 which is
a 0.27%.
15. • Collision‐detection algorithm works for every hash function – takes a
long time.
• Hash function with a 256‐bit output, you would have to compute the
hash function 2 ^256 + 1 times in the worst case, and about 2^128
times on average.
• There are no hash functions proven to be collision‐resistant.
16. 2. Pre-image resistance (Hiding)
• we’re given the output of the hash function y = H(x) , there’s no
feasible way to figure out what the input, x , was.
• Hiding. A hash function H is hiding if: when a secret value r is chosen
from a probability distribution that has high min‐entropy , then given
H(r ‖ x) it is infeasible to find x .
• min‐entropy is a measure of how predictable an outcome is, and high
min‐entropy captures the intuitive idea that the distribution (i.e.,
random variable) is very spread out.