Homework post for@stream4u || cryptography and it's uses || utsavsaxena11

in SteemitCryptoAcademy3 years ago

Hello steemians how are you? I hope you all are doing well and you all are safe and healthy during this pandemic time. Hope we all soon get the vaccine.

Today I go through one of the best and simplest language explanation homework posts by @stream4u on cryptography in blockchain. It's interesting to read the lecture post. Now I am Submitting my homework post to the professor.

Photo_1629353583009.png

HOMEWORK

QUESTION 1:

What is blockchain cryptography. Name few platforms provide blockchain cryptography.

ANSWER 1:

We all know that blockchain is a public distributed ledger that update transactions working on blockchain in terms of blocks and is visible to everyone. On the same hand cryptography is a technology that help to secure certain function or transaction between two individuals while other are also present on that particular platform. Cryptography on target sender and receiver. If we combine these two together we come with a word known as Blockchain cryptography.

images (1).jpeg
https://images.app.goo.gl/bqwoZ4tFTFxUeYRM8

Blockchain cryptography is a technology that secure transactions taking place on blockchain through cryptography. These transactions are listed in public ledger but happen in between two sender and receiver only. But the question is that how these transactions are get secured. So there are two types of cryptography available named as Hash function and Asymmetric keys algorithm.

Hash functions are the alphanumeric terms that contains lower case upper case letters with combination of numbers. It contains fix 26 alphanumeric terms. a normal hash function can secure any transaction whether it is large or small. If Hash change then the transaction will also get change.

Asymmetric keys algorithm are used to secure public wallet using public keys and private wallet using private keys. It is also used to verify account login account and also considered to be a digital signature of a person. Public key used for verification and private key used for security of wallet. For example if we consider steemit it consists of a pdf which contains private key, public key Active key owner key and memo. These are required keys that are asymmetric keys to login and verify our steemit account and also to open Wallet and take withdraw we need active key.

This is the brief description about Blockchain cryptography. Now let us see what are the main features provided by blockchain cryptography which make it highly popular.

Highly secured :

Because of alphanumeric terms available in both asymmetric and Hash function it is impossible to change the function because it will change the transaction and also it is impossible to learn those functions so no one can hack our transaction and account easily.

Cannot change :

Once the hash is generated it cannot be changed because it will change the transaction and because of change in transaction we forgot and lost our transaction.

All functions are different:

All the hash and asymmetric keys are generated in blockchain cryptography are 100% unique and did not match with each other. It will not allowed mix match of data which may lead to an error in blockchain.

Some of the Blockchain platforms are :

  • Ethereum blockchain
  • Ripple blockchain
  • Stellar blockchain
  • Binanace blockchain
  • IBM blockchain (private)
  • Steem blockchain
  • EOS blockchain
  • REEF blockchain

These are the few blockchain platforms available in blockchain technology. There are many more you can search them on Google. This is all about Blockchain cryptography technology.

QUESTION 2:

What is public key cryptography?

ANSWER 2:

Public key is asymmetric key algorithm of cryptography. It is also alphanumeric hash that was generated for identification and verification in the blockchain. As the name suggest it is a public key which anyone can use to verify the transaction in a blockchain. This key also used for receiving funds, login and verification. The hash generated during transaction is a public key that we can use to verify the transaction in block explorer in blockchain. Public key have asymmetric encryption. This key is publicly available so there is no possibility of losing the key.

Every public key is unique to every private key and nobody can create private key with public key. If a person encrypt some data then they required public key for verification after data transfer, it is first decrypt by private key and then verified by public key to add on blockchain.

For example :
Using a software let us try to create a public key and private key then let's encrypt a data using public key.

Data : MY NAME IS UTSAV

  • First we generate a private and public key, public key is generated by private key but private key cannot be generated by public key.
    IMG_20210819_151814.jpg

  • Then we copy the public key and write the main text that we have to encrypt. Our data get encrypt and create a secret code.
    IMG_20210819_151917.jpg

This is how public key works. Now to see the role of of private key we have to decrypt the data using private key in public key cryptography. So add private key and click decrypt data.
IMG_20210819_160817.jpg
As you can see in public key cryptography by using two keys encrypt data and then decrypt the data. The decryption of data take place by the private key. Public key cryptography is also known as asymmetric cryptography.

QUESTION 3:

What is private key cryptography?

ANSWER 3:

Private key is the alpha numeric symmetric key that is a secret key and can only be seen by the owner of the key to login or logout the wallet. It is used to secure wallet and also to take withdrawal from transactions. If these keys are publicly published then our account mein get hacked and all the transaction and money will be stolen.

We are not able to create private key with public key but we can create a public key with the private key. Private key is used to secure our network . For example in our steemit we have a PDF which contain all the private keys that we have to use while posting and taking withdraws from account.

In private key cryptography only single key is used for encryption and decryption of data that is used by both the sender and the receiver.

When a data is encrypted using secret key then to decrypt the data we have to use the same key that It helped us to check the secret code that is encrypted.

For example:

We enter a data and create a secret key during encryption and to decrypt the same message we have to use the same is that we generated and that will decrypt our data. This is what a private key cryptography mean.

IMG_20210819_221043.jpg

Adding the data we generate secret code that is the secret key or private key then we use this private key to generate or decrypt our data again.

IMG_20210819_221151.jpg

So by using the same private key we generate or decrypt our data and finally our private key cryptography completed.

This is the brief description about private key in cryptography. Private key are generated by asymmetric key algorithm.

QUESTION 4:

Explain the Digital Signatures CryptoGraphy and what is Singing Of Transaction/Message?

ANSWER 4:

Signature play the major role in financial sector whether it is centralised financial sector or decentralised financial sector. In centralised financial sector we use paperwork and handwritten signature but in decentralised online blockchain financial sector we use digital signature. Digital signature is an another asymmetric key in cryptography that use private key as a signature in transaction to validate it and make it it listed in blockchain. When a transaction get initiation then the the sender sign digitally the private key and make their transaction broadcasted in the network then the miners and the receivers take the public key of the account from where the transaction start to validate the transaction. Digital signature are are secured and no one can see those signature because the signatures are private keys.

These digital signatures are used to encrypt the data. Likewise use of public and private key here data was encrypted by private key ki and decrypted by public key.

For example :

Take an example and try to figure out what is the decrypted data we get when we encrypt data using private key as digital signature.

  • First generate the private key and the public key using a software. Remember if you change these keys your final decrypted and encrypted result will change.
    IMG_20210820_140246.jpg

  • Now enter the data you want to add in blockchain and enter the private key it will generate a digital signature key that you can use for decryption of data.
    digital signature is :
    304502203d0ddf2a14b54adec539343e69554a74762a870335c4c6a64ba4e839e4844077022100c3f952e571438d46c9bf5d509e5d0043bfe64603f75c72a413f8743a6d993d23
    IMG_20210820_140321.jpg

  • Now click on the verify option and check whether the transaction using public key is matched or not. As we can see both the digital signature matched so a transaction is valid and green block generated.
    IMG_20210820_140335.jpg

We all know the final result we get the green block.

If our private key and public key pair doesn't match is other then double transaction become invalid and generate a red block this indicates that digital signature doesn't match is other.

IMG_20210820_140748.jpg

This is how private key secure the transaction and when the transaction broadcasted in the network ok minor using public key validate the transaction. In the whole process we can considered that the encrypted text we are getting is working as a digital signature for both the sender and the receiver.

Digital signature not only validate our transaction but also create a secure environment. In handwritten signature sometime people copy handwritten signature or by mistake sometime we produce wrong signature which invalidate our transaction and also when people copy our signature this create stolen off our money and transaction.

QUESTION 5:

Explain symmetric and asymmetric cryptography?

ANSWER 5:

Symmetric cryptography:

Symmetric cryptography is a technique in blockchain that create alphanumeric code in symmetric key algorithm. In symmetric cryptography the encryption and decryption both are done using a single key. When the sender convert a readable data into computer language it use a symmetric key for encryption and to decrypt the same data the receiver also use the same symmetric key to decrypt the data and convert it into a readable language.

Let us take an example to make our understanding of symmetry cryptography more clear. In this example we will encrypt a data and then decrypt the data with the same key in both sender and receiver address.

Data: JAI SHREE RAM

IMG_20210819_221043.jpg
We added a data and select a secret code for our transaction. This will be same for both encryption and decryption.

IMG_20210819_221151.jpg

So as you can see that it by using the same secret key we encrypt the data and then decrypt the data. And that key is a symmetric key. The reason why I am saying it is a symmetric key because it only contains single key for encryption and decryption.

Some of the examples of cryptographic symmetric algorithms are are advanced encryption standard data encryption standard international data encryption algorithm, electronic code book and cipher code book these two are the parts of advanced encryption standard.

There are two type of symmetric cryptographic algorithm one is block algorithm where message encrypted in single entity with a fixed length in a block and a stream algorithm message encrypted in short streams after one another.

Asymmetric cryptography :

Asymmetric cryptography is a technology that require asymmetric-key algorithm. It consists of two different keys public key and private key that are used by senders and miners. Private key always handled by owner and public key are handled by by the receiver who then send transaction back to the sender. These asymmetric keys also used as digital signatures for encryption and decryption of data.

In past few examples we have already discuss that how how we generate encrypted text using public key or a private key and decrypt it using a private key or a public key. The thing is that when and owner is decrypting a text then they are using private key and when a miner is decrypting text they are using public key.

Let us take an example how this work in both sides from miner side and from sender side.

IMG_20210819_222002.jpg

So in the above example miner done mining to public key and receiver decrypt the transaction using private key as it is owned by him in asymmetric key pattern.

Asymmetric cryptography is highly secured and have always send unique private and public keys which create user friendly environment and does not create Messy works. But it is is less effective and efficient in bulk encryption and decryption.

This is my understanding about encryption and decryption using symmetric and asymmetric cryptography. This is all about symmetric and asymmetric cryptography technique.

QUESTION 6:

How blockchain wallet cryptography works.

ANSWER 6:

The working of blockchain wallet using cryptography based on three main factors that one require while using crypto wallet. These three things are private key, public key and the wallet address. These three things are required to make digital currency transaction whether it is sending or receiving. Crypto wallet is a place where one can store the digital currency and are secured by private and public keys.

Crypto wallet address :

The cryptographically generated fix length unique quotes that are alphanumeric codes that can't be change for one wallet and can't be used for another wallet is known as wallet address. These wallet address are used to receive different assets from different exchanges and crypto wallets. If we talk about centralised system we have an account number in the same way in decentralized system we have the wallet address which control all our crypto assets.

When we generate a public key there is a generation of hash that has is known as wallet address for that particular public key. But the final result hash cannot be used as a public key because it will not accept our transaction. As we discussed that our crypto wallet address look like alphanumeric terms. So let us take an example and check whether it is really a alphanumeric term or not.

For example :

In bitcoin ecosystem 3 main address are currently in use :

  • P2PKH: 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2

  • P2SH : 3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy

  • Bech32 : bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq

As we can see that there are all the addresses in alpha numeric format.

private keys of wallet:

As we discussed private keys earlier that it is alphanumeric combination a fixed length combination which give control of wallet to the owner. It is used to secure the funds and all the funds and wallet depend on private key. If someone lost its private key then it is impossible to take all the crypto asset out from the wallet.

These private keys are used to add digital signatures. For example if we consider in centralised system to make our transaction possible we have to sign manually a document whereas in decentralized system if you have to initiate a transaction then you have to add digital signature into using private key.

For example:

Private keys are look like:
ABCDE12342ajgs563ksjj764dtwjb446hg56VAJGE997

Public key of wallet:

As we have already discussed public key are the keys that are alphanumeric fixed length codes used for validation of a transaction by miners. When we using private key and confirm transaction by digital signature then to validate a transaction the miner will use public key of the transaction and confirm the transaction and added into the blockchain.

These keys are publicly available and everyone can use this key to validate the transaction and to check the transaction. The public key and the private key are generated by asymmetric keys code algorithm.

For example:

Public keys are look like alphanumeric codes:
Abf25382IakyTEJVU3763hU67Iu

So this is how cryptography work in crypto blockchain wallets to secure wallet and to make transaction cryptography in crypto wallets are really required. But crypto wallets are further more categorised into parts that are hot wallets and cold wallets full stop it is important to discuss whether cryptography in 20 two wallets are different or same.

images.jpeg
https://images.app.goo.gl/22y9ts5Xew9LmSP9A

Hot walletcold wallet
These are the wallets that are available and need a connection of internet. These are available on mobile, web, dekstop.These are offline wallets and not required internet connection. These are used in USB, hardware and other types which can only be accessed when connected to dekstop.
These are secured by private keys and public keys.These have offline public and private keys.
Threatened by online attackssecured from online attacks
Wallet can't get lost as it is online fixed.Wallet can get lost as are available offline in pendrive or hard disk.

Both these wallets use public keys and private keys and also have different wallet address. But the main difference is that one available online and other available offline.

This is how cryptography in blockchain wallet works.

QUESTION 7:

What is the Merkel tree and it's importance.

ANSWER 7:

Every transaction in blockchain ecosystem are are stored in blocks and these blocks create Hash function of the transaction to make it easy to verify the transaction anytime in the block explorer. The has generated are in fixed length of 26 alphanumeric characters. Everyday more than 1000 and lacs of transaction take place in the blockchain and sometime it is really difficult to find the transaction. Now to increase the speed of data verification we use merkle tree.

In cryptography a merkle tree is a tree whose leaf contain a cryptographic hash off the data. It store data security on the blockchain. There are mainly three levels of merkle tree leaf branch and root. The leaf nodes are the blocks that contains different ashes of different transactions. By connecting transactions with one another we get branches of the merkle tree. These transactions are connected and generate only single hash which can be added in the the block. Finally the root of the merkle tree contain all the transactions in one block and root hash is generated. The main feature of all these transactions is that all these transactions have same 26 alphanumeric characters hash.

Feature of merkle tree is to verify any kind of data transaction that store init and handle that data easily and securely. It increase the computing power and reduce consumption of memory in a hardware it also increase the number of transactions since verification of transaction become more easy while using merkle tree. Without downloading the whole block we can easily verify the transaction with merkle tree this procedure is known as simplified payment verification.

If we don't use merkle tree then there are many losses such as loss of computing power loss of memory and backup slow speed off verification and also so it is a compromise with security of the network. This may lead to increase 51% attack on blockchain technology. To to solve all these problems it is important to use merkle tree for the verification to increase computing power and reduce threats.

Now let us take two examples and create a merkle tree. In first example we will be taking even number of transactions and in second we will be taking off number of transactions.

Merkel tree with Even number of transactions:


Data : A,B,C,D
Number of block generated in lower level : 4

Let us first generate the hash for the data and then create a market.

HASH for A:

IMG_20210820_011707.jpg

HASH for B:

IMG_20210820_011723.jpg

HASH for C:

IMG_20210820_011809.jpg

HASH for D:

IMG_20210820_011831.jpg

HASH for AB:

IMG_20210820_011858.jpg

HASH for CD:

IMG_20210820_011916.jpg

HASH for ABCD:

IMG_20210820_011935.jpg

The final Merkle tree created is given below :

IMG_20210820_014610.jpg

As you can see from root hash to leafs all the branches are symmetric and it is easy to verify the transactions.

Mekle tree with Odd number of transactions :


Data : A,B,C

Number of blocks generated at lower level : 3

Hash for A :

IMG_20210820_011707.jpg

Hash for B :

IMG_20210820_011723.jpg

Hash for C :

IMG_20210820_011809.jpg

Hash for AB :

IMG_20210820_011858.jpg

Hash for CC :

IMG_20210820_012805.jpg

Hash for ABCC:

IMG_20210820_012822.jpg

The final Merkle tree created is given below :

IMG_20210820_014623.jpg

When there are odd number of transactions then at bottom leaf node the odd number of leaf will create a duplicate block how to make a symmetric merkle tree. This block is only generated in merkle tree but not actually available in the blockchain. Block C will only be once available in blockchain. Just to make verification process more easy we are duplicating a blocked and creating hashes.

importance of Merkle tree:

  • Merkle tree is used to to reduce verification pressure reduce computing power and also provide more memory space.

  • Merkle tree is also important to combine two or three transactions together and create a single hash of it.

  • Merkle tree also secure blockchain from 51% attack. It also provides secured verification atmosphere in the blockchain.

This is the brief description about merkle tree and its importance.

QUESTION 8:

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 screenshots of yours practical. (Do study well for this topic)

ANSWER 8:

In this question we are going to deal with the study of blockchain demo. In this practical part we are going to discuss about functionality of key signature transaction block with proper theory and understanding about it. Let us discuss each of them one by one and also create some situations which may take place while our learning.

Keys:

From starting till end we study keys and know the keys are private key and the public key. These are the alphanumeric combinations with fixed length. As we all know that private key and public key are generated for the wallet and each wallet have its unique private key and public key. We also discuss it earlier that private key can generate public key but public key cannot generate a private. These keys are identical and cannot be share on any wallet.

So as be gone to the main website we can see the first option is keys option which consists of private key and public key. Both the keys are already generated but we can choose the keys on our own by clicking the random button. By clicking the random button we are allowing an interface to change both private key and public key pair.

When we enter in the main website we encounter the first public key and private key as:

SAVE_20210820_115432.jpg

private key:

67454965839719104986426122625909042676097860859680074195373622964681609190362

public key :

04a3e5aa7520fd1c8684576680b536c6ddf590a37de5a976892169eb2f86bd4ce2e67821450fad2fd438b2cf2bf4cfe1fd40bc4d58fd8f8e946d235b345085cd6e

As we know public key and private key are unique and we can change them in pair using random key so let us take another option in which we get public key and private key pair as:

SAVE_20210820_120003.jpg

private key:

4883651577962489094722473505665264540583942296121609176406003306580786864368

public key:

048e52f238edf1f8f9e33278ef7206737defd1155661b7a0763f4e06303d823dab91a0eb5b3f4030a68c4e57840da3644c195f584c4c3fd9ed9e402efae6c793df

Now let us take another case in which we are going to select the private key in our own way. We will be selecting private key as:

SAVE_20210820_120008.jpg

private key :

11082000

For this private key The generated public key is shown below:

public key:

044cd946881197b0b04f5c19c6e4d7c08db09508b360a46633df9c2e764681f4261b9d69c5159f10343acc5a2cbce6e8adcfdbf23957b5a429881c5d734edd0d25

The mean thing in private key generation is that no alphabet is used and only numbers are allowed in private key creation for the random key that is created also have only the numbers.

This also shows that every private key is unique to every public key which give clear indication that each and every wallet have its own private and public key we can generate a public key with the private key we cannot generate a private key using a public key.

Now taking our 11082000 as a private key we will move further for our signature and other features.

Signatures:

As we talked earlier that signature in any financial system work as initial stage of transaction. By using our private key we can sign a transaction and create a digital signature of a transaction. This digital signature is then decrypted by the miner to validate the block and transaction using public key of the same generated private key. If both the data of transaction wire during private key and public key are same when only the miner will validate the transaction.

Now in this case latest talk about both the situations in which our transaction get validate and our transaction get invalid. Let us first talk about validation of a transaction.

Valid transaction:

SAVE_20210820_121422.jpg

private key :

11082000

public key :

044cd946881197b0b04f5c19c6e4d7c08db09508b360a46633df9c2e764681f4261b9d69c5159f10343acc5a2cbce6e8adcfdbf23957b5a429881c5d734edd0d25

Message:

MY NAME IS UTSAV SAXENA

Digital signature:

30450220195541102c0ab04914385ba31e705ee09982ba26a90f0ca74585260a1e6b521302210084e90a475ba7ebeb2962e5b3dd80ca80ba9e499a1665e9eb80f7b65d925b4206


In the above situation by clicking on signatures option we first sign a message using private key and generate a message signature that is a digital signature that further can be decrypted to get the original data off the transaction if and only if the private and the public key pair match each other.

Now to verify the transaction we use the public key and match the transaction if both the digital signature match with each other then we can say that this transaction is valid and can hence, be added in the block chain.

public key:

044cd946881197b0b04f5c19c6e4d7c08db09508b360a46633df9c2e764681f4261b9d69c5159f10343acc5a2cbce6e8adcfdbf23957b5a429881c5d734edd0d25

Message:

MY NAME IS UTSAV SAXENA

Digital signature:

30450220195541102c0ab04914385ba31e705ee09982ba26a90f0ca74585260a1e6b521302210084e90a475ba7ebeb2962e5b3dd80ca80ba9e499a1665e9eb80f7b65d925b4206

SAVE_20210820_122431.jpg

In public key and private key both the digital signature match with each other and hence we can say that this is a valid transaction. What the valid transaction the block convert into green colour that verify it is a verified and valid transaction.

Invalid transaction:

Now if our transaction is invalid then there is only one situation that our private and public key pair doesn't match each other. Let us take the situation in which our private key is correct but our public key doesn't match the private key.

SAVE_20210820_121422.jpg

Message:

MY NAME IS UTSAV SAXENA

Digital signature:

30450220195541102c0ab04914385ba31e705ee09982ba26a90f0ca74585260a1e6b521302210084e90a475ba7ebeb2962e5b3dd80ca80ba9e499a1665e9eb80f7b65d925b4206

private key :

11082000

Now we change the public key and let us see what happens.

Public key:

0a4cd946881197b0b04f5c19c6e4d7c08db09508b360a46633df9c2e764681f4261b69c5159f10343acc5a2cbce6e8adcfdbf23957b5a429881c5d734edd0d25

SAVE_20210820_122651.jpg

As we can clearly see that this transaction is invalid and it is denoted by a red colour block which indicates this transaction cannot be added in the blockchain as it is verified and found to be invalid.

This is how the role of signature become important to verify a transaction. If private and public key pair doesn't match it is a invalid transaction and if it is match then it is a valid transaction.

Transactions :

Sending some amount to the receiver while making a confirmation using a signature is a transaction. Transactions are done between two addresses from ascendas wallet address to the receiver wallet address. In the transaction column of blockchain demo we are going to sign a transaction and then verify the transaction if both private and public key match each other than h transaction get initiated and verified.

Let us take the same private key that we generated on our own and the respective public key. In this case also we are going to take to situations in which our private key and public key match each other and our private key and public key doesn't matches.

Valid transaction:

Digital signature:

30460221008ca9d0d8c5c0fb8b9a8cb0c911d126b4a9fd138a0e99e1bcfe1f6e4ee731ba97022100a1c9af2caf40b62d347ebe3180cd2b18942d3021abd41b073c395dbfbecd1957

private key :

11082000

Amount:

$20.00

From sender to receiver address, by clicking on sign option we generate a message signature and if this message signature is correct then by using the public key we can read and read this message signature and validate our transaction.

SAVE_20210820_123756.jpg

Now after picking on verify option we will check our message the amount which we are using for transaction and then click on verify option.

SAVE_20210820_123802.jpg

As we can see that our blocked turn into green colour which indicates that our transaction is valid because the digital signature created by the private key matches with the public key and hence it is confirm that it is a valid transaction.

Invalid transaction:

To make a transaction invalid there may be situations but all these three situation are hypothetical because it is very here in blockchain technology to get incorrect digital signature for centre and receiver address.

Reciver address change to :
0cca955bf8e359cc7ebbb66f4c2dc616a93e8ba08e93d27996e20299ba92cba9cbd73c2ff46ed27a3727ba09486ba32b5ac35dd20c0adec020536996ca4d9f3d74

SAVE_20210820_124508.jpg

Let us consider we change the receiver address and send it to the miner to verify the transaction. But it will show a red blocked because the receiver address is in correct and because of that the digital signature doesn't match their it means that the digital signature sender have and the digital signature receiver have are different and hence it become an invalid transaction and cannot be added in the blockchain.

Blockchain:

Blockchain is a chain of blocks that Store our transactions with the valid hash. These hash are generated by cryptographic algorithms and functions. Now let us see how these how these transactions are connected to each other. And also see weather all these transactions are are changed in correct order or not.

In every blockchain the first block contains previous Hash As 0 and the new generated hash with alphanumeric terms. Since there is no block previously present so no hash will be generated. Now creating a chain link ok and other transactions will get added and these transaction are changed by the previous hashes. For example block 2 is linked with block 1 with the hash of block 1 added in the previous hash of block 2. Like in the same way all the other hashes are also linked.

SAVE_20210820_125603.jpg

As you can see in the above block 1 and block 2 you are interconnected by the previous hashes and block 2 also contain several informations like transaction amount signatures. All these blocks are green in colour indicates that it is a valid blockchain and no block is incorrect.

SAVE_20210820_130437.jpg

Now let us see the transaction amount of block 4 and block 5. Since each and every block is valid in the blockchain that means the hash and the nouce generated also valid. Block 4 has a transaction of TX: $7 from sender to receiver in sequence 1 with valid digital signature. And in block 5 TX: $ 7 from sender to receiver in sequence 1 with valid digital signature. And because of this the nouces and the hash are interlinked and make this block valid.

Now there is a situation occur when a block will get missing from the blockchain. What will happen in that situation. Let us remove block 4 from the blockchain and let us see what happened to the block 5 and block 3? Removing block 4 means that we can change the transaction amount or we can change the nounces or hash. Also we can change any sender or receiver address.

IMG_20210820_131357.jpg

As you can see by changing the transaction amount our block before mining become red in colour that indicate clear invalid transaction that is added in the blockchain and now it's removed and because of block 4 our block 5 will also get invalid because the link between the two disturbed and cannot be we make another chain. There is no problem in block 3 because from block 1 to block 3 all are interconnected by the previous hashes. The reason h block 5 get invalid is because the change in hash of block 4 and the change in hash changes the previous hash of block 5 and nouns which make both of the blocks invalid and the whole chain after block 4 incorrect.

IMG_20210820_131444.jpg

Now to make a correct chain link again we have to re-mine the block 4 and the block 5 to get another hash and the nounce which then again create a perfect blockchain linked with the previous hashes.

Block 4 nounce change to 157351 and block 5 nounce change to 37174.

This is how we re-mine the block and make our whole blockchain again valid and in correct sequence.

Conclusion

Now it is time to conclude our homework post in which we discuss about cryptography and types of cryptography basically blockchain cryptography is a method to secure certain functions of transaction between two individuals. There are two type of cryptography in blockchain technology that are symmetry and asymmetry cryptography these type of cryptography also known as private cryptography and public key cryptography. In public key cryptography there are two keys involved in encryption and decryption of data that is the private key and the public key and in private key cryptography there is only one key involved in the encryption and decryption of data that is the secret key. When we making a transaction in blockchain and to validate a transaction it is required to give a digital signature. That digital signature is generated by private key when we enter a data. Always remember that private key can generate a public key but public key can never generate a private key because private is a secured key that an owner can only own. If if the private key and the public key pair doesn't match it other it means that it does starting address and the receiving address are not same and hence transaction become invalid because the digital signature that a sender have and the digital signature that are receiver have are different. Blockchain demo is a website that provide us for different features generation of key, generation of digital signature generation of blockchain and generation of transaction. We can study both valid and invalid conditions of of blockchain technology in this. Further we study about merkle tree which increase is the computing power of blockchain and reduce the verification time of transactions and play a major role in developing and creating a user friendly environment in blockchain. Further we create to merkle trees in which one erkle tree consists even number of leaves and other merkle tree consists odd number of leaves. When there are odd number of leaves then a duplicate leave is generated this generated leave is only be available in the merkle tree but not in the main blockchain. This is all about my homework post thank you so much professor for such an interesting, deep learning about cryptography.

Sort:  

Congratulations! Your post has been selected as a daily Steemit truffle! It is listed on rank 17 of all contributions awarded today. You can find the TOP DAILY TRUFFLE PICKS HERE.

I upvoted your contribution because to my mind your post is at least 12 SBD worth and should receive 38 votes. It's now up to the lovely Steemit community to make this come true.

I am TrufflePig, an Artificial Intelligence Bot that helps minnows and content curators using Machine Learning. If you are curious how I select content, you can find an explanation here!

Have a nice day and sincerely yours,
trufflepig
TrufflePig

Loading...

You have been upvoted by @sapwood, a Country Representative from INDIA. We are voting with the Steemit Community Curator @steemcurator07 account to support the newcomers coming into Steemit.

Engagement is essential to foster a sense of community. Therefore we would request our members to visit each other's posts and make insightful comments.

Thank you

Hi @utsavsaxena11

Did not understand 11/142, may I know what is this?

image.png

 3 years ago 

@stream4u and @farhmade, I am really sorry for this. But unfortunately my wallet get hacked.all the steem that I have in my wallet get stolen and transferred on gate.io exchange. Yesterday we have a great chart and after that today morning this happen to me. I am really sorry but it's not me who send this steema dn memo to you. I swear upon god. Please help me in any case if you can..

 3 years ago 

I am really sorry professor for this... Thankyou so much for revert my transfer...