<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aditya Kumar Singh</title>
    <description>The latest articles on DEV Community by Aditya Kumar Singh (@sadityakumar9211).</description>
    <link>https://dev.to/sadityakumar9211</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F909142%2F4292018c-685c-47bd-b1fc-09c2c9e6ba13.jpg</url>
      <title>DEV Community: Aditya Kumar Singh</title>
      <link>https://dev.to/sadityakumar9211</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sadityakumar9211"/>
    <language>en</language>
    <item>
      <title>Overview of Symmetric Key Cryptography</title>
      <dc:creator>Aditya Kumar Singh</dc:creator>
      <pubDate>Sat, 29 Oct 2022 05:44:14 +0000</pubDate>
      <link>https://dev.to/sadityakumar9211/overview-of-symmetric-key-cryptography-4jek</link>
      <guid>https://dev.to/sadityakumar9211/overview-of-symmetric-key-cryptography-4jek</guid>
      <description>&lt;p&gt;Today we usually use the word crypto in our daily conversations as short for cryptocurrency. The popularity of crypto, at least in public opinion, has completely overshadowed the underlying principles that cryptocurrency works upon. Cryptocurrency and various other applications - NFTs and DAOs are based on a single and the most fantastic technology of today - Blockchain.&lt;br&gt;
Well, Blockchain is a technology and similar to other technologies, there is not one, not two, but many techniques and principles used from the book of science and mathematics for perfecting this technology, which still is not perfect and scalable to the scale we need it to be. However, Blockchain uses "Public-Key Cryptography", specifically Elliptical Curve Cryptography (ECC), for the identification and authentication of senders and messages. This article will only provide an overview of Symmetric Key Cryptography. The upcoming articles of this series will cover the various public-key cryptography techniques and possibly the underlying mathematics behind them.&lt;/p&gt;

&lt;h2&gt;
  
  
  The meaning of the word Cryptography
&lt;/h2&gt;

&lt;p&gt;Today the words "cryptography", "cryptology", and "cryptanalysis" are commonly interchanged. However, they have slightly different meanings. "Crypt" means hidden, and "graphy" means writing in Greek. So, cryptography means hidden writing. Typically when a cypher is constructed, the idea is that there is a person or a group who will "legitimately" decipher the text. In order to legitimately decipher, it is understood that the person will have access to what's referred to as a "key". Simply put, a "key" is any means of quickly and efficiently determining the original text. A good cypher system is constructed so that deciphering the text without the correct "key" is almost impossible.&lt;br&gt;
Cryptanalysis refers to the analysis of hidden texts - cypher texts without having access to a legitimate "key" to break the cypher. Cryptology means the study of hidden writings or secrets. This encompasses both the establishment of encryption methods and analysis of a cypher in order to break it without the associated key.&lt;/p&gt;

&lt;h2&gt;
  
  
  Symmetric Key Cryptography
&lt;/h2&gt;

&lt;p&gt;The hiding of secrets in written and pictorial form to communicate information crucial to war strategies or even for simple games dates back thousands of years, going far back in time to ancient Egypt. These people used the type of cryptographic systems that incorporated "Symmetric Key Cryptography".&lt;br&gt;
Symmetric key systems are cryptographic systems in which decrypting is as simple as reversing the encryption used. The sender encrypts the plain text with a key, and this encrypted text - cypher text is communicated over an insecure channel, and the receiver decrypts the cypher text using the exact same key. A trivial example of this kind is "Caesar Cypher", which comes under the family of "substitution cyphers". The letters in the plain text are replaced by some other letters of the same alphabet in a fixed pattern that both the sender(obviously) and receiver are aware of.&lt;/p&gt;

&lt;p&gt;The simplicity of using the same key both to encrypt and decrypt is offset by the difficulty of ensuring that all parties involved have the needed keys in a tense situation and also when people may be widely dispersed geographically. The lack of an ideally secure channel in such environments for exchanging keys is the deal-breaker for symmetric key cryptography. People have tried their way around it by using "code books" in the 1800s, which listed which keys to be used on which dates of the month. The sender and the receiver both needed a copy of the same "code book" for this. However, if the "code book" gets compromised, the communication over the entire duration would be leaked, which would most likely lead to devastating consequences.&lt;/p&gt;

&lt;h2&gt;
  
  
  Confusion and Diffusion
&lt;/h2&gt;

&lt;p&gt;Claude Shannon was one of the first to formalize the principal aims of a cryptographic system. He argued that a cryptosystem designer should assume that the system may be attacked by anyone who has access to it., as was indeed the case during the two world wars when machines were stolen and reverse engineered. He argued that the only point of secrecy should be the key, but that the system design should complement the security by incorporating the "confusion" and "diffusion". Confusion is intended to make the relationship between the key and the cypher text as complex as possible. Diffusion refers to rearranging or spreading out the bits in the message so that any redundancy in the plaintext is spread out over the cipher text so that the complexity for recognizing patterns in cypher text is increased multifold.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Enigma
&lt;/h2&gt;

&lt;p&gt;Enigma Encryption Machine - Mechanical Cypher MachineEnigma machine designed by Arthur Scherbius and used by Germans during WWII utilized a symmetric key encryption technique. In this case, the "key" was the setup configuration of the machine, including the rotors utilized, the rotor order, the ring setting of each rotor, the starting position of each rotor, and the plugboard letter swaps on the front panel.&lt;br&gt;
Both the sender and receiver needed to have the exact setup configuration of the machines to communicate. At the start of every month, a list of that month's day keys were distributed. This is an example of the "code books" technique in symmetric key cryptography.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JPEkjnaZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1663498085900/fvhEXodR4.jpeg%2520align%3D" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JPEkjnaZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1663498085900/fvhEXodR4.jpeg%2520align%3D" alt="enignma.jpeg" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For extra security, after an Enigma operator set up his machine with the day key. He would then choose to rotate the position of each rotor to some random position called the Grundstellung or indicator-setting. This information was communicated to the receiver unencrypted. The sender would then select a new series of random letters to encrypt and type them into the Enigma twice consecutively. After entering this information, the sender would rotate the rotors once again to the position of the random letters previously chosen and entered. The sender now proceeds to encrypt the message.&lt;/p&gt;

&lt;p&gt;The receiver would have the Enigma set with the day key settings. He would then receive the Grundstellung unencrypted from the sender and change the Enigma configuration accordingly. Next, the initial two consecutive series of encrypted random letters would be entered, revealing the rotor position settings to be set to decrypt the remaining message.&lt;/p&gt;

&lt;p&gt;Hope you learnt something new and interesting. If you find cryptography and Blockchain exciting, follow me because I will be coming up with more on this.&lt;/p&gt;

&lt;p&gt;Adios 😊!&lt;/p&gt;

</description>
      <category>cryptography</category>
      <category>blockchain</category>
      <category>cybersecurity</category>
      <category>security</category>
    </item>
    <item>
      <title>Public Key Cryptography</title>
      <dc:creator>Aditya Kumar Singh</dc:creator>
      <pubDate>Sat, 29 Oct 2022 05:37:20 +0000</pubDate>
      <link>https://dev.to/sadityakumar9211/public-key-cryptography-3n88</link>
      <guid>https://dev.to/sadityakumar9211/public-key-cryptography-3n88</guid>
      <description>&lt;p&gt;In my previous article, I discuss an overview of &lt;a href="https://dev.to/sadityakumar9211/overview-of-symmetric-key-cryptography-4jek"&gt;symmetric key cryptographic systems&lt;/a&gt;. The major drawback of such a system that held symmetric key cryptography to be used widely in business circles was the exchange of keys over an insecure channel. In the absence of any other method of secure information exchange, governments established methods of managing keys. However, many in the business world were not interested in employing circumspect and perhaps even dangerous methods of key exchanging keys. In the 1960s, this became known as the "key management" problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Diffie - Hellman Key exchange
&lt;/h2&gt;

&lt;p&gt;In 1976, Whit Diffie and Martin Hellman published a &lt;a href="https://ee.stanford.edu/~hellman/publications/24.pdf"&gt;paper&lt;/a&gt; describing a method of establishing a common key securely over an insecure channel which used exponentiation and the fact that exponents can be multiplied in any order with the same results. The protocol (steps) set out here permits two parties (say Alice and Bob) to use these insecure channels to exchange information in such a way that after several communications, they share a single value known only to them and then use this key to further conceal communications. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;:  In the first step, Alice and Bob agree on common parameters which do not have to be kept secret from anyone else. These are&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; a large prime number &lt;code&gt;q&lt;/code&gt; and &lt;/li&gt;
&lt;li&gt; a primitive root &lt;code&gt;a(mod q)&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now both (we take Alice here) generate their own public key independently by&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;choosing a secret integer: XA &amp;lt; q&lt;/li&gt;
&lt;li&gt;and computing their public key: YA = a&lt;sup&gt;xA&lt;/sup&gt; (mod q)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Alice and Bob now publish their respective public keys YA and YB wherever they like. In particular, they need to know each other's public keys and can simply send them to each other directly. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;: Alice and Bob now establish a common value as follows: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bob computes YA&lt;sup&gt;XB&lt;/sup&gt; (mod q) using his private key;&lt;/li&gt;
&lt;li&gt;Alice computes YB&lt;sup&gt;XA&lt;/sup&gt; (mod q) using her private key;&lt;/li&gt;
&lt;li&gt;But both are the same: KAB = a&lt;sup&gt;XAXB&lt;/sup&gt; (mod q).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Each party uses their own secret key in generating a common value, so no one else is able to do this. Consequently, K AB is known only to A and to B and can now be used as a key in encryption between Alice and Bob. &lt;/p&gt;

&lt;p&gt;However, this scheme was only useful for establishing keys and did not actually encrypt any data. The search was still on for an encryption scheme that allowed anyone to send an enciphered message to any other person without pre-establishing keys, such that only the targeted recipient could decrypt the message. &lt;/p&gt;

&lt;p&gt;The first example of such a solution appears to have been developed independently from two sources.&lt;/p&gt;

&lt;p&gt;Basically, the idea is for each person to have two keys, one to encrypt and one to decrypt. The two keys would have to be bound together in some fundamental way in order for them to "invert" each other, but it should be impossible for an attacker to derive one from the other. The encryption key would be published as we publish our phone number. However, only the recipient would know his/her decryption key; it would not be revealed to anyone else. This idea completely solved the problem of exchanging keys, except for the fact that initially, no one had a real way of setting up such a scheme. &lt;/p&gt;

&lt;h2&gt;
  
  
  RSA (Rivest-Shamir-Adleman)
&lt;/h2&gt;

&lt;p&gt;In 1978, the first actual method for implementing such a scheme was published by Ronald Rivest and is now widely known by the first letter of each of the authors' names as RSA. The security of RSA was based on the difficulty of factoring large integers. In 1977, it was finally revealed that members of the British intelligence agency Government Communications Headquarters (GCHQ) had also invented essentially the same scheme early in the 1970s. A detailed description of the RSA scheme will be discussed in later articles.&lt;/p&gt;

&lt;h2&gt;
  
  
  ElGamal
&lt;/h2&gt;

&lt;p&gt;The ElGamal cryptographic algorithm was invented a few years after the RSA scheme, developing from the PhD thesis of Taher ElGamal, which was awarded in 1984. The underlying security principle on which this scheme is based is quite different from RSA. In ElGamal, the target is to determine the exponent in an equation of the form \(a = b^x\) where &lt;code&gt;a&lt;/code&gt; and &lt;code&gt;b&lt;/code&gt; are known. A detailed description of the ElGamal scheme will be discussed in later articles.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Elliptical Curve Cryptography (ECC) is another public key encryption algorithm which is &lt;a href="https://ww1.microchip.com/downloads/en/DeviceDoc/00003442A.pdf"&gt;reported&lt;/a&gt; to be 50 to 100 times faster than RSA on 256-bit security levels. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  A Comparison of Symmetric and Asymmetric Key Cryptography
&lt;/h2&gt;

&lt;p&gt;All known asymmetric(public) key schemes are far more computationally expensive than symmetric key schemes. For example, the disadvantage of the ElGamal scheme is that the encrypted message becomes very big, about twice the size of the original message. Similarly, RSA is a lot slower than DES which is a symmetric key protocol, almost by a factor of 1000. For this reason, public key schemes are traditionally used only for small messages, such as secret keys, whereas symmetric key schemes are retained for sending large messages. &lt;/p&gt;

&lt;p&gt;Both symmetric and asymmetric key schemes use encryption and decryption keys, but in symmetric key schemes, both of these are identical. In contrast, they are different but related in the asymmetric (public) key system. However, the security of such a system is based on the difficulty of deriving one from another. &lt;/p&gt;

&lt;h2&gt;
  
  
  Cryptography  - More than Just Hiding Secrets
&lt;/h2&gt;

&lt;p&gt;As the adoption of computers and the internet increased for communication, various applications of cryptographical schemes other than just concealing information were developed to address the needs of the digital age. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Q. How to confirm that a message received indeed came from the sender purported? (It's quite easy to change the name of the sender in most e-mail systems). &lt;/p&gt;

&lt;p&gt;Q. How to prevent a sender from claiming that they did not, in fact, send the message you received?&lt;/p&gt;

&lt;p&gt;Q. How to ensure that the message received was the one sent and had not been altered? &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The most recent significant application of cryptography is, therefore, for the identification of senders, authentication of senders and recipients, as well as the message themselves, and digital signatures applied to messages. &lt;/p&gt;

&lt;h3&gt;
  
  
  Digital Signatures for User Authentication
&lt;/h3&gt;

&lt;p&gt;A digital signature is a method of applying data to a message which identifies the sender of the message in the same way that a written signature on a piece of paper confirms authorship. All known public key schemes can be used to implement this in practice. &lt;/p&gt;

&lt;p&gt;In using a public key scheme to send a signed message to Bob, Alice can simply encrypt the message using her private key. When Bob receives the message, he can verify that it was "signed" by Alice by applying Alice's public key to the received encrypted message. The result should be a readable message that makes sense to Bob. If it was not signed with Alice's private key, then applying her public key to decrypt the message would result in nonsense, so Bob can be sure that it was signed by Alice. &lt;/p&gt;

&lt;h3&gt;
  
  
  Message Authentication
&lt;/h3&gt;

&lt;p&gt;Hashing algorithms, along with encryption schemes, can be used to verify the message and if it has been altered from its original version during the transmission to the recipient.  The original message &lt;code&gt;M&lt;/code&gt; can be hashed (more on hashing algorithms in later articles), and the generated digest of the message &lt;code&gt;D&lt;/code&gt; can be appended to the message &lt;code&gt;M||D&lt;/code&gt;. This appended string is then encrypted using the public key of the recipient and the private key of the sender in any order. The recipient, on receiving this doubly encrypted string &lt;code&gt;M||D&lt;/code&gt;, can perform double decryption once using his private key and once using the sender's public key in a pre-determined order. He can then separate the message &lt;code&gt;M&lt;/code&gt; and digest &lt;code&gt;D&lt;/code&gt; using many methods (like the first few bits can be used to depict the length of the message &lt;code&gt;M&lt;/code&gt;). He can independently calculate the message digest &lt;code&gt;D'&lt;/code&gt; and compare &lt;code&gt;D&lt;/code&gt; and &lt;code&gt;D'&lt;/code&gt; to verify if the message has been altered from its original version. &lt;/p&gt;

&lt;p&gt;That was about public key cryptography from my side. If you want to read about symmetric key cryptography, you can refer to my &lt;a href="https://saditya9211.hashnode.dev/an-overview-of-symmetric-key-cryptography"&gt;this&lt;/a&gt; article. &lt;/p&gt;

&lt;p&gt;Adios 👋&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>cryptography</category>
      <category>ethereum</category>
      <category>bitcoin</category>
    </item>
    <item>
      <title>What do we mean by UTXOs?</title>
      <dc:creator>Aditya Kumar Singh</dc:creator>
      <pubDate>Sun, 18 Sep 2022 12:42:37 +0000</pubDate>
      <link>https://dev.to/sadityakumar9211/what-do-we-mean-by-utxos-32o8</link>
      <guid>https://dev.to/sadityakumar9211/what-do-we-mean-by-utxos-32o8</guid>
      <description>&lt;p&gt;Anyone learning Blockchain Technology will be puzzled by the concept of UTXOs and how they enable blockchain protocols (specifically Bitcoin protocol) to make transactions.&lt;/p&gt;

&lt;p&gt;I will be talking about Bitcoin, which uses the UTXO model to keep track of transactions and detect double-spending. Ethereum uses the Account/Balance Model for keeping track of the balance of a particular account. UTXO stands for Unspent Transaction Output. UTXO is of two types:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Input UTXO&lt;/li&gt;
&lt;li&gt;Output UTXO&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In bitcoin, the funds in a transaction are treated as a single unit, and to spend the funds received from a transaction, you have to spend the entire fund referenced in that input transaction. If you only want to spend only a fraction of the bitcoin in that referenced by that input transaction, then you need to create two transactions, one to the potential receiver’s account and another to your account.&lt;/p&gt;

&lt;p&gt;Input UTXOs are basically the transactions whose funds have not been spent, i.e. not yet referenced as an input to any other transaction.&lt;/p&gt;

&lt;p&gt;Output UTXO are the transactions which are generated after a transaction becomes successful.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Transactions in UTXO model
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftrk579trp2jkpegaevxw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftrk579trp2jkpegaevxw.png" alt="Transactions in my account" width="580" height="182"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Consider these bitcoin transactions, which result in transferring a sum of 0.61 BTC to my account.&lt;/li&gt;
&lt;li&gt;Now I want to buy a truck that costs 0.55 BTC.&lt;/li&gt;
&lt;li&gt;Now, to spend 0.55 BTC, I have to reference one or more transactions called input transactions whose cumulative sum is equal to or more than 0.55 BTC.&lt;/li&gt;
&lt;li&gt;If I have an option to choose from those transactions shown above (let’s suppose all other transactions referencing my account are either output transactions — where I am sender), then I have only one option for a set of input transactions, i.e. first and second transactions.&lt;/li&gt;
&lt;li&gt;But hey, these transactions result in 0.6 BTC, then where is the remaining 0.05 BTC going after I pay for 0.55 BTC?
These remaining amounts can be used in these three ways: -&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Send the remaining amount back to your account.&lt;/li&gt;
&lt;li&gt;Use the remaining amount as the transaction fee. Every transaction on the blockchain has associated transaction fees.&lt;/li&gt;
&lt;li&gt;Send the remaining amount to someone else.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftyhen00soe5cxah1nkwu.png" alt="Input and Output UTXOs" width="800" height="349"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;6.. After the transaction is confirmed, the transactions in my account will look like this:&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnqr7ncbno97aa0xby3s4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnqr7ncbno97aa0xby3s4.png" alt="Finally transactions in my account" width="462" height="342"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;7.. The first two transactions that have now been spent can’t be referenced as input UTXOs to any other transactions.&lt;/p&gt;

&lt;p&gt;8.. The transaction in purple is the outgoing transaction (BTC is sent and not received), so it also can’t be used as input UTXO in any transaction.&lt;/p&gt;

&lt;p&gt;9.. The 3rd and the 5th transaction shown in green are the transactions which are unspent and can be used as input UTXO to other transactions.&lt;/p&gt;

&lt;p&gt;That’s about it for now.&lt;/p&gt;

&lt;p&gt;Adios 👋&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>cryptocurrency</category>
      <category>bitcoin</category>
    </item>
    <item>
      <title>Basic Operations in Bitcoin Blockchain</title>
      <dc:creator>Aditya Kumar Singh</dc:creator>
      <pubDate>Sun, 28 Aug 2022 17:59:00 +0000</pubDate>
      <link>https://dev.to/sadityakumar9211/basic-operations-in-bitcoin-blockchain-4h28</link>
      <guid>https://dev.to/sadityakumar9211/basic-operations-in-bitcoin-blockchain-4h28</guid>
      <description>&lt;p&gt;We have all heard about Blockchain and how it solves many security and counter-party risks, being a decentralised and immutable digital ledger. This article mainly focuses on how the Bitcoin Blockchain (mother of all blockchains) implements these security measures and removes the need of a centralised intermediary for the transfer of value.&lt;/p&gt;

&lt;p&gt;The main operations in a blockchain are &lt;code&gt;transaction validation&lt;/code&gt; and &lt;code&gt;block creation&lt;/code&gt; with the &lt;code&gt;consensus&lt;/code&gt; of the participants. However, there are many underlying operations which help bitcoin solve the problem of &lt;a href="https://en.wikipedia.org/wiki/Double-spending"&gt;double spending&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Operations in the decentralised network are the responsibility of the peer participants and their respective computational nodes. These computational nodes can be a laptop, desktops, or server racks. These operations include validation transactions, gathering the transactions for a block, broadcasting the ballot transactions in the block, consensus on the next block creation, and chaining the blocks to form an immutable record.&lt;/p&gt;

&lt;h3&gt;
  
  
  Basic Operation by a Node(Miner)
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Validation of Transactions&lt;/strong&gt; - A Blockchain validator performs validation by verifying whether transactions are legal (i.e. not malicious or double spends etc). This process involves validating more than 20 criteria, including size, syntax, etc., some of these criteria are - Referenced Input and &lt;a href="https://en.wikipedia.org/wiki/Unspent_transaction_output"&gt;Unspent Transaction Output(UTXOs)&lt;/a&gt; are valid, reference input amount and output amount matched sufficiently. All the valid transactions are added to a pool of transactions - called &lt;a href="https://www.blockchain.com/charts/mempool-size"&gt;mempool&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Gathering(grouping) Transactions&lt;/strong&gt; - Collecting transactions for a block. This grouping of transactions is done at an individual level. All the miners can independently group whatever transaction they want to choose for their candidate block. However, the miner's fees are the sum of all the transaction fees + block rewards using a &lt;a href="https://academy.bit2me.com/en/que-es-coinbase-transaccion/"&gt;coinbase transaction&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Broadcasting valid transactions &amp;amp; blocks - Once the miner has solved the mathematical puzzle, it broadcasts his selected block with the puzzle solution. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Consensus on next block creation - The broadcasted block is then verified by all nodes at individual level.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;It may happen that two nodes transmit their blocks for the same block number after solving the mathematical puzzle. In that case every node will start working on top of the block which reached it first, and this results in the forking of blockchain. The forking of the chains usually completely resolves in 5-6 further blocks. Blockchain resolves this forking of chains by following a rule : **Largest chain is the most true version of the truth&lt;/em&gt;* and the largest chain is accepted by the nodes at individual level every time there is an ambiguity.*&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Chaining Blocks - Once the block is selected, block is added to the local copy of blockchain at node level.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Bonus
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;The algorithm for consensus is called proof-of-work protocol since it involves work i.e. computational power to solve the puzzle and to claim the right to form the next block. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transaction zero&lt;/strong&gt;, index zero of the confirmed block is created by the block's miner. It has a special UTXO and does not have any input UTXO. It is called the coinbase transaction that generates a minor's fees for the block creation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To summarise, the main operations in a blockchain are transaction validation and block creation with the consensus of the participants. &lt;br&gt;
There are many underlying implicit operations as well in the bitcoin blockchain.&lt;br&gt;
For more fine-grained details you can refer to &lt;a href="https://smartereum.com/8970/how-do-bitcoin-nodes-verify-transactions/"&gt;this&lt;/a&gt; article.&lt;/p&gt;

</description>
      <category>bitcoin</category>
      <category>blockchain</category>
      <category>ethereum</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
