Blockchain Part 2
Blockchain Part 2
Secret is the data message one is sending in a safe, secure fashion and guarantees that
it will not be tampered with.
Computing takes the secret and combine it with a key. A key is a piece of data that is
consumed by the computer function, the next component.
Function receives the key and the secret. Uses the key to change the data in the secret
to create what is known as the cipher.
Cipher is the encrypted message to protect against bad actors. They do not know how
to decrypt the cipher back into the secret data. Involves maths.
Official (Open), Non-Sensitive
(1) CAESAR CIPHER
Oldest Tool used by Julius Caesar
CRYPTOGRAPHY
Example Cipher: Meeting Tomorrow
ACTIVITY 1 Answer: PHHWLQJ WRPRUURZ
ROMAN STYLE
Encrypt these messages: Decrypt these messages:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
CRYPTOGRAPHY
ACTIVITY 2 Click to add text Example Cipher: Meeting Tomorrow (‘K’)
Answer: WOODSXQ DYWYBBYG
FRENCH STYLE
Encrypt these messages: Decrypt these messages:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
K L M N O P Q R S T U V W X Y Z A B C D E F G H I J
Official (Open), Non-Sensitive
(3) RAIL FENCE CIPHER
Used by Abraham Lincoln to send orders to his generals
CRYPTOGRAPHY
ACTIVITY 3 CIPHER MESSAGE
HLOOIYUDYELHWSORA
AMERICAN STYLE
ANOTHER EXAMPLE
Secure Hashing Algorithm (SHA 256) bit for securing and verifying peer to peer transactions. The
hashing algorithm is a complex, computer mathematical function that condenses data to a fixed size or
otherwise the encrypted cipher text. This produces irreversible and unique hashes. Irreversible meaning
that if you only had the hash, you cannot use that to figure out what the original piece of data was,
allowing the original data to remain secured and unknown. And, unique meaning that two different
pieces of data can never produce the same hash which is one of the key characteristics of Blockchain
Technology. Lets get deeper into Hashing!
SHA 256 Hash function will take any length string and create a fixed length output of 64 characters. It does not matter how
long or short your data message is.
A hash with 64 characters of numbers and letters create an astronomical number of combinations and there’s little chance of duplication. In Blockchain,
hashes are used as identifiers for blocks, transactions and addresses.
For example ownership of digital photos. You hash the photo with details such as time it was taken, who took it and where it was taken to create a hash
output and then keep adding new hashes to other photos. Remember hash is always mathematically associated with the original data/picture in this case.
As you see the process makes it possible to generate the public key from
the private key but makes it very difficult to figure out the private key from
public key.
You open the message with your private key. And only you have the private
key. Someone who tries to intercept the message will be unable to unlock
the message.
Additionally Digital Signatures come into place. Lets find out more!
When sending a peer to peer message or transaction, the message is signed with a
private key. And, when the message is received and the receiver has your public
key, it verifies that the signature was created with the private key pair of the
sender. This authenticates that the sender is who they say they are.
If someone attempts to bluff/ping you by using another private key, the receiver
using your public key would immediately know it is not from you because the
public key would not authenticate the private key of the sender.
Digital signatures not only secure data but also the identity of the individual
sending it. So one can sure that they are communicating with whom they intend
to.
Digital Signatures
Mining/Miners
Lets first think of mining in traditional context. Coal, gold, diamond or oil. Why
does it takes up so much resources, money and time?
In the blockchain network, transactions are passed around from nodes to nodes
and also working to add transactions in blocks into the blockchain. This process is
called mining.
PROOF OF WORK
Consensus
Trustless
Immutable
https://www.youtube.com/watch?v=_160oMzblY8
https://www.youtube.com/watch?v=xIDL_akeras