{"id":10366,"date":"2023-11-30T13:12:29","date_gmt":"2023-11-30T13:12:29","guid":{"rendered":"https:\/\/www.capitalnumbers.com\/blog\/?p=10366"},"modified":"2025-08-08T09:25:20","modified_gmt":"2025-08-08T09:25:20","slug":"blockchain-authentication-authorization-explained","status":"publish","type":"post","link":"https:\/\/www.capitalnumbers.com\/blog\/blockchain-authentication-authorization-explained\/","title":{"rendered":"Blockchain Breakthroughs: Transforming Authentication, Authorization, and Accounting"},"content":{"rendered":"\n<p>Blockchain has gained immense popularity in the tech world nowadays. But is blockchain worth such hype? Before understanding blockchain and its functioning in detail (technically), let&#8217;s analyze a <strong>real-world banking system<\/strong> for a basic understanding of how blockchain profits various related identities. Assume there is a bank called &#8216;X&#8217; giving services to Wang, Nicolos and Andreas. Andreas and Nicolos are office colleagues and are regular customers of a Chinese restaurant run by Wang. One Saturday night, they decided to have some Chinese, and Wang&#8217;s restaurant was the obvious choice. After having a decent dinner, they asked for the bill and opted to pay online. Due to some issues, Nicolos requested Andreas to pay for him and assured him that pay him later.  Andreas obtained the address (i.e., Anything that refers to the bank account number of Wang) from reception and paid the stated amount (the amount included the cost of the eatables they both had). The next day, Nicolos decided to pay Andreas for the last night and used the same bank service to pay Andreas.<\/p>\n\n<p>In the above story, there are two sections where entities are interacting with each other online. First, Andreas is paying to Wang, and second, Nicolos is paying to Andreas. Before starting anything, let\u2019s consider these questions for both scenarios. Who assures that the recipient addresses obtained by Andreas and Nicolos in both scenarios are designated to their desired address? (authenticity) and what is a guarantee that the amount paid to Andreas and Nicolos belongs to them? (authorization). The obvious answer is &#8216;X'(i.e., the bank), and no one will oppose this. But in this whole scenario, the fact that the whole trust among entities depends solely on the bank &#8216;X&#8217; is also true. No matter what you do while you interact with other entities, <strong>the entire process will be governed by a solo source<\/strong>, that is, the bank here. Now, what if I say there is a technology called Blockchain that will not only profit entities regarding these issues but will also help the banks reduce their workload?<\/p>\n\n<p><i>\u201cThe blockchain is an incorruptible digital ledger of economic \ntransactions that can be programmed to record not just financial\n transactions but virtually everything of value.\u201d<\/i>\n <strong class=\"d-block\">\u2013 Don &amp; Alex Tapscott, authors Blockchain Revolution (2016).<\/strong>\n<\/p>\n\n<h2 class=\"h2-mod-before-ul\">1. Understanding Blockchain<\/h2>\n\n<p>Blockchain is a series of records of data that are immutable in nature, which is governed by <strong>a cluster of systems that are interconnected with each other<\/strong> and are not owned by a single entity, explaining why blockchain is a decentralized system (there is no central authority). The first ever blockchain was invented by Satoshi Nakamoto in 2008 and later was implemented as the first cryptocurrency called &#8216;Bitcoin&#8217;. We don\u2019t have a central governing authority; what about authentication and authorization discussed earlier? How can blockchain provide a solution to those issues?<\/p>\n\n<p>The answer lies in the architecture of blockchain. Authentication is the procedure followed to prove something (i.e., Anything considered) is real or valid. Simply stating authentication is <strong>verifying the identity of any user in the blockchain<\/strong>. Authorization is the process of providing access rights to the data or value that is being considered as per the situation. Want to know about these in detail before opting for <a href=\"https:\/\/www.capitalnumbers.com\/blockchain.php\">blockchain development services<\/a>? Let\u2019s dive in. <\/p>\n\n<h2 class=\"h2-mod-before-ul\">2. Why Are Blockchain-based Authentication and Authorization Important?<\/h2>\n\n\n<p>This is an important question to answer before understanding how blockchain helps in authorization and authentication. Let\u2019s consider Electronic Commerce (E-Commerce) to understand its importance. E-commerce has grown drastically in these few years and are playing a major role in people&#8217;s life. For any E-commerce site, <strong>privacy and security will always be major concerns<\/strong> as data regarding the product being bought and money paid for the product are all done online.<\/p>\n\n\n<p>Consider an E-commerce site, &#8216;XYZ,&#8217; which is famous for buying gadgets. Imagine yourself going for a vacation with your friends while you just come out of your house to join your friends for the proceeding, your phone rings, prompting a message from your bank regarding the amount that has been paid from your bank for the objects you didn&#8217;t even buy, but it would be hard to explain it right. For any system, authentication and authorization are among the most important features, as these two things represent your <strong>virtual identity<\/strong> for that system.<\/p>\n\n<h2 class=\"h2-mod-before-ul\">3. Methods Used for Authentication Nowadays<\/h2>\n\n\n<p>Various systems use different authentication methods for the users. But all have one thing in common; they all require a certain initial to do so. Various systems ask for different initials for using authentication, for example, things known by users such as passwords, biometrics, tokens, smart cards, etc.<\/p>\n\n<h3 class=\"h3-mod\">3.1 Drawbacks related to passwords as initials<\/h3>\n\n\n<p>While authenticating yourself in a particular system, you simply type down your initials. Now, in this particular situation, what are various ways of attacking the user? If you are in touch with the cyber security field, you must have come across attacks like spoofing and keylogging. Apart from these technical attacks, methods like <strong>social engineering and random guessing of passwords<\/strong> may also work if you are a bit close to the victim.<\/p>\n\n<p>For those who are unfamiliar with the terms,<\/p>\n\n<ul>\n    <li><strong>Spoofing:<\/strong> When a hacker tries to impersonate another user of the system so that he or she can get control over the user&#8217;s data.<\/li>\n    <li><strong>Key-logging:<\/strong> This is generally a script running in the background of your computer capable of fetching all the characters that are being typed by your keyboard with the respective typing time. These scripts can be manifested in your computer by hackers through any removable media or wirelessly.<\/li>\n    <li><strong>Social-Engineering:<\/strong> This method cannot be considered a solely technical attack. Hackers try to make you reveal your password verbally or through various methods like a random message in your phone stating an update in your bank account for which it requires your account details.<\/li>\n<\/ul>\n\n\n<h2 class=\"h2-mod-before-ul\">4. Authentication and  Authorization in  Blockchain<\/h2>\n\n<p>Ownership of data regarding any blockchain is established through digital keys, digital signatures, and the address of the owner and recipient. In this section, the mechanism is a reference from the architecture of Bitcoin so that you can understand blockchain through one of its implementations.<\/p>\n\n<p>The digital keys for Bitcoin or any blockchain are generally created by the user and can be stored anywhere in terms of Bitcoin, they have a database to store these keys known as a wallet. Bitcoin uses <strong>asymmetric or public key cryptography<\/strong> (invented in the 1970s). After the invention of public key cryptography, several mathematical functions, practically irreversible, were invented to support this cryptography. One of those mathematical functions is the elliptic curve equation.<\/p>\n\n<h3 class=\"h3-mod\">4.1 Elliptic Curve Equation<\/h3>\n\n<p>An elliptic curve is a curve that,  when represented on the graph, would have all the points satisfying the equation,<\/p>\n\n<div class=\"equation\"><span class=\"equation-left\">y2 = x3 +ax +b<\/span><span class=\"equation-right\">(1)<\/span><\/div>\n\n\n<p>This equation, when represented using a graph, would have singular points. To avoid those singular points, equation 4a3 +27b2 \u2261 0 should be satisfied. Any elliptic curve following the above pattern will always be symmetrical about the x-axis. For proof, let\u2019s take the equation above and consider x=2, a=3, and b=2, and take the square root on both sides of the equation. We obtain two points (2,4) and (2, -4) when we solve the equation, representing values of x and y. No matter what values a, b, and x have, y will always have positive and negative values, proving that the <strong>curve is symmetrical to the x-axis<\/strong>.<\/p>\n\n<p>The elliptic curve math has a point called &#8220;<strong>Point at infinity<\/strong>&#8220;. The simpler meaning of this term is 0. Generally represented by x-y=0.<\/p>\n\n<p>If two points, \u2018P\u2019 and \u2018Q\u2019 are taken on the elliptic curve, then there must be one more point that is obtained after adding \u2018P\u2019 and \u2018Q\u2019. Let\u2019s consider that point as \u2018R\u2019.<\/p>\n\n<p>To draw this line geometrically, first, we have to join the points \u2018P\u2019 and \u2018Q\u2019. This line will intersect the elliptic curve in exactly one additional place. This place is called \u2018-R\u2019, having coordinates (x, y). Now the coordinates of \u2018-R\u2019 are reflected along the x-axis to obtain R (just multiply y of \u2018-R\u2019 with -1).<\/p>\n\n<p><img src=\"https:\/\/www.capitalnumbers.com\/blog\/wp-content\/uploads\/2023\/11\/elliptic-curve-equation.png\" alt=\"Elliptic Curve Equation\"><\/p>\n\n<p><i>Elliptic Curve Showing the Addition of Two Points on the Curve<\/i><\/p>\n\n<p>There are a couple of special cases that explain the need for the &#8220;point at infinity.&#8221;<\/p>\n\n<p>Let\u2019s consider \u2018P\u2019 and \u2018Q\u2019 representing a single point. Now, there are infinite lines possible, but for convenience, only the tangent of that point is considered. This tangent will intersect the curve at exactly one new point. If both the points have a value of x common but a different value of y. Then the line joining them would be vertical, and \u2018R\u2019 would be the \u201cpoint of infinity\u201d.<\/p>\n\n<p>Let\u2019s consider &#8216;P&#8217; to be the \u201cPoint of infinity\u201d. Now when we add P and Q we get Q (the answer will be P if Q is the \u201cPoint of infinity\u201d). Similarly, multiplication can also be defined by modified standard addition. For a point P on the elliptic curve, if n is a whole number, then nP = P + P + P + \u2026+ P (n times).<\/p>\n\n<p>The elliptic curve used by blockchain is <strong>secp256k1<\/strong>, having its mathematical constants. secp256k1 can be represented by the following function:<\/p>\n\n<div class=\"equation\"><span class=\"equation-left\">Y 2 mod p = x3 +7 mod p<\/span><span class=\"equation-right\">(2)<\/span><\/div>\n\n<p><img src=\"https:\/\/www.capitalnumbers.com\/blog\/wp-content\/uploads\/2023\/11\/elliptic-curve-of-bitcoin.png\" alt=\"Elliptic curve of Bitcoin\"><\/p>\n\n<p><i>Elliptic curve of Bitcoin<\/i><\/p>\n\n<h3 class=\"h3-mod\">4.2 Authentication<\/h3>\n\n<p>This issue can be solved with the help of keys. At first, the user has to generate private and public keys. These sets of keys are generally never present in the network but are kept in the wallet, and the network protocols do not affect these keys. The public key is generally used to refer to the user\u2019s network address. We can say that the public key of a user can be a <strong>digital fingerprint for its address<\/strong>. Authentication, as well as authorization, is generally verified with the help of the private key. Consider a situation where user-1 and user-2 are in a blockchain network, and user-1 is trying to send data to user-2. In this scenario, when user-2 obtains the data, how will the user be sure that the obtained data has been sent by user-1? The answer to this question is the private key of user-1, which is used by user-1 to sign or, we can say, generate a digital signature that can used to access the data and also verify that the obtained data is transferred from user-1 (legitimate user). What if user-2 tries to obtain the private key of user-1 from the digital signature? This is also impossible as the algorithm used to generate this digital signature is always a <strong>one-way function<\/strong>. It means one can obtain as many digital signatures from a private key but can never get the private key from the digital signatures.<\/p>\n\n<p><img src=\"https:\/\/www.capitalnumbers.com\/blog\/wp-content\/uploads\/2023\/11\/basic-structure-of-data-transfer-in-blockchain.png\" alt=\"Basic structure of data transfer in blockchain\"><\/p>\n\n<p><i>Basic structure of data transfer in blockchain<\/i><\/p>\n\n<h3 class=\"h3-mod\">4.3 Authorization<\/h3>\n\n<p>After signing the data with his or her private key, user-1 uses <strong>Elliptic Curve Cryptography<\/strong> to encrypt the data again before sending it to user-2, and user-1 does this by using asymmetric encryption. Here user-1 encrypts the data using user-2\u2019s public key, because of which the only legitimate user (user-2) has the authority to access the data. This encryption has to be done so that the transfer of authorization over the data is conducted properly, and except for user-2, no one else has the medium to access the data.<\/p>\n\n<p><img src=\"https:\/\/www.capitalnumbers.com\/blog\/wp-content\/uploads\/2023\/11\/authorization-mechanism.png\" alt=\"Authorization mechanism\"><\/p>\n\n<p><i>Authorization mechanism<\/i><\/p>\n\n<h3 class=\"h3-mod\">4.4 Private Key<\/h3>\n\n<p>A private key is simply a number picked at random. Bitcoin uses the underlying operating system\u2019s random number generator to produce 256 bits of the private key (tossing a coin 256 times with heads and tail given binary values, we have the binary digit of the private key, which is a random selection). Keeping the private key safe is very important, as losing the key would give away all the information protected by the private key. <strong>Private Key is generally used to generate signature<\/strong>, which is used to authorize data transfer.<\/p>\n\n<h3 class=\"h3-mod\">4.5 Public Key<\/h3>\n\n<p>A public key is generated by a private key using elliptic curve multiplication. Which is irreversible in nature. Consider the private key to be k. In Bitcoin,  there is a constant point G which is called the generator point. G is a constant defined in secp256k1. Let\u2019s take variable K to be the public key which is obtained as K=k*G.<\/p>\n\n<p>We multiply k with G to produce another point on the graph; this referred point is called the public key. Bitcoin generally uses the public key to generate a Bitcoin address.<\/p>\n\n<h3 class=\"h3-mod\">4.6 Address Generation<\/h3>\n\n<p>The most common use of an address is to know the owner of the private and public keys, but it can also refer to something else, for example, a payment script. An address is generally derived from the public key with the help of <strong>a one-way hash function<\/strong>. A hash function is a mathematical function that is easy to do in one direction but practically impossible to reverse. Bitcoin uses SHA256 and RIPEMD160 to produce the address. At first public key is taken as input to SHA256 to produce a hash of 256 bits, and the output is given RIPEMD160 to produce 160 bits of public key.<\/p>\n\n<p><strong>Address=RIPEMD160(SHA256(K))<\/strong><\/p>\n\n<p><img src=\"https:\/\/www.capitalnumbers.com\/blog\/wp-content\/uploads\/2023\/11\/procedure-to-generate-Bitcoin-address-with-public-key.png\" alt=\"Procedure to generate Bitcoin address with public key\"><\/p>\n\n<p><i>Procedure to generate Bitcoin address with public key<\/i><\/p>\n\n<h3 class=\"h3-mod\">4.7 Encoding<\/h3>\n\n<p>The private and public key values shown to the user are generally not the actual keys. Actually, what you see are keys but are in encoded format. Encoding is done to represent long values in compact form. Every encoding format has its own set of characters that replace the actual values like <strong>hex, Base64<\/strong>, etc. Base64 is an encoding method represented by the values 26 lowercase letters, 26 capital letters,10 numerals, and 2 more characters such as \u2018+\u2019 and \u2018-\u2018. Bitcoin uses Base58check encoding which has its own error-checking code. Base58 is a subset of Base64, removing all characters which look alike (0,O,l,I).<\/p>\n\n<p>To convert any data into <strong>Base58check<\/strong> format, we first have to add a prefix to the data; this particular data is version byte, usually signifying the type of data. For example, 0(0x00 in hex) will be the prefix for Bitcoin address and 128(0x80) for private keys.<\/p>\n\n<p>The next step is to obtain the checksum. To generate the checksum, we apply SHA256 twice on prefix+data. The obtained value will be a 32-byte hash; from this 32-byte value, we only take 4 byte of value from the start and add it as a suffix of data. This 4-byte value that we add as a suffix is known as the checksum. After joining version <strong>byte + data + checksum<\/strong>, the characters obtained are later encoded in Base58 format.<\/p>\n\n<p><img src=\"https:\/\/www.capitalnumbers.com\/blog\/wp-content\/uploads\/2023\/11\/data-encoding-in-base58check.png\" alt=\"Data encoding in Base58check\"><\/p>\n\n<p><i>Data encoding in Base58check<\/i><\/p>\n\n<h2 class=\"h2-mod-before-ul\">5. Limitations of Blockchain<\/h2>\n\n<p>Every technology has some issues, whether it is regarding security, space consumption, or complexity of algorithms, and blockchain is no different. Below are a few of the issues blockchain has to go through,<\/p>\n\n<h3 class=\"h3-mod\">5.1 Throughput Challenges<\/h3>\n\n<p>One of the major weaknesses of blockchain is its low throughput. The distributed ledger system can only <strong>move information from one point to another at a maximum speed pre-defined<\/strong>. For example, Bitcoin has the speed and power of processing seven transactions per second. However, data transferred within the network is not necessarily sent at that speed. As we have seen with Bitcoin in early 2016, it used to take 45 minutes to do a particular transaction.<\/p>\n\n<h3 class=\"h3-mod\">5.2 Blockchain uses an excessive amount of energy<\/h3>\n\n<p>Miners or mining companies, who are competing for the creation of the next block in the blockchain, use a significant amount of <strong>computational power<\/strong>, and to obtain that power high amount of electricity is being used. In a world where electricity is a climate issue, the processing mechanism of blockchain makes less sense.<\/p>\n\n<h3 class=\"h3-mod\">5.3 The anonymous characters of blockchains don\u2019t always act like an asset<\/h3>\n\n<p>Considering a system with various users, the fact that a legitimate user can be the most dangerous attacker can never be denied in this situation. Considering Bitcoin, every user is authorized to see everything happening in the network. Therefore, <strong>the system lacks anonymity<\/strong>; instead, they added pseudo randomity, which is insufficient. For example, a company wants to have a deal with one of its users and decides to pay via Bitcoin. The company transfers funds to the recipient&#8217;s address. Now the possibility is that the recipient knows about the company&#8217;s account balance. This issue may seem small, but personal information may not be important for individuals, but for business, it\u2019s a different thing.<\/p>\n\n\n<h3 class=\"h3-mod\">5.4 Inefficiency regarding offline usage<\/h3>\n\n<p>This is also a problem that was seen in Bitcoin. Bitcoin users have to <strong>store their blockchain data in their wallets<\/strong>; generally, this data exceeds 100 GB of data. To use the wallet offline, downloading the blockchain data is important, and this whole process of downloading and verification sometimes takes a couple of days.<\/p>\n\n<h3 class=\"h3-mod\">5.5 Security issues faced by blockchain<\/h3>\n\n<h4 class=\"sub-heading-h4\">5.5.1 The majority attack or 51% attack<\/h4>\n\n<p>This attack is not a cyber attack but rather a situation that can arise further, leading to <strong>malicious transactions<\/strong> being circulated to users. Bitcoin, for example, is dependable on miners for confirming transactions. They use a consensus algorithm to prove the work for adding their blocks to the blockchain. If an organization takes control over most of the network (generally considered when more than 50% of the network is under the influence), it could use a particular transaction more than once, which means the organization can spend n times the amount with the same transactions.<\/p>\n\n<h2 class=\"h2-mod-before-ul\">6. Blockchain  Implementation in Full-Scale<\/h2>\n\n\n<p>Distributed ledger architectures are scalable; any changes ever made to the blockchain will result in scaling up. A couple of changes are more like this, and we obtain an added block in the network. Every blockchain ever considered is scaling up daily, and no major issues are showing up. But what about the time when blockchain will be implemented on full scale?<\/p>\n\n<p>According to the Financial Stability Oversight Council (FCOS), the world is approaching an unknown territory regarding space consumption (expansion by a single gigabyte). It is a major concern as no company is well-versed with every possible problem that may occur shortly. Due to this lack of experience, we must upgrade ourselves with the current tech trends and move accordingly.<\/p>\n\n<h2 class=\"h2-mod-before-ul\">Bottom Line<\/h2>\n\n<p>In the dynamic landscape of digital security, blockchain technology is introducing robust and decentralized methods for authentication, authorization, and accounting. It leverages blockchain&#8217;s transparency and immutability to improve <strong>digital identity security and streamline authorization<\/strong>, leading to more reliable digital interactions. Also, blockchain integration in accounting offers unparalleled accuracy and transparency, revolutionizing traditional financial systems.<\/p>\n\n<p>Do you want to build a custom Blockchain app? Opt for <strong>Capital Numbers<\/strong>, an award-winning <a href=\"https:\/\/www.capitalnumbers.com\/\">software solutions company<\/a> offering end-to-end development services globally. Want to discuss your project? <a href=\"https:\/\/www.capitalnumbers.com\/contact-us.php\">Book a call today!<\/a><\/p>\n\n\n<div class=\"o-sample-author\">\n    <div class=\"sample-author-img-wrapper\">\n        <div class=\"sample-author-img\">\n            <img src=\"https:\/\/www.capitalnumbers.com\/blog\/wp-content\/uploads\/2023\/09\/Javed-Shaikh.jpg\" alt=\"Javed Shaikh\">\n        <\/div>\n        <a href=\"http:\/\/www.linkedin.com\/in\/javed-shaikh-2b395b9b\" target=\"_blank\" rel=\"nofollow noopener\" class=\"profile-linkedin-icon\"><img src=\"https:\/\/www.capitalnumbers.com\/blog\/wp-content\/uploads\/2023\/09\/317750_linkedin_icon.png\" alt=\"Linkedin\"><\/a>\n    <\/div>\n    <div class=\"sample-author-details\">\n        <h4>Javed Shaikh<span class=\"single-designation\"><i>, <\/i>Software Engineer<\/span><\/h4>\n        <p>A passionate Machine Learning Engineer, holds a doctoral degree in Communication and Computer Engineering. Excels in developing and deploying machine learning models; his expertise spans Python, scikit-learn, AWS, and NLP. He is dedicated to pushing the boundaries of AI technology and delivering impactful results across industries.<\/p>\n    <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Blockchain has gained immense popularity in the tech world nowadays. But is blockchain worth such hype? Before understanding blockchain and its functioning in detail (technically), let&#8217;s analyze a real-world banking system for a basic understanding of how blockchain profits various related identities. Assume there is a bank called &#8216;X&#8217; giving services to Wang, Nicolos and &#8230;<\/p>\n","protected":false},"author":22,"featured_media":10367,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false},"categories":[1637],"tags":[],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/posts\/10366"}],"collection":[{"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/comments?post=10366"}],"version-history":[{"count":15,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/posts\/10366\/revisions"}],"predecessor-version":[{"id":15425,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/posts\/10366\/revisions\/15425"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/media\/10367"}],"wp:attachment":[{"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/media?parent=10366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/categories?post=10366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/tags?post=10366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}