Crypto Academy Season 3 Week 8 – Homework post for @stream4u.|| Cryptography.

in SteemitCryptoAcademy3 years ago (edited)

Am glad to be part of this week's lecture,this season has really been amazing. I will also like to appreciate Prof@stream4u for this well delivered lecture. Here is my entry below.

Explain the blockchain CryptoGraphy and mention few names which are the blockchain platforms?

Cryptography can be defined as systematic way of communication where by a transaction or message transmitted is only understood by the sender and the receiver only without any interference by a third party. The content of the message will only be understood and interpreted correctly by the sender and the receiver. Blockchain Cryptography is incomplete without what we call encryption, this means the message is changed from plain understandable words into a computer language which only the sender and the receiver understands and can interprete. It is important to mention at this point that for the encrypted message to be decoded or decrypted to get the message back as a plain language (by the receiver) there would be a need for “key”. The role of the key is simple, just like what it is used for literarily, it is used to unlock. You can now say the key is used to unlock (decrypt) the locked (encrypted) message,by so doing the message is sent back to a plain text.

Examples of blockchain platforms with cryptograpghy algorithm.

The blockchain platforms listed below have cryptography integrated in them which allow for anonymity in the course of transacting on the platform and also help secure transaction on the blockchain.
  • EOS BLOCKCHAIN
  • ETHEREUM BLOCKCHAIN
  • HIVE BLOCKCHAIN
  • TRON BLOCKCHAIN
  • QOURUM BLOCKCHAIN

Public key Cryptography

Image source

Public key cryptography is a type of key that works by encrypting a message using the receivers public key gotten from a public directory to get the message across and when the receiver gets the message, he uses his private key which only he knows to decrypt the message that was sent. So by using a public key, you will also need a private key for the transaction or communication to be effective, well received and interpreted by the receiver.

For example.

Alice wants to pass a confidential message to Bob using a public key cryptography, Alice will first encrypt the message and then gets Bob’s public key from public key directory and then sends it. Bob on receiving the encrypted message will now have to decrypt it using his own private key.

Weakness.

  • communication becomes incomplete without the private key to decrypt, this also affect the algorithm and makes it vunerable
  • public key can be vunerable to what we call middle man attack which is of the assumption that the key can be disrupted and modified by a third party and this can lead to loss of the encrypted information

Private key Cryptograghy

Image source

Private key cryptography is also reffered to as “secret key” and it is used to encrypt (changing a plain word into a computer language) and also to decrypt (changing the computer language back to plain text) using an algorithm.This therefore means that only one key is needed for effective communication / transaction unlike the public key that requires the use of a private key before the communication/transaction can be said to be complete. It is also important to mention that both the sender and the receiver will have access to the private key for smooth flow of communication. A private key is usually long and the reason is not far fetched, it is so just to protect it from hackers who could manipulate the keys to decrypt the message.

For example.

Alice need to send confidential message to Bob.A private key will be generated for that purpose and then shared between the two of them,Alice will then encrypt the message using the private key generated and then sends the message to Bob who in turn uses the shared private key to decrypt the messag sent by Alice.

Weakness

  • Key must be subjected to continual updating to avoid been hacked, stolen or leaked
  • The loss of the key also means the loss of the encrypted message because the same key is used to encrypt and decrypt

Explain the Digital signature Cryptography and what is signing of Transaction/message?

Digital signature functions the same way a signature will function in a real life setting when dealing with an hard copy document. A signature is used to authenticate a document. In the blockchain, a digital signature is a system that proves or confirms the identity of the person sending a message or carrying out a transaction on the blockchain. Digital signature can therefore be defined as cryptographic value which is usually the combination of numbers and alphabet calculated and gotten from a data and a key(secret key) that only the sender of the message knows. In this case, the key used for signing is known as the private key while the key used for verifying is know as the public key.

Signing Process

The signer inputs his data to the hash function and then gets or generate a hash function for the data inputed . A Signature algorithm is where the hash value and the key signature is inputed and then a digital signature is generated on a given hash. This is then signed and sent to the verifier. The digital signature and the verification key is inputed by the verifier in the verification algorithm which in turn produce an output / hash value. All these output are then compared to confirm the validity of the digital signature.

Explain what is Symmetrical and Asymmetrical cryptography?

Image source

Asymmetrical cryptography also mean public key cryptography, where the public key of the receiver is used to encrypt a message or transaction and then the private key of the receipients unlock or decrypts the message sent.

Image source

Symmetrical cryptography means Private key or secret key, these words are used interchangeably, it is cryptography that is uses an algorithm to both encrypt or decrypt a given message of data

Differences

FeaturesSymmetricalAsymmetric
Keyonly one key is needed for both encryption and decryption of messageTwo different keys are needed,one for encrypting and the other for decrypting.
ComplexityThe encryption process is simple and fastIt’s complex and complicated and the process is slow
Length of KeyLength is usually aroud 128/256 bitsLength is usually between 2048 bits as recommended
Usageit is used to send large volume of information/or transactionit is used to carry out smaller transaction

How blockchain wallet cryptography works and explain the available types of crypto wallets?

Blockchain wallet uses cryptography in carrying out transaction. This is just to reduces the risk of associated with the loss of crypto to hackers and fraudsters. In a blockchain wallet, there are three main element that we need to take not of, they are Private Key , Public Key and an address. Your wallet address functions like how an address functions in the physical, it point to where you can be located, therefore it can be share with anyone who want to transact with you. Your private key which is th most important of all is used by you only and that is what gives you full control over your entire asset.You need either of both keys as the case may be to carry out transaction such as purchasing, send and receiving a cryptocurrency or even converting them. These keys expecially your private key should not be shared or exposed for any reason,it is important to note that these keys appear in alphanumeric form. If these keys are by any mean misplaced, you could loose your assets.We have two broad categories of wallet, we have the cold wallet and the hot wallet.

Cold wallet

This is a wallet that is not connected to the internet, they are used to store cryptos in an offline mode and are more secure in that state because the wallet only serves as a bank or permit me to use the word "vault" which nothing can just break into just anyhow. The idea behind the cold wallet is security of asset.

Hot wallet.

Hot wallet are wallet that are connected to the internet in one way or the other, and for this sole reason, these wallet are less secured when compared to cold wallet coupled with the fact that they are exposed to attack and fraudster.

Other types of wallet includes

Online or web wallet
This types of wallet operate only on web and allows users to keep their cryptos on web, although it not a very good place to store cryptos according to experts and so its not advisable to keep all your crypto in a web wallet

Mobile wallets
These are the type of wallet that are supported by mobile phone, these wallets are downloaded and installed on ones mobile phone, you can store your cryptos in the downloaded app and even transact using your mobile phone.

Desktop wallet
Desktop wallet are wallet that is operated on a desktop, according to my research it’s a more secured way of storing your cryptocurrencies when compared with the mobile or web wallet and that is because its an offline kind of wallet which is characterized by it high level of security.

What is merkle trees and What its importance in blockchain?

Image source

When one is faced with a problem, he looks for solution, merkle tree is the solution to one of the problem a typical blockchian technology encounters.Merkle tree is named after the person that invented it,Ralph Merkle.The markle tree otherwise known as hash tree can be defined as a systematic way of solving transaction related complexities. We all know that the blockchain is made up of many block which stores transaction information. Markle tree sorts transaction in an organized and orderly manner that make it easy for verification using a tree like format.

Markle tree structure

The last transaction is spotted from the level below and it's called the leaf level. The transaction in the level below is then tied to what we call the parent hash above which in turn is tied to the level above and it continues like that till we get to the single one at the uppermost part of the tree called "Root Hash". This root Hash contains the information from the bottom to the top and can be used to trace the remaining transaction.

Importance of markle tree.

  • It helps organize block/hashes in an orderly manner.
  • It allows for easy payment verification of a particular hash/block without the stress of going through whole block.
  • It helps preserve blockchain integrity and immutability.
  • It helps to quickly locate transaction on the blockchain especially when it is tampered with or exposed to threat.

Practical + Theory, do some practical research, study on Blockchain Demo: Public / Private keys & Signing and then explain the functionality of key, signature, transaction, blockchain with proper screenshot of your practical. (Do study well for this topic)

I will practically demonstrating my understanding about this section showing my steps. I accessed the Demo site given to us by Prof. @stream4u and then got to the landing page.

My Task

Key Section(Private/public)

Step 1: I click on the menu with the three parallel lines and clicked "Key"

Step 2: I was shown an interface where with a private and public key paired with each other.


My aim in this section is to explore how the private key plays a vital role in generating a public key which it is paired with and can function with.

Step 3: I inputed 4 as my private key.
Result: it generated for me a private key which is seen below

04e493dbf1c10d80f3581e4904930b1404cc6c13900ee0758474fa94abe8c4cd1351ed993ea0d455b75642e2098ea51448d967ae33bfbdfe40cfe97bdc47739922

I went further in my exploration to understand the process better then I inputed 5 as my private key.

Result: a public key was generated for this likewise which is seen below

042f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6

Functionality.

In my observation I discovered that the private key I inputed actually generated for me the public key needed to carry out transaction.

Signature section.

I clicked on the menu identified by the 3 parallel line and then click "signature".

To demonstrate my understanding in this section,I will like to maintain the private key "4"

Step 1: I entered my message which is "My Practical"


Step 2: I then clicked on "sign". This is possible because of my private key which is already inputed.


Step 3: My message signature hash was generated

304502207e40bfd11c80eb615ea7dc9361596a60537c16d48dd26bfc35a0b46f7b3e3ff1022100e8a82d713217f88c86daf4a09bd67e8850c04b11574b211484a1ae75af7a056f

Step 4: I clicked on "verify" and this helped me generate my public key instantly

04e493dbf1c10d80f3581e4904930b1404cc6c13900ee0758474fa94abe8c4cd1351ed993ea0d455b75642e2098ea51448d967ae33bfbdfe40cfe97bdc47739922

Step 5: I finally clicked on "verify" and the transaction came out successful,I knew this because it was confirmed with the green interface.

Note: Red colour gotten in the course of transaction means wrong/unsuccessful transaction while the green means successful transaction.

Functionality

  • The private key enabled me to "sign",therefore it is used to sign a transaction.
  • Signing with my private key led to the generation of my message signature
  • Signing a transaction validate the transaction by the sender.

Transaction Section

To get here,click on the menu icon identified by three parallel line and then click "Transaction" and we will be immediately brought to the landing page

The landing page has some information already supplied as example. Let us carefully examine what we have here.

- From: this is the address of the person initiating a transaction,he is the sender and his address is what we have in the box

- To : this is the the receiver who makes the transaction complete and his address is what we have in the box.

- $20: this is the amount that the sender want to send to the receiver,it's the message in this case.

Let's do our practical.

Let's assume these are the address of the parties that want to transact below

Senders address
0427dd3e62f54c58f68219bbffc5ccc76629db5f8424f4cea696e6c78be936e073eb77e757ea18ac1870ddd822c1de5095b10dad3980d01bb1132472c1e47c0053

Receivers address
04cc955bf8e359cc7ebbb66f4c2dc616a93e8ba08e93d27996e20299ba92cba9cbd73c2ff46ed27a3727ba09486ba32b5ac35dd20c0adec020536996ca4d9f3d74

Step 1: I will click "sign" using my private key which authorizes me.

Step 2: my message signature is generated for my transaction

Step 3: I will then click on "verify" above

Step 4: it bring me to the final phase where I finally verify to validate my transaction.

Step 5: the transaction was successful,I knew this because the interface became green.

Blockchain session

I clicked on the menu and then to blockchain so that I can also explore this area.

From my observation,the blocks are already mined successfully and are arranged sequencially that's the reason why we have the green Colour we could spot from the screenshot.


On the other hand,out of curiosity I tried tweaking the block number and then everything got distorted making it come out in red,meaning whatever I planned to carryout wasn't successful

This are the result I got from exploring the demo blockchain,I just hope this meets your expectation.

Conclusion.

Cryptography as been a very wonderful innovation in the blockchain since it integration. It benefit cannot really be overemphasized and it far more outweighs it disadvantages. What would really have happened if all the keys that authorises transaction all all open? What would have happened if transactions are not encrypted? Your guess is as good as mine,many unpleasant happening would have occured. Cryptography has in a way help reduce the loss on the blockchain although there are still gaps to fill as there will always be room for improvement.

Thanks for the lecture well delivered I hope you find my entry interesting.

Cc: @stream4u

Sort:  
Loading...

Coin Marketplace

STEEM 0.18
TRX 0.15
JST 0.028
BTC 63006.79
ETH 2456.26
USDT 1.00
SBD 2.59