<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Omoyemi Arigbanla on Medium]]></title>
        <description><![CDATA[Stories by Omoyemi Arigbanla on Medium]]></description>
        <link>https://medium.com/@yemmyharry?source=rss-a5ed75fec0f6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6L-a8UKvwcBcKdYIcStYbA.png</url>
            <title>Stories by Omoyemi Arigbanla on Medium</title>
            <link>https://medium.com/@yemmyharry?source=rss-a5ed75fec0f6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 05:11:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yemmyharry/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[BIP 32, 39, and 44: Hierarchical Deterministic Wallets and Mnemonic Phrases.]]></title>
            <link>https://yemmyharry.medium.com/bip-32-39-and-44-hierarchical-deterministic-wallets-and-mnemonic-phrases-e6938ed1a4de?source=rss-a5ed75fec0f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6938ed1a4de</guid>
            <category><![CDATA[golang-tutorial]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[bip39]]></category>
            <category><![CDATA[bip32]]></category>
            <category><![CDATA[bip44]]></category>
            <dc:creator><![CDATA[Omoyemi Arigbanla]]></dc:creator>
            <pubDate>Tue, 23 Apr 2024 22:21:01 GMT</pubDate>
            <atom:updated>2024-04-23T22:21:01.548Z</atom:updated>
            <content:encoded><![CDATA[<h4>Exploring the Significance of BIP 32, 39, and 44 in Wallet Security.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5W9WQ4VzjHCvHICm" /><figcaption>Photo by <a href="https://unsplash.com/@theshubhamdhage?utm_source=medium&amp;utm_medium=referral">Shubham Dhage</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>BIP 32, BIP 39, and BIP 44 are all Bitcoin Improvement Proposals (BIPs) that define standards for different aspects of Bitcoin wallets, particularly regarding hierarchical deterministic wallets (HD wallets) and mnemonic phrases. But what are hierarchical deterministic wallets and mnemonic phrases?<br>Hierarchical deterministic wallets (HD wallets) provide a convenient way to manage multiple addresses and private keys from a single master seed. HD wallets use a tree structure where parent keys can produce children keys infinitely, allowing for organized transactions by type or entity. They offer the advantage of creating public keys without accessing corresponding private keys, enhancing security.<br>Mnemonic phrases, also known as seed phrases or recovery phrases, are a way to represent the master private key in a hierarchical deterministic (HD) wallet. They consist of a sequence of words that can be used to restore the wallet and all its derived keys. Mnemonic phrases are typically 12, 18, or 24 words long and are generated using a standardized process defined in the BIP39 (Bitcoin Improvement Proposal 39) specification.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/0*PRVJqmTz4hOnurJY.png" /><figcaption>Figure 1: HD Wallet Structure (Source: river.com — Online)</figcaption></figure><h4>The Significance of BIP 32, 39, and 44.</h4><ol><li><strong>BIP 32</strong>:<br> — BIP 32 is a key derivation standard that allows for the creation of child keys from a parent key in a deterministic manner. This means that given the same input (the parent key), the same output (the child key) will always be produced. This is in contrast to non-deterministic methods, where the output can vary even with the same input.<br>The BIP 32 standard defines two types of child keys: hardened and non-hardened. Hardened child keys are generated in such a way that knowing a child key does not allow you to compute the parent key or any sibling keys. Non-hardened child keys do not have this property, meaning that if you know a non-hardened child key and the parent public key, you can compute all the sibling keys.<br>From the explanations above, we can see that BIP 32 allows for a single backup of the master key to recover all derived keys. This is because the child keys are derived in a deterministic manner from the parent key. So if you have the parent key and the derivation path (i.e., the “path” from the parent key to the child key in the tree), you can always re-derive the child key.<br>A major downside of BIP 32 is that if a non-hardened child key and the parent public key are both revealed, it is possible to compute the parent private key. This is why it is recommended to use hardened child keys for any situation where the parent public key might be revealed.</li></ol><p>2. <strong>BIP 39</strong>:<br> — BIP39, or Bitcoin Improvement Proposal 39, is a standard used for. creating mnemonic phrases in the context of hierarchical deterministic (HD) wallets. It defines a method for generating a sequence of words — typically consisting of 12 to 24 words chosen from a predefined word list — that can be used to back up and restore a wallet’s master private key and all its derived keys. These phrases serve as a human-readable representation of the master seed, making it easier for users to backup and restore their wallets. BIP39 ensures that different wallets can generate and interpret the same mnemonic phrases, enhancing compatibility and usability across various wallet implementations.</p><p>3. <strong>BIP 44</strong>:<br> — BIP 44 is a specific application of BIP 32. It defines a multi-account hierarchy for deterministic wallets, providing a standardized way to organize keys for different cryptocurrency accounts within the same wallet. BIP 44 introduces the concept of ‘account levels’ and ‘purpose levels’ to create a hierarchical structure for keys. Each account has its own subtree, allowing for better organization and separation of funds.<br>The main purpose of BIP44 is to provide a structured method for creating and organizing keys in a deterministic wallet. It extends the concepts introduced in BIP32 (Hierarchical Deterministic wallets) and BIP39 (mnemonic sentence as a backup recovery seed) by specifying a specific hierarchy for wallet structures. This hierarchy improves organization, utility, and compatibility.</p><p><strong>What is the relationship between these BIPs?</strong><br>- BIP 39 provides a standard way to generate mnemonic phrases, which can be used to derive the master seed specified in BIP 32.<br>- BIP 32 defines the structure and derivation paths for hierarchical deterministic wallets, which are used in conjunction with mnemonic phrases generated according to BIP 39.<br>- BIP 44 builds upon BIP 32 by providing a specific organizational structure for multi-account wallets, allowing users to manage different cryptocurrency accounts within the same wallet while maintaining a hierarchical deterministic structure.</p><h4><strong>Generating a Mnemonic Phrase</strong></h4><p>Let’s start by generating a mnemonic phrase in Go using the `github.com/tyler-smith/go-bip39` package:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7a07aae8fafb68b61f9aae13f01035f1/href">https://medium.com/media/7a07aae8fafb68b61f9aae13f01035f1/href</a></iframe><p>This code generates a 24-word mnemonic phrase using 256 bits of entropy, which provides a good balance between security and memorability.</p><h4>Deriving Keys from Mnemonic</h4><p>Once we have a mnemonic phrase, we can derive the master seed and subsequently generate child keys using the BIP 32 algorithm. Let’s see how to do this in Go using the same package used above:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6a2fc6e5c9a86f736b7dbb90865993da/href">https://medium.com/media/6a2fc6e5c9a86f736b7dbb90865993da/href</a></iframe><p>This code first generates a seed from the mnemonic key, then derives a master key from that seed using BIP 32. Finally, it derives two child keys from the master key.</p><p><strong>Conclusion<br></strong>HD Wallets and mnemonic phrases play a crucial role in Bitcoin Core, providing a secure and convenient way to manage keys. By following the BIP 32 standard and using libraries, developers can easily integrate HD wallet functionality into their applications using Go.</p><p><strong>References</strong><br>1. <a href="https://www.ledger.com/academy/crypto/what-are-hierarchical-deterministic-hd-wallets">https://www.ledger.com/academy/crypto/what-are-hierarchical-deterministic-hd-wallets</a><br>2. <a href="https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki">https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki</a><br>3. <a href="https://river.com/learn/images/articles/hd-wallet-structure.png">https://river.com/learn/images/articles/hd-wallet-structure.png</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6938ed1a4de" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hash Rate Vs Network Hash Rate]]></title>
            <link>https://blog.devgenius.io/hash-rate-vs-network-hash-rate-139fc9dec843?source=rss-a5ed75fec0f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/139fc9dec843</guid>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[golang-tutorial]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[hash-rate]]></category>
            <category><![CDATA[network-hacking]]></category>
            <dc:creator><![CDATA[Omoyemi Arigbanla]]></dc:creator>
            <pubDate>Wed, 03 Apr 2024 17:13:53 GMT</pubDate>
            <atom:updated>2024-04-08T16:59:04.761Z</atom:updated>
            <content:encoded><![CDATA[<h4>Understanding the difference between hash rate and network hash rate</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*smiIrzc9fjr1iFO1" /><figcaption>Photo by <a href="https://unsplash.com/@jjying?utm_source=medium&amp;utm_medium=referral">JJ Ying</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The terms “hash rate” and “network hash rate” are commonly used in the context of blockchain networks, particularly in cryptocurrencies like Bitcoin. Although they are connected, they have different meanings and serve different purposes. This article explores the difference between hash rate and network hash rate.</p><p><strong>Hash Rate<br></strong>Hash rate refers to the computational power or speed at which a mining device can perform cryptographic calculations. It measures the number of guesses or calculations a mining device can make per second to solve a complex mathematical problem, known as a hash function. The hash rate is often expressed in units like hashes per second (H/s), kilohashes per second (KH/s), megahashes per second (MH/s), gigahashes per second (GH/s), terahashes per second (TH/s), petahashes per second (PH/s), exahashes per second (EH/s), and so on.</p><p>The hash rate is a critical factor in the security and decentralization of a blockchain network, as it determines the difficulty of mining new blocks and the overall security of the network. Think of hash rate as the speed at which a computer can solve puzzles. The higher the hash rate, the more calculations it can perform, increasing the chances of finding the solution to the puzzle and earning rewards. Miners with higher hash rates have a greater probability of being the first to solve the puzzle and add a new block to the blockchain.</p><p><strong>Network Hash Rate<br></strong> Network hash rate, on the other hand, refers to the combined hash rate of all the mining devices or participants in the Bitcoin network. It quantifies the total computational power dedicated to securing and maintaining the network. Network hash rate is a measure of the overall strength and security of the network.</p><p>The network hash rate is influenced by the number of miners participating in the network and the individual hash rates of their mining devices. As more miners join, the difficulty of solving the mining problem automatically adjusts to maintain a target block time (e.g., 10 minutes for Bitcoin). Also, as more miners join the network or upgrade their equipment to increase their hash rates, the network hash rate increases. Conversely, if miners leave the network or reduce their hash rates, the network hash rate decreases.</p><p>Monitoring changes in the network hash rate can provide useful information about the Bitcoin network’s health and stability. Sudden increases or dips in network hash rate may indicate changes in mining activity, miner behavior, or even possible security issues.<br>The network hash rate is an important metric because it directly impacts the security and integrity of the blockchain network. A higher network hash rate makes it more difficult for malicious actors to manipulate the blockchain or launch attacks like a 51% attack, where an attacker gains control of the majority of the network’s hash rate.</p><h3>Calculating the network hash rate</h3><p>A direct calculation of the exact network hash rate of a cryptocurrency like Bitcoin isn’t possible. This is because individual miners typically keep their hashing power private. This helps maintain a fair playing field and prevents influencing mining difficulty adjustments. Also, due to the distributed and decentralized nature of the Bitcoin network there is no central point to gather data on every miner’s hash rate.</p><p>However, there are ways to estimate the network hash rate. For this article, we would be using <a href="http://github.com/btcsuite/btcd">btcd</a> and <a href="https://go.dev/">Go</a>.<br>First, we need to determine the average time it takes to mine a block on the Bitcoin network. This value is known as the block time. Bitcoin’s target block time is approximately 10 minutes.<br>Next, we use the expected rate of finding a block (144 a day), the actual rate of finding a block and the current difficulty.</p><p>The formula is given as:<br><em>estimatedHashRate = </em><a href="https://bitcoin.stackexchange.com/questions/90661/what-is-the-formula-for-inferring-hash-rate-from-difficulty-and-block-frequency#103709"><em>(difficulty * 2**32 / blockTime)</em></a></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d5711083bc5f3dcd883587469bb702af/href">https://medium.com/media/d5711083bc5f3dcd883587469bb702af/href</a></iframe><p><strong>Conclusion</strong><br>In summary, hash rate refers to the computational power or speed of an individual mining device, while network hash rate represents the combined computational power of all miners in a blockchain network. Hash rate is like the speed of an individual miner, while network hash rate reflects the overall strength and security of the network.</p><p><strong>References</strong></p><ul><li><a href="https://bitcoin.stackexchange.com/questions/11139/how-is-the-network-hash-rate-calculated">https://bitcoin.stackexchange.com/questions/11139/how-is-the-network-hash-rate-calculated</a></li><li><a href="https://blog.lopp.net/what-is-the-bitcoin-networks-real-hashrate/">https://blog.lopp.net/what-is-the-bitcoin-networks-real-hashrate/</a></li><li><a href="https://www.coindesk.com/tech/2021/02/05/what-does-hashrate-mean-and-why-does-it-matter/">https://www.coindesk.com/tech/2021/02/05/what-does-hashrate-mean-and-why-does-it-matter/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=139fc9dec843" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/hash-rate-vs-network-hash-rate-139fc9dec843">Hash Rate Vs Network Hash Rate</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multisignature Wallets 101]]></title>
            <link>https://blog.devgenius.io/multisignature-wallets-101-146172d28425?source=rss-a5ed75fec0f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/146172d28425</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[multisignature]]></category>
            <category><![CDATA[multisig-wallet]]></category>
            <dc:creator><![CDATA[Omoyemi Arigbanla]]></dc:creator>
            <pubDate>Fri, 01 Mar 2024 17:56:52 GMT</pubDate>
            <atom:updated>2024-03-01T17:56:52.465Z</atom:updated>
            <content:encoded><![CDATA[<h4>Exploring the development and use cases of multisignature (multisig) wallets for enhanced security and control over Bitcoin funds.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VeuXRVLwd35NouT8" /><figcaption>Photo by <a href="https://unsplash.com/@joelnbora?utm_source=medium&amp;utm_medium=referral">Joel Lee</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>A <strong>multisignature wallet</strong> (or “multisig” for short) is a type of cryptocurrency wallet that requires two or more private keys to sign and send a transaction. This means that multiple private keys from different sources are needed to create a signature for a transaction, providing an added layer of security. If one of the keys is compromised, the assets are still secure, making multi-sig wallets a more secure alternative for managing crypto funds.</p><h4><strong>How Multisignature Wallets Work</strong></h4><ol><li>Setup and Configuration: When a multisignature wallet is created, the wallet owner(s) decide on the number of signatures required to authorize transactions. The concept of “M-of-N” in multisig refers to the specific configuration of a multisignature wallet, where “M” represents the minimum number of signatures required to authorize a transaction out of “N” total possible signatories. In other words, “M-of-N” denotes the minimum number of private key signatures needed out of a total of “N” keys associated with the multisig wallet to validate and execute a transaction. For example, in a 2-of-3 multisig setup, there are three private keys associated with the wallet, and any two of these keys are required to sign a transaction. Similarly, in a 3-of-5 multisig configuration, five private keys are involved, and any three of these keys must provide their signatures to authorize a transaction.</li><li>Private Keys: Each participant in the wallet generates a private key. These keys are kept secret and are used to sign transactions.</li><li>Public Keys: Each private key has a corresponding public key. The public keys are shared with the wallet, but the private keys remain with the participants. A multisignature address is created by combining the public keys of all the participants involved. This address is a cryptographic <a href="https://medium.com/@yemmyharry/hash-functions-and-signatures-primitives-for-making-a-cryptocurrency-739ca23a0530">hash</a> of the combined public keys and is where funds can be sent.</li><li>Transaction Authorization: To make a transaction, the required number of participants must sign the transaction with their private keys. The wallet then verifies these signatures against the public keys stored in the wallet. If the required number of valid signatures is provided, the transaction is authorized and can be broadcast to the blockchain.</li><li>Security: The security of a multisignature wallet comes from the fact that even if one or more private keys are compromised, the attacker still needs the private keys of the other participants to authorize transactions. This makes it much more difficult for unauthorized individuals to access or transfer the funds.</li></ol><p><strong>Constructing a Redeem Script for a 2-of-3 multisignature (multisig) setup</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e9303dc95032565a4470dae989d214df/href">https://medium.com/media/e9303dc95032565a4470dae989d214df/href</a></iframe><p>Using Golang as my language of choice, I have constructed a 2-of-3 multisig redeem script. The breakdown is as follows:<br>redeemScript is initialized as a byte slice containing 0x52 (OP_2), indicating that 2 signatures are required, and 0x21 (OP_PUSHBYTES_33), which is a prefix indicating that the next 33 bytes are to be pushed onto the stack. Public keys pubkey1, pubkey2, and pubkey3 are appended to redeemScript. Each public key is followed by 0x21 (OP_PUSHBYTES_33), indicating that the next 33 bytes are to be pushed onto the stack. This is because Bitcoin public keys are typically 33 bytes long. Finally, 0x53 (OP_3) is appended to indicate that there are 3 public keys in total, and 0xae (OP_CHECKMULTISIG) is appended to indicate that the multisig script is complete and ready for execution. The resulting redeemScript will represent a 2-of-3 multisig script, requiring two out of the three specified public keys to sign off on a transaction.</p><h4><strong>Use Cases for Multisig</strong></h4><p>Multisignature (multisig) wallets offer a wide variety of use cases that enhance security and flexibility in managing cryptocurrency transactions. Some of these use cases include the following:<br>1. Multisig wallets provide an added layer of security by requiring multiple private keys to authorize transactions. This feature is particularly beneficial for securing personal funds in cold storage and protecting business accounts where multiple stakeholders, such as the CEO, CFO, and board members, can provide signatures for a transfer.<br>2. The use of multisig wallets enables two-factor authentication, enhancing the security of cryptocurrency transactions. By requiring multiple signatures, these wallets provide an additional layer of protection against unauthorized access and fraudulent activities.<br>3. Multisig adds an extra layer of security to escrow transactions by requiring multiple parties to authorize fund release. This reduces the risk of fraud, theft, or misuse of funds, as all parties must agree before funds can be transferred.</p><h4><strong>Conclusion</strong></h4><p>The use cases of multisig are widespread as they are functional for both personal and corporate use. The enhanced security of multisig makes it particularly useful and interesting especially when the multisig setup is carefully planned.</p><h4><strong>References</strong></h4><ol><li><a href="https://github.com/chaincodelabs/bitcoin-tx-tutorial/blob/main/appendix/addresses.ipynb">https://github.com/chaincodelabs/bitcoin-tx-tutorial/blob/main/appendix/addresses.ipynb</a></li><li><a href="https://vault12.com/securemycrypto/crypto-security-basics/what-is-multisig/">https://vault12.com/securemycrypto/crypto-security-basics/what-is-multisig/</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=146172d28425" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/multisignature-wallets-101-146172d28425">Multisignature Wallets 101</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bitcoin Mining Basics: A Comprehensive Guide for Beginners]]></title>
            <link>https://yemmyharry.medium.com/bitcoin-mining-basics-a-comprehensive-guide-for-beginners-fd3eb669cc85?source=rss-a5ed75fec0f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd3eb669cc85</guid>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[bitcoin-mining]]></category>
            <category><![CDATA[block-header]]></category>
            <dc:creator><![CDATA[Omoyemi Arigbanla]]></dc:creator>
            <pubDate>Thu, 22 Feb 2024 12:43:48 GMT</pubDate>
            <atom:updated>2024-02-22T12:43:48.569Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TPcaOzo6_lpmVYN1" /><figcaption>Photo by <a href="https://unsplash.com/@michael_f?utm_source=medium&amp;utm_medium=referral">Michael Förtsch</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Mining is the process of adding new blocks of transactions onto the blockchain. It involves the validation of transactions, the addition of new blocks to the blockchain, and the creation of new units of the cryptocurrency. This new unit of bitcoin is an incentive given to the miners for taking part in the expensive task of mining and it is known as a <strong>coinbase transaction</strong>. Miners compete to solve a complex mathematical puzzle, and the first miner to find the solution gets to add a new block of transactions to the blockchain.<br>The coinbase transaction is a key mechanism for distributing new coins and rewarding miners. It is always the first transaction included in each block. This makes it easily identifiable and distinguishes it from regular user transactions.</p><p><strong>How Does Bitcoin Mining Work?</strong></p><p>When users send Bitcoin, they broadcast the transaction to the network. These transactions are stored in a temporary storage for transactions received by a node called the mempool. Miners collect unconfirmed transactions from the mempool and assemble them into a temporary block known as a candidate block. if the mining process is successful, this candidate block will be included in the blockchain and sent to every other node.<br>The candidate block contains a block header which is like the metadata of the block. The block header is made up of the following:</p><ul><li><strong>Previous Block Hash:</strong> The previous block hash links the current block to the previous one in the chain. This 32-byte field creates a chain of blocks, linking them together in chronological order. The previous block hash is crucial for maintaining the integrity and continuity of the blockchain.</li><li><strong>Merkle Root:</strong> The Merkle<strong> </strong>root is a 32-byte hash summary representing all transactions within the block. It links all the transactions in the block together via the Merkle root, ensuring the integrity and immutability of the transaction data.</li><li><strong>Timestamp:</strong> The time field in the block header denotes the Unix time at which the block header is being hashed. This timestamp is used during the mining process and is essential for verifying the authenticity and chronological order of the blocks.</li><li><strong>Nonce:</strong> The nonce field serves as a counter used for the proof-of-work algorithm. The nonce is the value that miners can alter to create different permutations and generate a correct hash in the sequence.</li><li><strong>Version:</strong> Identifies the version of the blockchain protocol used by the block. It is a 4-byte integer that allows for protocol upgrade support and readiness signaling. This field enables the implementation of new features and improvements to the Bitcoin protocol over time.</li><li><strong>Bits: </strong>A shortened version of the Target. It informs miners about the level of difficulty required for a valid hash. Miners use this encoded target difficulty to determine what the network will accept as valid, guiding their mining efforts.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OciZsEVsCthrou_-q36tAA.png" /><figcaption>Figure 1: Structure of a block (Source: Acervolima.com — Online)</figcaption></figure><p>This block header is then hashed using the SHA-256 hashing algorithm with the hope that the corresponding value is below the current <strong>target. </strong>The target is a 256-bit number (extremely large) that all Bitcoin clients share. The target adjusts every 2016 block (roughly two weeks) to try and ensure that blocks are mined once every 10 minutes on average. <br>The SHA-256 hash of a block’s header must be lower than or equal to the current target for the block to be accepted by the network. The lower the target, the more difficult it is to generate a block. On average, blocks were designed to be mined once every 10 minutes. If blocks during the two weeks were being mined faster than every 10 minutes, the target would adjust<em> </em>downwards to make it more<em> </em>difficult to get below the target for the next period of blocks.<br>If the hash isn&#39;t below the target, the nonce value is adjusted till it is. Once this is achieved, the block is broadcast to other miners in the network. These miners verify the block and its transactions by re-calculating the hash and ensuring it matches the claimed value. <br>If the block is valid, it is added to the blockchain, and the transactions within it are considered confirmed. The miner who successfully mined that block is entitled to <strong>a block reward</strong> and can claim this reward from the coinbase transaction when the block becomes 100 blocks deep in the longest chain. The reason for this is to prevent a miner from spending a block reward from a block that may later be regarded as being a stale block after a fork in the blockchain.<br>A block reward is the combination of newly generated coins and transaction fees which is a crucial incentive for miners to continue solving complex mathematical problems and validating transactions. Bitcoin has a planned limit of 21 million coins which is expected to happen around the year 2140. At this stage, miners will no longer get new coins for mining but will solely be rewarded with fees for processing transactions. These fees will ensure that miners still have the incentive to mine and keep the network going.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/0*ypoBF2qRLkjYh8Ei.png" /><figcaption>Figure 2: Image showing a block with the coinbase transaction and corresponding transactions with their respective transaction fees ( Source: Anatomy and Lifecycle of a Bitcoin Transaction, page 733)</figcaption></figure><p>In conclusion, mining is a continual process that helps introduce new bitcoins into the network while ensuring the security, integrity, and decentralization of the Bitcoin network and incentivizing miners with rewards for their efforts.</p><p><strong>References</strong></p><ul><li><a href="https://de.acervolima.com/was-ist-eine-coinbase-transaktion/">https://de.acervolima.com/was-ist-eine-coinbase-transaktion/</a></li><li>Antonopoulos, Andreas M. Mastering Bitcoin: Unlocking Digital Crypto-Currencies. OReilly, 2016.</li><li><a href="https://www.researchgate.net/publication/344961053_Anatomy_and_Lifecycle_of_a_Bitcoin_Transaction">https://www.researchgate.net/publication/344961053_Anatomy_and_Lifecycle_of_a_Bitcoin_Transaction</a></li><li><a href="https://learnmeabitcoin.com/technical/block-header">https://learnmeabitcoin.com/technical/block-header</a></li><li><a href="https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515">https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd3eb669cc85" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hash functions and Signatures: Primitives for making a cryptocurrency.]]></title>
            <link>https://yemmyharry.medium.com/hash-functions-and-signatures-primitives-for-making-a-cryptocurrency-739ca23a0530?source=rss-a5ed75fec0f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/739ca23a0530</guid>
            <category><![CDATA[hashing]]></category>
            <category><![CDATA[digital-signatures]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Omoyemi Arigbanla]]></dc:creator>
            <pubDate>Thu, 08 Feb 2024 05:28:29 GMT</pubDate>
            <atom:updated>2024-02-08T05:28:29.582Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Rux8DPQxevOswPN8" /><figcaption>Photo by <a href="https://unsplash.com/@artrachen?utm_source=medium&amp;utm_medium=referral">Art Rachen</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Various considerations interweave into the creation of a cryptocurrency. some foundational primitives that center around cryptography are hash functions and digital signatures which are essential for securing transactions and protecting user privacy. this is going to be the main focus of this article.</p><p><strong>What is a Hash function?</strong></p><p>Hash functions are mathematical functions that transform a given data set into a bit string of fixed size, known also as the “hash value.”<br>Some features of a hash function are:</p><ul><li><strong>Deterministic — </strong>Given a dataset of the same<strong> </strong>input should equal the same output. This property is crucial for consistency and reliability.</li><li><strong>Efficient</strong> — Any size input equals the same output. No matter the size of the data, the output stays the same size. Computational efficiency is necessary to save time and storage space.</li><li><strong>Unidirectional(Preimage resistance) </strong>— A hash function is a one-way function and as such you cannot use the output to find out the input.</li></ul><pre>given y, you can’t find any x such<br>that hash(x) == y</pre><ul><li><strong>Collision Resistance </strong>— It should be very unlikely for two unique inputs to produce the same hash value. Collisions do happen but a good hash function must fully minimize the risk of it ever happening.</li><li><strong>Unique</strong> — Each hash is practically unique to the data it’s generated from. This is based on the “Avalanche effect” which implies that when you change 1 bit of the input, about half the output bits should change.</li></ul><p><strong>What are Digital Signatures?<br></strong>Digital signatures are one of the most basic foundational cryptographic tools used to provide key security features like legitimacy, unforgeability, and undeniability.<br>A digital signature is a cryptographic mechanism that verifies the authenticity and integrity of digital data. It is very similar to a digital version of a handwritten signature or a stamp used to show ownership and legitimacy.</p><p>Digital Signatures as regards cryptocurrency make use of three functions:</p><ol><li><strong>GenerateKeys(): </strong>The GenerateKeys() function is responsible for generating a pair of cryptographic keys: a private key(secretKey) which is kept secret by the signer and used to create digital signatures and a public key which is freely shared with others and used to verify digital signatures. As explained above it’s practically impossible to derive the private key from the public key due to the hash algorithm.</li></ol><pre>// GenerateKeys generates a pair of RSA keys.<br>func GenerateKeys() (*rsa.PrivateKey, *rsa.PublicKey, error) {<br> privateKey, err := rsa.GenerateKey(rand.Reader, 2048)<br> if err != nil {<br>  return nil, nil, err<br> }<br> return privateKey, &amp;privateKey.PublicKey, nil<br>}<br></pre><p>The above code snippet is written using the Go crypto/rsa package. This package will be used for other examples as well.</p><p><strong>2. Sign(secretKey, message):</strong> The Sign() function takes as input the private key (secretKey) and a message (message) that the sender wants to sign. The process involves two main steps:</p><ul><li>Hashing: As explained above, the message is typically hashed using a cryptographic hash function to produce a fixed-size hash value. This hashed output serves as a condensed and unique representation of the original message.</li><li>Encryption: The hash value is then encrypted with the sender’s private key, creating the digital signature. This encryption binds the signature to the specific message and private key.</li></ul><pre>// Sign creates a digital signature for a message using the private key.<br>func Sign(privateKey *rsa.PrivateKey, message []byte) ([]byte, error) {<br> hashed := sha256.Sum256(message)<br> signature, err := rsa.SignPKCS1v15(rand.Reader, privateKey, crypto.SHA256, hashed[:])<br> if err != nil {<br>  return nil, err<br> }<br> return signature, nil<br>}    </pre><p>3.<strong> Verify(publicKey, message, signature):</strong> The Verify() function is used by the recipient to validate the authenticity and integrity of the message. It takes as input the public key (publicKey), the original message (message), and the digital signature (signature). The verification process involves the following steps:</p><ul><li>Hashing: Similar to the signing process, the original message is hashed using the same cryptographic hash function.</li><li>Decryption: The digital signature is decrypted using the sender’s public key. This should yield the original hash value if the signature is valid.</li><li>Hash Comparison: The computed hash value from the decryption is compared with the hash value derived from the original message. If they match, the signature is considered valid (authenticity), indicating that the message has not been altered (integrity) and was indeed signed by the private key associated with the provided public key. The signer cannot deny having sent the message (non-repudiation).</li></ul><pre>// Verify checks the validity of a digital signature using the public key.<br>func Verify(publicKey *rsa.PublicKey, message, signature []byte) error {<br> hashed := sha256.Sum256(message)<br> err := rsa.VerifyPKCS1v15(publicKey, crypto.SHA256, hashed[:], signature)<br> if err != nil {<br>  return fmt.Errorf(&quot;signature verification failed: %v&quot;, err)<br> }<br> return nil<br>}</pre><p>In conclusion, hash functions and digital signatures have a symbiotic relationship as they work hand in hand. The relationship between hash functions and digital signatures can be understood in terms of the roles each plays in ensuring the integrity, authenticity, and non-repudiation of digital data. Digital signatures rely on hash functions as they cannot function without a reliable hash function. There are different hash functions in existence each with its level of strength, efficiency, and security. Any weakness in the hash function can compromise the security of the entire signature system.</p><p><strong>N.B:</strong> The code examples are based on the crypto/rsa package from the Go standard library and is meant to bring the concept closer to home. Things are very much different in a real-world scenario as well-established cryptographic packages are utilized. For instance, the examples utilize the SHA-256 algorithm for hashing, which is not a bad choice in itself. However, the choice of the hash function depends on the security requirements and the specific use case.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=739ca23a0530" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to store an image to a database with React using Base 64.]]></title>
            <link>https://yemmyharry.medium.com/how-to-store-an-image-to-a-database-with-react-using-base-64-9d53147f6c4f?source=rss-a5ed75fec0f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d53147f6c4f</guid>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[image]]></category>
            <category><![CDATA[expressjs]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Omoyemi Arigbanla]]></dc:creator>
            <pubDate>Wed, 12 May 2021 04:44:42 GMT</pubDate>
            <atom:updated>2021-05-15T00:47:38.366Z</atom:updated>
            <content:encoded><![CDATA[<h4>The easiest guide for encoding and decoding images using base64.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EJovOyEX1hSv7fJS5ckFNA.jpeg" /></figure><h3><strong>Introduction</strong></h3><p>It is common practice when adding an image to a frontend application to simply input the URL of the said image or create a local directory from where you’d add any image you’d utilize for your application. But what if you’re creating an application that requires users to upload their own photos. This requires a different approach to solving this challenge.<br>Many available tutorials focus on using multer or cloudinary on the server-side to store images to the database but this article will teach you how to achieve the same goal using base64.</p><p><strong>What is Base64?</strong></p><p><em>Base64 also known as Base64 Content-Transfer-Encoding is an encoding and decoding technique used to convert binary data to an American Standard for Information Interchange (ASCII) text format, and vice versa. — </em><a href="https://www.techopedia.com/definition/27209/base64"><strong><em>Technopedia</em></strong></a></p><p>Any binary data (such as an image in this case) can be encoded by base64 and the encoded data is usually composed of 64 English characters which isn&#39;t human-readable. When an image is stored using base64 to a database such as MongoDB, the image is stored as a string in the database. This string can then be decoded back to its original form when needed.</p><p><strong>Creating your server</strong></p><p>Since our app has the frontend and backend separated, we’d start by creating our server. First of all, we’d create a directory called the server, using the command below.</p><pre>mkdir server<br>cd server</pre><p>Next, we’d initialize the project by using the command below. This command integrates <strong>package.json </strong>in your application. Package.json helps keep track of all our packages and dependencies.</p><pre>npm init -y</pre><p>Next, we’d install all the necessary dependencies. We’d install them on a single line using the code below;</p><pre>npm i express mongoose cors </pre><ul><li>Cors: This is a shorthand for “Cross-Origin Resource Sharing” used to secure a web server from being accessed by another website.</li><li>Express: This is a node.js framework that helps in facilitating the speedy creation of node-based applications.</li><li>Mongoose: This is an Object Data Modelling(ODM) library that makes access, communication, and utilization of MongoDB easier.</li></ul><p>In the server, we need to create another directory to house the model and schema.</p><pre>mkdir models<br>touch models/post.js</pre><p>Our schema will look like the following:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0eb786201fd7716ebf9cf427b3e0bd05/href">https://medium.com/media/0eb786201fd7716ebf9cf427b3e0bd05/href</a></iframe><p>You’d notice that I created just one object key in the schema, which is <strong>myFile</strong>. This key has a value of <strong>string </strong>that will hold the encoded data from the image. <br>Next, we’ll create a file in the server directory called “index.js’’ which will house the rest of our code.</p><pre>touch index.js</pre><p>Our index.js file will contain the following:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/afe3a48c51389e48eca12d81f00e562d/href">https://medium.com/media/afe3a48c51389e48eca12d81f00e562d/href</a></iframe><p>At this point, we are done with the server. So we’ll start our server by using the command below:</p><pre>node index.js</pre><p><strong>Creating Our React App</strong></p><p>It is now time to proceed to the client-side of our application. We’ll start by creating a react application and changing it to the application directory. After which we’ll create a new directory named “components” and then a jsx file named “ImageUploader”.</p><pre>npx create-react-app client<br>cd client<br>mkdir components<br>touch components/ImageUploader.jsx</pre><p>The only dependency we’ll require is <strong>axios</strong> which is a promise-based HTTP client used to make HTTP requests. It can be installed with the following command;</p><pre>npm i axios</pre><p>In the ImageUploader.jsx file, the following lines of code will then be added:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/57c919316dde696a11f8cd88f3fadd52/href">https://medium.com/media/57c919316dde696a11f8cd88f3fadd52/href</a></iframe><p>The code above pretty much looks like a beehive of functions and is broken down as follows:</p><ul><li>The createImage function uses axios to send data via the server to the database.</li><li>The createPost function asynchronously creates a new image or return an error depending on the parameters stated in the server.</li><li>The convertToBase64 function makes use of the JavaScript FileReader which has a readAsDataURL method that<strong> </strong>reads the binary data and encodes it as a base64 data URL. Just as the name implies, its job is to convert files to base64.</li><li>The handleFileUpload function targets the file to be uploaded and the file is asynchronously converted to base64 by the convertToBase64 function. The encoded data is then used to update the postImage state.</li><li>The handleSubmit function then submits the encoded data as a string to the database when the submit button is clicked.</li></ul><p>The client-side of our application can be started by using the <strong>npm start </strong>command in the terminal. Once both the client-side and server-side are running concurrently, you can upload any image and it will be saved in the database. For the sake of clarity, I uploaded an image and with MongoDB Compass, we can access the data as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z_glsErJIcN1j0WmgEaJbQ.png" /></figure><p>From the image above, you can see that the uploaded image is stored as a string. This string can then be decoded and utilized when necessary.</p><p><strong>Conclusion</strong></p><p>If you’ve made it to this point, congratulations. You’ve successfully learned how to store images in a database using base64. If you enjoyed this tutorial kindly give me a high five. For comments, contributions or questions simply <a href="https://twitter.com/@yemmyharry">follow me on Twitter.</a> Thanks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d53147f6c4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cyber-Security and Human Rights Violation in Nigeria.]]></title>
            <link>https://medium.com/learnfactory-nigeria/cyber-security-and-human-rights-violation-in-nigeria-360ae4e0e17f?source=rss-a5ed75fec0f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/360ae4e0e17f</guid>
            <category><![CDATA[corruption]]></category>
            <category><![CDATA[nigeria]]></category>
            <category><![CDATA[human-rights]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[police]]></category>
            <dc:creator><![CDATA[Omoyemi Arigbanla]]></dc:creator>
            <pubDate>Fri, 01 Nov 2019 13:56:15 GMT</pubDate>
            <atom:updated>2019-11-01T14:02:31.834Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AUarI9AX0gtYgBgzmIzw_A.jpeg" /><figcaption>Photo by Nahel Abdul</figcaption></figure><p>According to Wikipedia, Cyber Security is the protection of computer systems from the theft of or damage of their hardware and software, or electronic data, as well as from the disruption or misdirection of the services they provide.<br>According to Tech Target,“the goal of cyber security is to limit risk and protect IT assets from attackers with malicious intent.”<br>Since the Internet and its resources is utilized in almost every part of the globe, cybersecurity is needed to protect internet users from cyber-criminals. Cybercrime, also called computer crime,is the use of a computer as an instrument to further illegal ends such as committing fraud, child pornography, stealing identities and intellectual property, or violating privacy. <br>Nigeria as a nation is not excluded from the fight against cybersecurity as it has had its fair share of cybersecurity challenges which were not without consequences.<br>As a developing country, Nigeria is still struggling to improve her technology sector and convince her citizens on the essence of relying on technological innovations. Due to the incessant reports of scams ,hacks, phishing and other criminal affiliated issues reported by internet users, many especially the older generation have been thrown into a phobic state preferring rather the obsolete way of doing things — which required little or no use of the internet. This trend has created severe setback for tech related businesses that rely on the patronage of these apprehensive individuals for survival.<br>Cyber crime has not only crippled businesses in Nigeria but it has also dented the Nation’s image globally. A typical example is the case of email wire fraud linked to Mr Obinwanne Okeke popularly called ‘Invictus Obi’ some months ago. This particular incident raised the dust, as over 80 suspects were apprehended from information provided by Invictus and this affected Nigerians both home and abroad. Many indigenous companies, institutions and firms lost global trust in Nigerians and Nigerian owned businesses, jobs and contracts were lost as well due to national stereotyping which cost the Nigerian people. According to a report from Quartz Africa, “these costs range from increased scrutiny for visa processes, a lack of trust when attempting to do business internationally and being restricted from using international payment platforms.”</p><p>One would think that because of these challenges affecting both the economy and public image of the country, the security operatives within the country would take adequate measures to tackling internet fraud but the reverse is the case as human rights violation became the order of the day.<br>Ignorant and unprofessional officials harbored the perception that anyone with an internet tool (specifically a laptop ) is a suspect. This placed developers, IT personnels and other professions that rely on the internet to make a living as suspects whenever seen with laptops. There have been several reports of unlawful and unwarranted arrests and detention over the past months, consequently demoralizing individuals from active involvement in positive cyber ventures. Corruption has also played a major role as many of these operatives have oftentimes in the past accosted the citizens its meant to protect to extort money from them. The World Bank and the non-governmental group,“Transparency International” generally define corruption as, “the abuse of public office for private gain.” According to <a href="https://www.hrw.org/report/2010/08/17/everyones-game/corruption-and-human-rights-abuses-nigeria-police-force">Human Rights Watch</a>, “the police commonly round up random citizens in public places, including mass arrests at restaurants, markets, and bus stops. In some cases of blatant deception, plainclothes police officers simply masquerade as commuter minibus drivers, pick up unsuspecting passengers at bus stops, and take them at gunpoint to nearby police stations where they demand money in return for their release. The police often make little effort to veil their demand for bribes, brazenly doing so in open corridors and rarely bothering to question those in detention about any alleged crime. Those who fail to pay are often threatened and unlawfully detained, and at times sexually assaulted, tortured, or even killed in police custody. Many of these abuses are perpetrated as a means to further extort money from ordinary citizens or from fearful family members trying to secure the freedom of those detained”.<br>Due to the rise of cyber-crime events, the police have only gotten more brazen and corruption is now further justified under the guise of catching cyber-criminals. Any young Nigerian with an expensive gadget(an iPhone or a laptop), anyone who dresses nicely with an expensive wristwatch, anyone with dreads or tattoos is automatically dubbed a cyber-criminal and whisked away to the nearest police station. But who exactly is a cyber-criminal?</p><p><strong>Cyber-criminals</strong> are individuals or teams of people who use technology to commit malicious activities on digital systems or networks with the intention of stealing sensitive company information or personal data, and generating profit.<br>According to <a href="https://www.techopedia.com/definition/27435/cybercriminal">techopedia</a>, Cyber-criminals use computers in three broad ways:</p><ul><li>Select computer as their target: These criminals attack other people’s computers to perform malicious activities, such as spreading viruses, data theft, identity theft, etc.</li><li>Uses computer as their weapon: They use the computer to carry out “conventional crime”, such as spam, fraud, illegal gambling, etc.</li><li>Uses computer as their accessory: They use the computer to save stolen or illegal data.</li></ul><p>Cyber security is a huge problem all over the world. Developed countries have a properly structured methodology for the investigation, apprehension and arrest of suspected cyber criminals. In the United States, the FBI has a well structured department tasked with fighting cyber crime. The cyber squad in this department is specially trained to investigate computer intrusion, theft of intellectual property and personal information and online fraud. Agents are made to undergo basic cyber training, which is now required of every FBI special agent before they can even graduate from Quantico.<br>Computer crime task force combines the state-of-art technology, tools and resources to ascertain crime and scope. Finally, SWAT team of the agency does the apprehension of the criminal. Computer crime task force works with cyber squad to classify and place cyber criminals under these categories: coders, vendors, techies, hackers, fraudsters, hosters, cashers and leaders, thus presenting a clear picture and road map to the SWAT team for operation.<br>Coders- write malware, exploits, and other tools necessary to commit the crime. <br>Distributors or Vendors- trade and sell stolen data, and act as vouchers of the goods provided by the other specialties.<br>Techies- maintain the criminal infrastructure, including servers, bulletproof ISPs, and encryption.<br>Hackers- search for and exploit application, system, and network vulnerabilities to gain administrator or payroll access.<br>Fraudsters- create and deploy social engineering schemes, including phishing, spamming, and domain squatting.<br>Hosters- provide “safe” hosting of illicit content servers and sites, often through elaborate botnet and proxy networks.<br> Cashers- control drop accounts and provide those names and accounts to other criminals for a fee, and who also typically control full rings of our eighth category, money mules.<br>Tellers- help with transferring and laundering illicit proceeds through digital currency services and between different world currencies.<br>Leaders- are those that have no any technical skills at all. They’re the “people-people.” They choose the targets; choose the people they want to work each role; decide who does what, when, and where; and take care of personnel and payment issues.</p><p><a href="https://archives.fbi.gov/archives/news/speeches/the-cyber-threat-whos-doing-what-to-whom">Stephen R. Chabinsky</a>, Deputy Assistant Director, Cyber Division of the FBI during his speech dated 10th of March, 2010, gave a clear picture of how an operation was carried out;<br>“ Not long ago, there was an online carding forum named Darkmarket. It had members worldwide who were involved in buying and selling stolen financial information, such as credit card data, login credentials, and equipment to carry out financial crimes. Darkmarket doesn’t exist anymore. Why? Because the FBI infiltrated it and brought it down. Through a two-year undercover operation led by an individual known to most users only as “Master Splyntr,” we penetrated the highest levels of this group and identified and located its leading members, which led to over 60 arrests worldwide and the prevention of tens if not hundreds of millions of dollars in economic loss. To the shock of criminals worldwide, Master Splyntr — who was on the site nearly everyday, participating anywhere from one hour to 15 hours a day — was a very dedicated and talented FBI special agent, of which we are proud and fortunate to have many. Still, it’s a lot of work to take down a single forum, but it shows we can succeed if we have the right people in place and the resources to apply. In other words, having hired and trained special agents who can talk the talk, and given the resources to spend enough hours online for an extended period of time, we have found that almost any cyber criminal enterprise will begin to trust us, despite having never met us face-to-face. We also learned that the communication methods used by these criminals are, to them, a social outlet as well. Just as often as they are speaking about malware, crimes, and goods for sale, they are talking about their families, their girlfriends, their vacations, and their cars. After a time, members of these forums become friends.That is where the intrinsic trust stems from. When somebody first enters as a new member, they’re considered a potential cop; a month later, they’re less of a cop; six months later, they’re a friend; a year later, they are trusted implicitly — to the extent that when an outsider anonymously told a Darkmarket participant that Master Splyntr was actually the FBI (which, as you now know, was true) all Master Splyntr had to do was deny the accusation and he was believed because he was an insider, whereas the informer was an outsider.”</p><p>Looking at the above mode of operation conducted by the agency in conjunction with other law enforcement agencies, one can deduce that the cybercrime world is highly structured and arresting a cyber criminal is not a function of the look of the person/mode of dressing but an intricate, rigorous process which involves mining of information, criminal profiling and a host of other factors. The rule of law must be properly followed and even when a suspect has been arrested and confirmed to be the perpetrator of a crime, he/she still has rights which must never be violated.</p><h3>Developers. Not Cyber Criminals.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QVApDf63NzEKD0eidLXfNQ.jpeg" /><figcaption>Photo by Isaiah Rustad</figcaption></figure><p>It is no longer news in Nigeria that the police have abysmally harassed countless innocent persons who they claim to be internet fraudsters or ‘yahoo-boys’ as it’s known locally. Worst still, reports have it that several software developers happen to fall within this category of innocent persons. Other reports have also had it that some innocent persons have been maimed or even worse, killed by SARS without any frantic efforts or scrutiny to confirm if the suspected individual has actually committed any crime. The number of arrested supposed cyber-criminals in Nigeria is greater in comparison to the amount of actual cyber-criminals being arrested.</p><p>On September 28,2019, a Lagos-based software developer, ‘ Tony Astro’ revealed how SARS operatives(a division of the Nigerian police force) arrested him in Lagos and extorted him by forcing him to withdraw some of the money in his bank account. Sharing his ordeal on <a href="https://twitter.com/toniastro_/status/1178015798239084545">twitter</a>, he narrated how the officers tagged him a yahoo boy and threatened to shoot him if he didn’t comply with their demands. His ordeal gave birth to the #StopRobbingUs hashtag campaign on twitter and his outcry led to the arrest of the officers in question. He was also promised a full refund of the money extorted from him. Unfortunately, many Nigerian youths aren’t as fortunate as Tony.<br>Another software developer, <a href="https://techcabal.com/2019/10/04/exclusive-as-stoppingrobbingus-gains-ground-sars-strikes-again/">Idorenyin Obong</a> working with Paystack shared a similar ordeal about being abducted by the police while returning home from work in an Uber. After being flagged down by the officers, they started a search on him and found a Mac book and an Iphone Xs and then concluded as is their custom that he was a fraudster. Even after introducing himself as a software developer and presenting his ID, they gave him no listening ear. The officers threatened to shoot him if he doesn’t offer them a million naira. Out of fear for his life, he negotiated with them and bargained to offer a hundred thousand naira which he paid before being let go.</p><p>According to the United Nation’s, <strong>‘Human Rights Standards and Practice for the Police:</strong> <strong><em>Expanded Pocket Book on Human Rights for the Police’</em>,</strong> Law enforcement officials are obliged to know, and to apply international standards for human rights. Under the Ethical and Legal Conduct in the manual, it states that;</p><p><em>Law enforcement officials shall at all times respect and obey the law<br>Law enforcement officials shall at all times fulfill the duty imposed on them by law, by serving the community and by protecting all persons against illegal acts, consistent with the high degree of responsibility required by their profession<br>Law enforcement officials shall not commit any act of corruption. They shall rigorously oppose and combat all such acts<br>Law enforcement officials shall respect and protect human dignity and maintain and uphold the human rights of all persons<br>Law enforcement officials shall report violations of those laws, codes and sets of principles which protect and promote human rights<br>All police action shall respect the principles of legality, necessity, non-discrimination, proportionality and humanity.<br></em>Pertaining to police investigations, the manual states that:<br><em>In investigations, the interviewing of witnesses, victims and suspects, personal searches, searches of vehicles and premises, and the interception of correspondence and communications:<br>Everyone has the right to security of the person<br>Everyone has the right to a fair trial<br>Everyone is to be presumed innocent until proven guilty in a fair trial<br>No one shall be subjected to arbitrary interference with his or her privacy, family, home or correspondence<br>No one shall be subjected to unlawful attacks on his or her honour or reputation<br>No pressure, physical or mental, shall be exerted on suspects, witnesses or victims in attempting to obtain information<br>Torture and other inhuman or degrading treatment is absolutely prohibited<br></em> Furthermore concerning the arrest of an individual, the manual states that:<br><em>No one shall be subjected to arbitrary arrest or detention<br>No one shall be deprived of his or her liberty except on such grounds and in accordance with such procedures as are established by law<br>Anyone who is arrested shall be informed, at the time of the arrest, of the reasons for his or her arrest<br>Anyone who is arrested shall be promptly informed of any charges against him or her<br>Anyone who is arrested shall be brought promptly before a judicial authority<br>Anyone who is arrested has the right to appear before a judicial authority for the purpose of having the legality of his or her arrest or detention reviewed without delay, and shall be released if the detention is found to be unlawful<br>Anyone who is arrested has the right to trial within a reasonable time, or to release<br>Detention pending trial shall be the exception rather than the rule<br>All arrested or detained persons shall have access to a lawyer or other legal representative and adequate opportunity to communicate with that representative</em></p><p>In the stories portrayed above, we can see how the Nigerian police totally disregarded the fundamental human rights of her citizens. Not one of the laws stated above is being followed and that shows how much the system needs to be fixed and officials needs to be educated on proper policing. The use of firearms to threaten and coerce citizens into submission is against the law and the permissible circumstances for the use of firearms are stated in the handout as follows:<br><em>Firearms are to be used only in extreme circumstances<br>Firearms are to be used only in self-defence or defence of others against imminent threat of death or serious injury or <br>To prevent a particularly serious crime that involves a grave threat to life or <br>To arrest or prevent the escape of a person posing such a threat and who is resisting efforts to stop the threat and In every case, only when less extreme measures are insufficient<br>Intentionally, lethal use of force and firearms shall be permitted only when strictly unavoidable in order to protect human life.</em></p><p>If the Nigerian police were to follow strictly the human rights practices and citizens are treated politely, respectfully and professionally issues won’t arise on the scraping of certain divisions in the police force. For efficient and effective policing superior officers and supervisory bodies are encouraged to:</p><p><em>Provide training programmes on legal standards and effective scientific techniques for investigations<br>Establish strict supervisory procedures for the management of confidential information<br>Establish, in concert with relevant social agencies,victim-support mechanisms<br>Establish policies which limit reliance on confessions<br>Develop community policing strategies, enabling police to be closer to the community and therefore to information vital to the prevention and solving of crimes<br>Solicit technical cooperation, including, where necessary, from international technical policing programmes, on current techniques and technologies for police investigations.</em></p><p>To quote Bosun Tijani, founder of CcHUB, “#StopRobbingUs is a cry for help from young Nigerians, especially those in the tech industry, for the Nigerian police to stop a common practice where young people with laptops are unlawfully arrested and sometimes kidnapped by police and forced to withdraw funds from their bank accounts in order to regain their freedoms”.</p><p><strong>About The Authors</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*6eUNGxkJTvKhfnEKQFFEHQ.jpeg" /></figure><p><strong>Arigbanla John</strong> is a a tech enthusiast, philosopher, writer and software developer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*p7QCth379coAK_sTRA9BFg.jpeg" /></figure><p><strong>Nwafor Jude </strong>is a web developer and a writer. A lover of games, football and classical music.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*4rfxdhZ_-lER5CGqiOwKgQ.jpeg" /></figure><p><strong>Olajuwon Owoseni</strong> is a software developer and a content creator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*kZiSKedBTAS7Ecy5cNWQAw.jpeg" /></figure><p><strong>Ukonu Dennis</strong> is a developer, writer and an ethicist who’s on a mission to revive the Nigerian Agritech sector.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*7Rh6ZctZa9TlKRGMZDeTIw.jpeg" /></figure><p><strong>Emmanuel Linus</strong> is a Software Developer| OAP| writer|photographer and lover of classical music.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*4DM7X4gW3Qpf7eOkI9MJ6w.jpeg" /></figure><p><strong>Chukwunenye Moses </strong>is a software developer interning at LearnFactory. He is also a writer and table tennis player.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=360ae4e0e17f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/learnfactory-nigeria/cyber-security-and-human-rights-violation-in-nigeria-360ae4e0e17f">Cyber-Security and Human Rights Violation in Nigeria.</a> was originally published in <a href="https://medium.com/learnfactory-nigeria">LearnFactory Nigeria</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unemployment and the tech explosion in Nigeria.]]></title>
            <link>https://medium.com/learnfactory-nigeria/unemployment-and-the-tech-explosion-in-nigeria-477f9ab216cc?source=rss-a5ed75fec0f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/477f9ab216cc</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[nigeria]]></category>
            <category><![CDATA[startup-lessons]]></category>
            <category><![CDATA[unemployment]]></category>
            <category><![CDATA[africa]]></category>
            <dc:creator><![CDATA[Omoyemi Arigbanla]]></dc:creator>
            <pubDate>Wed, 16 Oct 2019 15:51:47 GMT</pubDate>
            <atom:updated>2019-11-01T10:12:06.128Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*3S7FFlMlYv9QJ6M_3XLaYw.jpeg" /><figcaption>Photo by Joshua Oluwagbemiga</figcaption></figure><p>Nigeria is Africa’s most populous nation and while its natural resources seem plentiful, poverty abounds in the land and her youths are grossly unemployed. According to <a href="https://tradingeconomics.com/nigeria/youth-unemployment-rate"><strong>tradingeconomics.com</strong></a><strong> </strong>, Youth Unemployment Rate in Nigeria averaged 23.63 percent from 2014 until 2018, reaching an all time high of 38 percent in the second quarter of 2018 and a record low of 11.70 percent in the fourth quarter of 2014. Among those employed, about 20% are underemployed and earn less than $80 monthly which is ridiculous for a graduate. It is in light of this that a lot of Nigerian youths both graduates and non-graduates have flooded the tech ecosystem seeing it as a way out of poverty whilst providing societal solutions at the same time.</p><p>Technology has the ability to connect individuals with governments, organizations, and businesses and this provides many positive benefits. Information Communications Technology (ICT) is not only one of the fastest growing industries — directly creating millions of jobs — but it is also an important enabler of innovation and development. Not only does it contribute to the country’s GDP, it also facilitates the emergence of new services and industries. The Nigerian Government has opened her eyes to the boundless opportunities technology can bring hence investment in technology has increased drastically. According to the Nigerian Communications Commission (NCC) in September 2017, Nigeria’s investment in ICT hit 70 Billion Naira.</p><p>According to the annual African Tech Startups Funding Report 2018 released by startup news and research portal “Disrupt Africa”, African tech startups smashed funding records in 2018 as 210 startups secured US$334.5 million worth of investment, with Nigeria emerging as the premier investment destination on the continent. Technological companies have gradually overtaken the oil and gas sector to become the largest public companies in the world, with startups cropping out every year and currently many non-technological industries are either dying at technology’s hands or becoming one of it. The impact of tech companies and startups cannot be over-emphasized — they deliver value to their customers and have a direct impact on the cities they make their homes. Infosys for instance has impacted Bangalore and Alibaba has changed Hangzhou. Same with Google transforming Mountain View and Microsoft transforming Redmond. When these startups grew, they directly impacted the growth of their cities as well. Employment opportunities for youth increased and new employment algorithms came into the picture. Demand for developers increased and experienced talent started moving to these cities for better career opportunities.</p><p>In the same vein, startups in Nigeria can help bridge the gap between Europe and Africa as it relates to technological innovations. With new services and industries springing up, the need for software developers who would build applications that would solve societal needs is necessary and Nigeria’s large supply of youths are equal to the task as the current tech ecosystem does not place a demand on having a Computer Science degree but in having the necessary skills needed to get the job done.</p><p>There are few Nigerian startups contributing to the economic growth of the country. Some of these startups have received funding from local and international venture capitalists and have attracted media attention. Some of them are on their way to becoming household names while some are lurking in the shadows whilst doing great works.</p><p>1.) <strong>Flutterwave</strong>:</p><p>Flutterwave is a Nigerian financial technology startup established in 2016 by a team of ex-bankers, entrepreneurs and engineers. The company was founded to provide seamless payment solutions to banks, merchants and their customers across Africa.</p><p>Flutterwave’s payments infrastructure connects Africa to the global economy. They have made it easier for Africans to build global businesses that can make and accept any form of payment, anywhere from across Africa and around the world.</p><p>Flutterwave has processed 100 Million transactions worth $2.5B and have 50 bank partners in Africa. They are one integrated platform that accept payments, make payments and manage business funds, helping businesses to connect globally.</p><p>The 2-year-old startup has raised over $20 million and its largest investors include Green Visor Capital and Greycroft Partners.</p><p>The startup has its headquarters in San Francisco with offices in Lagos, Nairobi, Accra and Johannesburg. In mid-2018, the payment solution startup expanded its operations into Uganda, making it their fourth African market.</p><p>2.) <strong>PayStack:</strong></p><p>Paystack is a Nigerian-based payment startup that allows businesses to accept funds via credit card, debit card, money transfer and mobile money on their websites or mobile apps. It was founded by Shola Akinlade and Ezra Olubi in 2015 to enable Nigerian merchants accept online payment.</p><p>Paystack helps businesses in Africa get paid by anyone, anywhere in the world and is trusted by over 27,000 plus businesses. Some of Paystack merchants are MTN, Domino’s Pizza, Axa Mansard, Ren Money and Taxify.</p><p>In 2018, Paystack secured $8 million in Series A funding from global payment giants; Stripe, Visa, and Tencent to expand their payment infrastructure and grow their engineering team.</p><p>Beyond payment, Paystack’s dashboard allows firms to monitor every aspect of their business performance closely. Paystack is one of the startups that are very focused on their mission.</p><p>3.) <strong>Publiseer:</strong></p><p>Publiseer is a digital publishing platform tailored to meet the growing needs of independent African authors and artists. The platform was created in 2017 by twin brothers Chidi Nwaogu and Chika Nwaogu to bring publishing, design and technology in one place.</p><p>Apart from free publishing, Publiseer helps authors and artistes convert their raw work into a beautiful and professional masterpiece. With Publiseer, you get a professional book/album cover and unique ISBN/UPC number assigned to their book/album.</p><p>The startup recently partnered with Google Play Books, to support Google’s digital book distribution service in fulfilling the publishing requests it receives in Africa. The startup expanded its operations from Nigeria to its neighbouring West African countries; South Africa, Egypt, Kenya and Ghana.</p><p>According to Ventures Africa, the platform recorded a profit of nearly $11,000 in the first quarter of 2018, having published and monetized the creative works of over 500 African creatives.</p><p>4.)<strong> LearnFactory:</strong></p><p>LearnFactory is a software development company that grooms software developers and outsource them to clients. The company was incorporated on January 12, 2015 and was founded by Ukaegbu Chibueze to preach the tech gospel in the South East. Chibueze is himself an expert at programming having worked in Lagos for seven years, Ghana for three years and a year in the UK as a senior IT personnel in reputable tech companies, including Zinox Technologies, Chibueze took with him to Aba, eleven years of experience and wealth. Driven by human capacity development, LearnFactory’s building block remains; making sure that no one is left behind in this technological era. To further facilitate the vision of training the Nigerian youth, they offer a free 6-month intensive Bootcamp programme that started on April 2018. The programme focuses on creating Fullstack Javascript developers — the package includes; Vanilla JavaScript, React, React Native, MongoDB, ExpressJs, GraphQL, AWS and so on. LearnFactory is the foremost start-up that have dedicated themselves to educating the younger generation on modern technologies and being partners with Google has facilitated this mission.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w5b6L2zAOtQ569S0SqBSGg.jpeg" /><figcaption>Learnfactory’s first React meetup</figcaption></figure><p>Despite the challenges faced by Nigeria and her people, the new technology revolution is a harbinger of hope to the Nigerian populace as it provides endless possibilities not only to the economy of the nation but to lift the citizens out of poverty through job creation and the easement of societal challenges via technology.</p><p><strong>About the Authors</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*6eUNGxkJTvKhfnEKQFFEHQ.jpeg" /></figure><p><strong>Arigbanla Yemi John</strong> is a tech enthusiast, a foodie, a philosopher, a writer and a software developer. @yemmyharry</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*ts6tYhJHE0Gl9fkDGYzYNQ.jpeg" /></figure><p><strong>Nzekwe Samuel</strong> is first a Human| Thinker | Futurist | UI/UX Designer | Product design analyst | Software developer | Master Salesman @samuel.nzekwe205</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*p7QCth379coAK_sTRA9BFg.jpeg" /></figure><p><strong>Nwafor Jude </strong>is a web developer and a writer. A lover of games, football and classical music. @thaddydore</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*4DM7X4gW3Qpf7eOkI9MJ6w.jpeg" /></figure><p><strong>Chukwunenye Moses </strong>is a software developer, interning at LearnFactory. He is also a writer and a table tennis player. @chunkums088</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*Zjwxt3vMYfbrlWLptJe2uw.jpeg" /></figure><p><strong>Kelechi Mbawuike </strong>is a software developer, a lover of good music and a developing writer. @kmbawuike</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*4rfxdhZ_-lER5CGqiOwKgQ.jpeg" /></figure><p><strong>Olajuwon Owoseni</strong> is a software developer and a content creator. @holajuwon</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=477f9ab216cc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/learnfactory-nigeria/unemployment-and-the-tech-explosion-in-nigeria-477f9ab216cc">Unemployment and the tech explosion in Nigeria.</a> was originally published in <a href="https://medium.com/learnfactory-nigeria">LearnFactory Nigeria</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My first intern group project at Learnfactory]]></title>
            <link>https://medium.com/learnfactory-nigeria/my-first-intern-group-project-at-learnfactory-3e4881fef5c4?source=rss-a5ed75fec0f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e4881fef5c4</guid>
            <category><![CDATA[internship-experience]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[pair-programming]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Omoyemi Arigbanla]]></dc:creator>
            <pubDate>Thu, 12 Sep 2019 12:02:18 GMT</pubDate>
            <atom:updated>2019-09-13T15:02:31.925Z</atom:updated>
            <content:encoded><![CDATA[<p>I started out at Learnfactory,Aba around August. It&#39;s a town synonymous with business having one of the largest markets in West Africa. My journey into coding had been for awhile but I had learnt from various resources like freecodecamp, Sololearn, W3schools, etc but my first internship was at the Learnfactory hub in Aba.<br>Learning at the hub has been an awesome experience. I&#39;ve always been familiar with Microsoft using Atom and Git on my Windows Operating system but at the hub I made a switch to Ubuntu OS and VSCode and I&#39;m elated to say I&#39;m loving it. <br>The hub has different facets- we had days where we taught one another, days where we learnt from our instructors, days where we did pair programming - as a lone ranger this was particularly difficult for me but as I&#39;ve learnt, you can&#39;t be a lone ranger in the world of computer programming. My willingness to learn new things has open me to a world of endless opportunities and thus I was placed as Team Lead for a group and told to come up with a project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*K02Bjs7Oxu_X52PMVrVHsg.jpeg" /><figcaption>Front page of the group project</figcaption></figure><p>I had a round table deliberation with my teammates and we came up with an idea to design a fashion website with sign-in and sign-ups functionality using only HTML, CSS and pure JavaScript for it&#39;s functionality.<br>We all collaborated on the project using Git and Github. Being a four man team, we started by using figma to design the UI of the project and then proceeded to writing the code of the design before finally adding the functionality of sign-in and register using localStorage.</p><h3>Challenges Encountered</h3><p>Although it sounds fun but for code newbies it was a little difficult. Not everyone had a flair for design so that was an obstacle, making sure we could create something with a nice interface. But being in a group the task was assigned to a team member proficient with design but as the team lead I took it upon myself to make sure each team member read the code to familiarise themselves with it. <br>Another challenge was with vanilla JavaScript. We made a slider for the homepage and the code wasn&#39;t easy to understand by my team members. So once again , we had a session to explain each line of code for the project. <br>The login and register function wasn&#39;t much of a big deal. We all studied localStorage to become acquainted with it.</p><p>Each team member could easily have done their assigned tasks and we would have gotten same awesome result but it’s my belief that as beginners it was imperative we understood the code written by every other team member. <br>The link to the team project can be found here: <a href="http://teambash.netlify.com/">teambash.netlify.com</a><br>Learnfactory is truly raising the next-gen of JavaScript developers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e4881fef5c4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/learnfactory-nigeria/my-first-intern-group-project-at-learnfactory-3e4881fef5c4">My first intern group project at Learnfactory</a> was originally published in <a href="https://medium.com/learnfactory-nigeria">LearnFactory Nigeria</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A quick guide to creating a React Component]]></title>
            <link>https://medium.com/learnfactory-nigeria/a-quick-guide-to-creating-a-react-component-64273b0d64af?source=rss-a5ed75fec0f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/64273b0d64af</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Omoyemi Arigbanla]]></dc:creator>
            <pubDate>Tue, 10 Sep 2019 16:11:55 GMT</pubDate>
            <atom:updated>2019-09-10T16:11:55.103Z</atom:updated>
            <content:encoded><![CDATA[<p>Components are the life-blood of react. They are like JavaScript functions -- they accept arbitrary inputs (called “props”) and return React elements describing what should appear on the screen.<br>There are two types of components ; functions and class components but in this article I&#39;d be focusing on class components. <br><strong>Creating a Class Component<br></strong>When creating a React component, the component&#39;s name must start with an upper case letter. This is because React treats components starting with lowercase letters as DOM tags.</p><p>In the code below, we will call our class component &quot;Todo&quot;. All of our code for the component will go between the curly braces ‘{}’.</p><pre>import React, {Component} from &#39;react&#39;; <br>class Todo extends React.Component { </pre><pre>render(){</pre><pre>return (</pre><pre>&lt;h1&gt; Welcome to my Todo App</pre><pre>&lt;/h1&gt;</pre><pre>)</pre><pre>}<br></pre><p>The same code written above can be written in another way using a method known as “<strong><em>destructuring</em></strong>.The <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment"><strong>destructuring assignment syntax</strong></a> was introduced to JavaScript in ES6, it is a simple way of extracting data stored in objects and arrays into variables. Using the destructuring method, we can re-write the code as:</p><pre>import React, { Component } from &#39;react&#39;;</pre><pre>class Todo extends Component { </pre><pre>render(){</pre><pre>return (</pre><pre>&lt;h1&gt; Welcome to my Todo App</pre><pre>&lt;/h1&gt;</pre><pre>)</pre><pre>}</pre><p>Now your React application has a component called Todo, which returns a &lt;h1&gt; element. To use this component in your application, use similar syntax as normal HTML: &lt;Todo /&gt;.<br>It should be noted that if this is a component in a file of it’s own, it will have to be exported. To achieve this,we can simply put a line after the class that exports it. The example of this is shown below:</p><pre>class Todo extends React.Component { *<em>your code goes here</em>* } <br>export default Todo;</pre><p>Since we have our component in a separate file, we will first need to import the component into the file where we want to use it. We can do it with this code:</p><pre>import Todo from ‘./Todo’;</pre><p><strong>Rendering a component</strong></p><p>React makes use of what&#39;s known as a Virtual DOM. Like actual DOM, the Virtual DOM is a node tree that lists elements and their attributes and content as objects and properties. React’s render() method creates a node tree from React components and updates this tree in response to mutations in the data model, caused by actions.</p><p>Let’s say there is a &lt;div&gt; somewhere in your HTML file:</p><pre>&lt;div id=&quot;root&quot;&gt;&lt;/div&gt;</pre><p>We call this a “root” DOM node because everything inside it will be managed by React DOM. Applications built with just React usually have a single root DOM node. <br>To render a React element into a root DOM node, pass both to ReactDOM.render(). <br>ReactDOM.render() takes in two parameters/arguments; what to render and where to render it. Code below:</p><pre>ReactDOM.render(&lt;Todo /&gt;, document.getElementById(&#39;root&#39;));</pre><p>Full code:</p><pre>import React from &#39;react&#39;;</pre><pre>import ReactDOM from &#39;react-dom&#39;;</pre><pre>import Todo from &#39;./Todo&#39;</pre><pre>ReactDOM.render(&lt;Todo /&gt;, document.getElementById(&#39;root&#39;));</pre><pre>import React, { Component } from &#39;react&#39;;</pre><pre>class Todo extends Component {</pre><pre>render(){</pre><pre>return (</pre><pre>&lt;h1&gt; Welcome to my Todo App</pre><pre>&lt;/h1&gt;</pre><pre>)}}</pre><pre>export default Todo</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64273b0d64af" width="1" height="1" alt=""><hr><p><a href="https://medium.com/learnfactory-nigeria/a-quick-guide-to-creating-a-react-component-64273b0d64af">A quick guide to creating a React Component</a> was originally published in <a href="https://medium.com/learnfactory-nigeria">LearnFactory Nigeria</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>