What is a Bitcoin and how does it work?

Bitcoin and how does it work

 we have looked into the basic blockchain architecture,  its use cases like Bitcoin and smart contracts, and then we have looked into the basic cryptographic primitives in blockchain, as we have looked into the hash and cryptographic hash, functions, and digital signatures and we have also looked into how digital signatures and cryptographic hash functions are used in the context of blockchain to make it secure and tamper-proof.

So, now will look into the interesting The topic of bitcoin,  which is emerged as a digital cryptocurrency, but the fundamentals or the base of Bitcoin is depending on the blockchain architecture. So, thus the entire Bitcoin network supports blockchain, and blockchain works as a fundamental building block behind the development of bitcoin.

So, we look into the different aspects of Bitcoin how this digital currency is designed, how you take the technical aspects as well as the economical aspects together and have a nice currency system, which can replace the existing currency system with the properties like permissionless where anyone can join in that cryptocurrency system or there will be no controller on that particular currency system no government or bank will have control over that. So, how we can utilize this concept of blockchain to develop into such kind of A cryptocurrency that we will look into the next three parts.

So, let us start with the discussion of Bitcoin.

BITCOIN-THE BEGINING

  • “A decentralized digital currency enables instant payments to anyone, anywhere in the world”
  • No central authority uses peer-to-peer technology
  • Two broad operations
  • Transaction management- transfer of bitcoins from one user to another
  • Money issuance- regulate the monetary base

So,  by the definition. 

So, it details that Bitcoin is a decentralized The digital currency of which enable instant payments to anyone anywhere in the world. So, it is a cross country payment system that was one of the primary objectives behind the development of Bitcoin and another objective was that we want to have a cross country transaction support, such that no government organization will have control over it.

And the nice properties of bitcoins are this decentralized architecture, which helps it to get a system quarrel one has external control over this currency system it works. So, over a complete peer-to-peer network and it supports different levels of securities so, that the entire system becomes tamper-proof, but it works nicely.

So, we do not have any kind of central authority. So, the entire Bitcoin network works in the peer to peer principal peer to peer technology principals. So, in Bitcoin we have two broad operations one is the transaction management; that means, transferring of bitcoins from one user to another like you want to purchase something you can purchase it by utilizing the Bitcoin or you want to make some transfer of money from someone in India to someone say in the USA.

So, you can do it using bitcoins. And a second interesting aspect at the important An aspect of Bitcoin is the money issuance; where you need to regulate the monetary base of Bitcoin like the economical aspects of a coin base of a digital currency that needs to be ensured wherein our normal banking system, we have the banking authority the central A bank which will regulate the money inside the country, they will create the new money or with time they can demolish or they can drop the old money and that control that in what rate the money will be generated that is in general controlled by the central banking system.

But in the case of a digital currency system, which works over a peer to peer network ensuring that is a kind of interesting, but difficult thing and Bitcoin solves that problem by utilizing a set of technical concepts that we look into little details.

BITCOIN BASICS-CREATION OF COINS

  • Controlled supply: must be limited for the currency to have value-any maliciously generated currency needs to be rejected by the network
  • Bitcoins are generated during the mining –each time a user discovers a new block
  • The rate of block creation is adjusted every 2016 blocks to aim for a constant two-week adjustment period

So,  the basics of the Bitcoin is the creation of coins the economic aspects, that I have mentioned earlier like you require a kind of control supply of money. So, you must limit the currency to have their value. If you put up a lot of currency in the system, it will gradually reduce the value of that particular currency. So, that comes from the economic concept. So, any such maliciously generated currency, you need to reject those and you need to accept the actual currency which is flowing in your system.

Now, this bitcoins the new bitcoins that need to be generated like normal currency.

So, this new bitcoins are generated during the Bitcoin mining timing. So, each time a user discovers a new block that particular procedure we call mining.

So, the methodology for Bitcoin mining we look into more details, but whenever a The particular person generates a new block during that time, the system generates some new Bitcoin and that person who is investing his or her power and system power and the time to generate the new blocks by participating in the mining procedure, for those people they are awarded that newly generated bitcoin. But as I have mentioned that this The flow of money or the generation of new bitcoins that need to be regulated; so, you should have some rate at which you need to adjust a block creation.

So, in the case of standard Bitcoin architecture, the rate of block creation it is adjusted over every 2016 blocks, and the aim is to have a constant of 2 week adjustment period; like at every two weeks, you will readjust the amount of money that has been generated by mining the blocks.

  • The number of bitcoins generated per block is a set of decrease geometrically, with a 50% reduction for every 210,000 blocks, or approximately 4 years
  • This reduces, with time, the number of bitcoins generated per block
  • The theoretical limit for total bitcoin: slightly less than 21 million
  • Miners will get less reward as time progresses
  • How to pay the mining fee-increase the transaction fee

 to again regulate the money the number of bitcoins that are generated per block is said to decrease geometrically.

Like with time the amount of money that is awarded by for mining a new block that got drop that gets decreased with a rate of 50 percent reduction for every 2 lakh 10000 blocks, which takes approximately 4 years; that means, at approximately four years the price of mining like if you participate in the mining procedure and if you can successfully mine a new block, the amount of award that is you will get from the Bitcoin network that will gradually drop at a that gradually drop every 4 years.

So, this reduction with time,  this reduces the number of bitcoins which is generated per block. So, the theoretical limit for the total bitcoins which you can generate with this particular limit, which is slightly less than 21 million. So, once you have generated some 21 million Bitcoin after that you will find that by participating in the mining procedure, you will not get any reward.

So,  that way as time progresses the A miner will get less reward but the question comes that how can you fee pay them are how what should be the incentive for them, for participating in the mining procedure.

Because the currently the miners participate in the mining procedure because they can get some Bitcoin by participating in the mining in the mining procedure, they have to solve some mathematical puzzle, for which they have to invest the system powers and the time; by investing that system powers and time in the mining procedure if the mining is successful there you added with some bitcoin.

But as that will get decreased with time and once this approximately 21 million bitcoins are generated, the system will not generate any new bitcoin. So, the miners will not get paid from the network for participating in the mining procedure.

So, in that case, what can be there an incentive like, you can use the transaction fee you can increase the transaction fee or get more transaction fees from the participating user to pay them, to pay the miners for participating in the mining procedure.

So, that way this way that is the A normal rule of economy, where you establish a system and one once the system is well established, then you imply some charges on the users will make a transaction and once the user will make a transaction, with the transaction they have to provide certain transaction fee and the transaction fee will be utilized to make a payment to the miners,  who will participate in the new block mining procedure. So, that is a kind of broad objective.

PROJECTED BITCOINS

Now, this is a kind of projected bitcoins for time. So, around this third January 2009 during that time, when the initial time the block was generated during At that time you can get around 50 Bitcoin per block. So,  if you generate a new block for every block you can get 50 bitcoin.

as time progress, for the first 4 years, it was 50 Bitcoin then from  28 /01 / 2011, it reduces to 25 Bitcoin per block, then from 9 /7 /2016, it will get 12.50 Bitcoin per block, then it is again gradually reduced to 6.25 Bitcoin per block, that way gradually the price of Bitcoin at the reward amount that you can get by participating in the mining, the procedure is generating a new block, that will get reduce over time.

So, this chart gives a nice indication about how much time it will take, to completely generated the targeted Bitcoin means by the time this  Bitcoin reward per block that will get nearly 0 or close to 0, and by doing this mathematical calculation you can find out that once it reaches 21 million bitcoins in the network, then you will not get any further reward from the system.

BITCOIN BASICS – SENDING PAYMENTS

  • Need to ensure that Eve cannot spend Alices bitcoin by creating transactions in her name.
  • Bitcoin uses public-key cryptography to make and verify digital signatures.
  • Each person has one or more addresses each with an associated pair of public and private keys (may hold in the bitcoin wallet)

Now,  whenever you are sending the payments in the Bitcoin network,  you need to ensure that any other person cannot spend the Bitcoin owned by one person. So, it cannot spend the Bitcoin which is owned by Alice,  by creating the transaction in her name. So,  the intruders in the network will not be able to create some kind of false transactions. 

To ensure that Bitcoin uses the public key cryptography as I have mentioned earlier, that it uses this digital signature concept along with e c d s a digital signature algorithm to make and verify the transactions using digital signatures. So, each person who is participating in the Bitcoin network, they have one or more search addresses with an associated pair of public and private keys.

So, every user can have one or more addresses based on your wallet or how many addresses you can create, but every Bitcoin address they will get associated with it appeared of the public and private key.

  • Alice wishes to transfer some bitcoin to bob.
  • Alice can sign a transaction with her private key
  • Anyone can validate the transaction with Alices public key

Now,  say Alice wants to transfer some Bitcoin to bob. So, what Alice can do, Alice can sign the transaction. So, Alice can create a transaction and along with the transaction, Alice can put her signature and send that to bob. And during putting the signature as we have discussed earlier during the crypto primitives, Alice can use her private key to sign that particular transaction and send the signature along with the transaction. Now anyone in the network can validate this transaction with Alice’s public key. So, they can decrypt the transaction with the public key and validate whether the transaction is originated from Alice or not.

BITCOIN BASICS-SENDING PAYMENTS

  • Alice wants to send bitcoin to bob
  • Bob sends his address to Alice
  • Alice adds bob’s address and the number of bitcoins to transfer in a “transaction” message
  • Alice signs the transaction with her private key and announces her public key for signature verification
  • Alice broadcasts the transaction on the bitcoin network for all to see

So,  these are the set of states that Alice has to follow if she wants to make some transfer of certain bitcoins to Bob. So, first Bob sends his address to Alice. So, this is a cryptographically generated address which is transferred to Alice, now Alice adds Bob address and the amount of Bitcoin that need to be transferred in a transaction message.

So, see construct a transaction message with that particular transaction information, that the transaction is from Alice’s address to Bob address, and along with that, you put the amount of Bitcoin that needs to be transferred.

Now Alice signs the transaction with her private key and announces the public key with which anyone can validate that transaction, then Alice broadcasts this transaction in the Bitcoin network for all to see that transaction. So, the broad idea is that Alice constructs the transaction put her signature along with the transaction, and also put the public key to validate the transaction, then broadcast the transaction in the Bitcoin network.

DOUBLE SPENDING

  • The same bitcoin is used for more than one transactions
  • In a centralized system, the bank prevents double-spending
  • How can we prevent double-spending in a decentralized network?

Now,  whenever you are creating the transaction or the Alice is creating the transaction, in a digital currency you may have the problem of double-spending. So, what is double-spending it is like that the same bitcoin, it is used for more than one transaction.

Say, for example, Alice has a total of 50 Bitcoin and the same amount of Bitcoin she has transferred to Bob and says she has transferred to Charlie.

Now, these transactions are a kind of double-spending that both the transactions cannot be valid simultaneously. Now in a centralized A system like a banking agency this is very easy to validate such that kind of double-spending. 

 whenever you are submitting the transaction to the bank, the bank can validate that where are whether you are doing a double-spending like you have said 1000 rupees in your hand, but you are making two transactions way 1000 rupees. So, the bank can validate that an accordingly can take the necessary actions, but the question comes that in a decentralized network how can you prevent double-spending so, that someone will not be able to make two transactions with the same bitcoins.

HANDLE DOUBLE SPENDING USING BLOCKCHAIN

  • Details about the transaction are sent and forwarded to all or as many other computers as possible
  • Use blockchain- a constantly growing chain of blocks that contain a record of all transaction
  • The blockchain is maintained by all peers in the bitcoin network-everyone has a copy of the blockchain

So, to prevent double-spending we use this blockchain in Bitcoin  So, the details about the transactions which are sent, these transactions are forwarded to all the users in the Bitcoin network or as many as other computers as possible and we use this blockchain, which is a constantly growing chain of blocks to contain a record of all such transactions and this blockchain is maintained by all the peers in the Bitcoin Network. So, everyone has a copy of the blockchain.

So, in the case of a Bitcoin network. So, all the nodes who are there in the network, they maintain a copy of the blockchain with them.

 So, everyone has the same copy of the blockchain which contains all the transactions. So, the transactions they are put inside this blockchains and everyone can validate those transactions as well.

  • To be accepted in the chain, transaction blocks must be valid and must include proof of work- a computationally difficult hash generated by the mining procedure
  • Blockchain ensures that, if any of the blocks is modified, all following blocks will have to be recomputed

Now, to get a transaction accepted for a chain the transaction blocks, they need to be validated and they also should include something called the proof of work. So, this proof of work is the Bitcoin consensus algorithm that we will discuss later on,  where the miners need to solve a computationally difficult hash problem-based on a challenge and they need to solve a hash puzzle that we have discussed earlier; that means, they need to find out something like this, like they need to find out y with the hash value of x and some nonce.

                                                                  Y = H (X || NONCE)

So, the miners need to find out this nonce where x and y are known. So, ideally in the case of Bitcoin, x is known x is a record of the previous hash, and the set of transactions organized in a Merkle tree and a Merkle root; and y hash certain constants like y should have a certain number of zeros at the beginning. So, that was the constant which is imposed on y.

Now, the target of the miner is to find out this nonce so, that they can find out a hash value y with this constant like there would be a certain number of zeros at the prefix of y. So, y will look like something like there is a set of zeros and followed by saying some numbers. So, y will look something like this. So, there would be a certain number of zeros at the beginning, which is put as the puzzle for this particular mining problem in bitcoin. So, the miners need to find out the nonce so, that y looks like this. (0000000…….FIG2FDG)

So, finding out this kind of the solution for this kind the puzzle as we have discussed earlier it is a very difficult you do not have any kind of computationally efficient algorithm to solve this kind of puzzle, and the best way of doing it is to try with different random nonce or different values of a nonce. So, the miners find out this nonce values which work like a proof of work.

So,  the response to this particular challenge or the solution of this particular puzzle is this nonce value, which works as proof of work. So, this particular An algorithm is known as the proof of work, which is used to validate a particular block in the blockchain. Now,  blockchain ensures that as you have discussed earlier as blockchain ensures because of this hash pointer property and every block also contains the hash of the previous block. So, the entire thing is tamper-proof.

So, if any block is modified, you need to modify all the subsequent blocks and the hash for all the blocks needs to be recomputed.

HANDLE DOUBLE SPENDING USING BLOCKCHAIN

  • When multiple valid continuations to this chain appear, only the longest such branch is accepted and it is then extended further(longest chain)
  • Once a transaction is committed in the blockchain, everyone in the network can validate all the transaction by using alices public address
  • The validation prevents double-spending in bitcoin 

 Now,  these things we have mentioned earlier briefly that when multiple valid continuations to this chain appear, only the longest such A branch is accepted and it is then extended further. So, we always consider the longest The chain in the Bitcoin network we will go to that little details in the next discussion that how we achieve this.

And once a transaction is committed in the blockchain then everyone in the network can validate the transaction by using Alice’s public address. So, this somehow spends or prevents the double chain double-spending in bitcoin. Like if there are two transactions with the same Bitcoin everyone will be able to see that and the miners will not include both the transactions in the same block and if a transaction is already included in a block, then the same transaction same Bitcoin that will not be used in an in the next block or any of the subsequent blocks.

By maintaining this kind of blockchain architecture which are already get got validated, you can this way prevent the double-spending in the network.

BITCOIN ANONYMITY

  • Bitcoin is permission-less, you do not need to set up an “account”, or required any e-mail address, user name, or password to login to the wallet
  • The public and the private keys do not need to be registered, the wallet can generate them for the users
  • The bitcoin address is used for a transaction, not the user name or identity

Now,  another concept in the context of Bitcoin is anonymity like this Bitcoin is permissionless, that you do not need any setup of any account or you do not require an email address user name, or password to login to your wallet anytime you can join in the network. Now, whenever you are joining the network, you do not again need to register your public and the private keys, the wallet can generate the public and the private keys for you.

Now the interesting part is this Bitcoin address which is used for the transaction so, this Bitcoin address or not the user name or the identity. So, they do not carry the identity of a particular user, they are some kind of anonymous address through which you will not be able to guess who is the actual user. And a single user can have more than one address as well.

So, let us look into a brief that how these addresses are generated. So, these Bitcoin addresses basically correspond to it is a mathematical correspondence, of the public key which is used by the user. So, the broad algorithm is something like this.

So, you bitcoin have generated your public key.

  • A bitcoin address mathematically corresponds to a public key based on ECDSA- the digital signature algorithm used in bitcoin
  • A sample bitcoin address:1PHYrmdJ22KMjbeufg3BMPmNVkhg63hhHo
  • Each person can have many such addresses, each with its own balance 
  • Difficult to know which person owns what amount

So, once you have generated your public key, say Alice’s generated her public key says this is the public key for Alice. So, what you do that once you have this public key for Alice which is generated by this ECDSA algorithm, you apply a hash over that. Normally we apply a 160-bit hash function on top of that. So, after applying the hash function on top of that, you extract the first few bits out of that hash and use that as your address.

 a sample Bitcoin address looks something like this. So, this is a sample Bitcoin address, which is generated by applying the hash function over the public key and then performing certain other operations. 

 there are multiple versions of Bitcoin addresses different addresses apply a different set of operations, but the broad idea is that you have the public key on the public key you apply a hash algorithm one 160 bit A hash algorithm,  and then by taking the hash value and processing over that doing some for the processing over the hash value finally, you generate an address like this. So, by looking into this address it is difficult to guess who is the actual user.

Now, as I  have mentioned that each person can have more than one such address, even some Bitcoin users have many of such addresses and each of the addresses will have their value. So, that way it is difficult to know which persons own the account. So, these particularly prevent the anonymity of Bitcoin transactions by you can always see the transactions inside the blockchain, but you have no way to identify who the corresponding user is.

BITCOIN SCRIPT

  • Alice makes a transaction of BTC 20 to Bob. how bob will claim those transactions?
  • A transaction is characterized by two parameters
  • Alice sends some bitcoin: the output (out) of the transaction
  • Bob receives some bitcoins: the input(in) of the transaction
  • We need to determine that a transaction input correctly claims a transaction output

 Now,  Bitcoin has a nice concept called the Bitcoin script. So, what is the Bitcoin script?

Say Alice makes a transaction of some 20 Bitcoin to bob. Now how, Bob will claim that transactions, how Bob will know that those transactions are intended for him and no one else other than Alice’s actually initiated that transaction. Now, the broad concept we have discussed earlier, the broad concept says that you include the signature of Alice along with the transactions.

So, along with the transactions you include two other things. So, whenever you are sending some transactions. So, along with the transactions, you send a signature and you send the public key say you send a public key of the Alice.

So, these three formations are transferred and if this three information are transferred then Bob can look into this information and Bob can find out that well in this transaction is from say A to B where A is the address of Alice, and B is the address of Bob and by verifying this signature with this public key, Bob can find out that this transaction is a valid transaction, which comes from Alice and no one else in the network and this is not a kind of force transaction in the network.

 after doing this validity check on this top of this The transaction, then Bob can accept the transaction Now, every transaction is characterized by two parameters one is called like the input parameter, the input parameter is something like that the input of a transaction is  Bob is receiving some bitcoins and The output of a transaction is Alice is sending some Bitcoin to bob.

So, it is something like this that Alice is making a transaction of say Bitcoin 20 to Bob. So, Bob is receiving this Bitcoin 20 from Alice. So, this is the input of the transaction that Bob is receiving Bitcoin 20, and this is the output of the transaction or out of the transaction which says that Alice is transferring some Bitcoin 20.

Now, what we need to determine here that The input of a transaction correctly claims the transaction output. So, the transaction which has been made from Alice is correct and it is intended for Bob only.

  • A programming language to validate bitcoin transactions
  • A list of instructions recorded with each transaction
  • Describes how the next person can gain access to the bitcoins if that person wants to spend them
  • FORTH- like language, stack-based and processed left to write

ScriptPubKEY:OP_2DUP OP_EQUAL OP_NOT OP_VERIFY OP_SHA1

OP_SWAP OP_SHA1 OP_EQUAL

Scriptsig: <preimage1> <preimage2>

 for that what we do rather than transferring the public key or transferring the signature what Bitcoin does Bitcoin transfer some code, which is some scripts. So, Bitcoins script is a programming language to validate Bitcoin transactions. So, it is a list of transactions or lists of instruction records with each transaction, and it describes how the next person who can gain access to the Bitcoin if that person wants to spend them.

Now, Bitcoin script is a forth like language, it is a stack-based and processed left to write we will see an example of this forth like language.

 So, this is an example of a Bitcoin script, we will go to the details of this particular script that what does it mean, and what are the individual operators of this script looks like. So, before going to that  as this Bitcoin script is an inspired from this forth language let us look briefly

about how forth works.

HOW FORTH WORKS

  • A stacked based computer programming language originally designed by Charles Moore
  •  A procedural programming language without type checking
  • Use a stack for recursive subroutine execution
  • Uses reverse polish notion (RPN) or postfix notation

So, this forth is a stack-based computer programming language, which was originally designed by Charles Moore.  It is a procedural programming language without any type checking, it uses a stack for recursive subroutine computation and it uses this reverse polish notation or the postfix notation to make a computation. So, what is a postfix notation? Say in postfix notation say you want to make an addition of 2 plus 3 in postfix notation, this operator is written after the operand.

Like 2+3 =5  and 2, 3 + manner

So, in the postfix notation, it is written as 2 3 plus. So, if you convert infix operation. So, this operation we called an infix operation. So, if you convert an infix operation to a postfix operation, the advantages are that you can use a stack to correctly do the computation of that particular postfix operation.

FORTH- SAMPLE EXECUTION USING RPN

30  10  *  15  +  CR

 → 30

      →300

            →315

So, here is a sample execution of forth using this reverse polish notation, say you want to make this computation. If you want to make this computation you first put 30 to the stack, then once you have put that 30 to the stack, you encounter 10, 10 is also pushed in the stack.

Then you come to the next thing, the next thing is a multiplication operator. Whenever you are getting a multiplication operator you pop out the top two-element from the stack

and do the multiplication.

So, the multiplication result is 300 it is again pushed to the stack, then the next operon operand is 15, you if there is an operand you push it in the stack.

And after that, you are getting a plus whenever you are getting a plus, you pop out the top two operands from the stack and perform the operation, push it again in the stack and you got three 115.

And finally, you get ah this CR instruction whenever you are getting the CR instruction you finally, get the output ah which is there at the top of the stack as result. So, the idea in this execution of  RPN representation using a stack is that, whenever you are having some kind of operand like 30 or 10 and whenever you have the operand, then you push them in the stack, and whenever you are getting some operators like this star(*).

So, whenever you have some operator, then you if this is a binary operator(*). So, you pop-out the top two-element from the top two elements from the stack, then you perform the operation, and then push the result in the stack.

 that way you can perform the execution using this reverse polish

Notation.

FORTH-SAMPLE CODE

FORTH CODE

:FLOOR5  (n–n’) DUP 6 < IF DROP 5 ELSE 1 – THEN;

EQUIVALENT C CODE:

Int floor5(int v) {

Return  (v<6) ?5 : (v-1);

}

  • Defines a new word (a subroutine) called FLOOR5

 So, this is again of forth sample code and the corresponding C code representation, this is a forth subroutine a fourth subroutine is named as a word. So, in this subroutine.

 this particular instruction in the brackets,  it means that we are taking one input and we are possibly producing some other output. So, this is in the forth representation, then this particular instruction is equivalent to c instruction that v less than 6 if v less than 6 is true then you return 5 otherwise you return v minus 1. Now, whenever you are representing in forth.

So, this dup operation duplicates whatever is there in the stack top. So, it is like whatever input you are getting here. So, that input will be inserted in the stack. So, you are if you are getting a value say 7, 7 will be inserted in the stack then you will get a 6, 6 will be inserted in the stack, then you will get an operand whenever you are getting the operant you compare these top two elements in the stack by comparing that you find out whether that is true or false.

So, here  6 is less than you making and this operand. So, 7 is less than 6  it is false. So, the output of this operation is false. So, you take a false and push it inside the stack.

 in the stack now, you will have false, then you execute this if statement. So, if it is false so; that means, you will directly jump to the else statement and in else statement, it is saying that whatever you make a minus. So, this duplicate element has duplicated the entry in the stop the stack stop. So, you make a minus from there, and after doing the minus whatever be the result you pop it out.

So, the entire thing you can execute in the stack in this way. So, you have the stack there whatever be the input, say the 7 was the input you have put that input in the stack then there is a dup. So, this dup duplicate whatever there is the stack. So, this duplicate will duplicate the 7 in the stack then there is an operand you push it in the stack, make this comparison whenever the comparison is there, by doing the comparison the result is false.

So, you pop this out and put false there, then based on the if statement it comes to this else part because it is false. So, once it comes to false then whatever be there in the stack top, you have a one. So, you push one there and then you have an operand minus then this minus you make a 7 minus 1, It is it comes to be 6 and then 6 is returned from this execution.

it becomes equivalent to the corresponding  C code. So, this is all about the forth programming language, in the next discussion We, Will, see how Bitcoin script is extended on top of this forth programming language and it performs the input and the output operation,  for the Bitcoin transactions. 

FAQ

The combination of a public key and a private key are known by what term below?

  • Need to ensure that Eve cannot spend Alices bitcoin by creating transactions in her name.
  • Bitcoin uses public-key cryptography to make and verify digital signatures.
  • Each person has one or more addresses each with an associated pair of public and private keys (may hold in the bitcoin wallet)

Now,  whenever you are sending the payments in the Bitcoin network,  you need to ensure that any other person cannot spend the Bitcoin owned by one person. So, it cannot spend the Bitcoin which is owned by Alice,  by creating the transaction in her name. So,  the intruders in the network will not be able to create some kind of false transactions. 

To ensure that Bitcoin uses the public key cryptography as I have mentioned earlier, that it uses this digital signature concept along with e c d s a digital signature algorithm to make and verify the transactions using digital signatures. So, each person who is participating in the Bitcoin network, they have one or more search addresses with an associated pair of public and private keys.

So, every user can have one or more addresses based on your wallet or how many addresses you can create, but every Bitcoin address they will get associated with it appeared of the public and private key.

  • Alice wishes to transfer some bitcoin to bob.
  • Alice can sign a transaction with her private key
  • Anyone can validate the transaction with Alices public key

Now,  say Alice wants to transfer some Bitcoin to bob. So, what Alice can do, Alice can sign the transaction. So, Alice can create a transaction and along with the transaction, Alice can put her signature and send that to bob. And during putting the signature as we have discussed earlier during the crypto primitives, Alice can use her private key to sign that particular transaction and send the signature along with the transaction. Now anyone in the network can validate this transaction with Alice’s public key. So, they can decrypt the transaction with the public key and validate whether the transaction is originated from Alice or not.

BITCOIN BASICS-SENDING PAYMENTS

  • Alice wants to send bitcoin to bob
  • Bob sends his address to Alice
  • Alice adds bob’s address and the number of bitcoins to transfer in a “transaction” message
  • Alice signs the transaction with her private key and announces her public key for signature verification
  • Alice broadcasts the transaction on the bitcoin network for all to see

So,  these are the set of states that Alice has to follow if she wants to make some transfer of certain bitcoins to Bob. So, first Bob sends his address to Alice. So, this is a cryptographically generated address which is transferred to Alice, now Alice adds Bob address and the amount of Bitcoin that need to be transferred in a transaction message.

So, see construct a transaction message with that particular transaction information, that the transaction is from Alice’s address to Bob address, and along with that, you put the amount of Bitcoin that needs to be transferred.

Now Alice signs the transaction with her private key and announces the public key with which anyone can validate that transaction, then Alice broadcasts this transaction in the Bitcoin network for all to see that transaction. So, the broad idea is that Alice constructs the transaction put her signature along with the transaction, and also put the public key to validate the transaction, then broadcast the transaction in the Bitcoin network.

READ MORE ARTICLE: R3 CORDA

follow us on facebook

Leave a Comment