Skip to content

Rudrakshrawal/BlockChain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

47 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Blockchain Repository


BlockchainEasily


Welcome to the Blockchain Repository! This repository is dedicated to exploring the fundamental concepts and history of blockchain technology. IMG_2897

Overview

Blockchain is a decentralized and distributed ledger technology that enables secure and transparent record-keeping. It gained prominence as the underlying technology for cryptocurrencies, starting with Bitcoin. However, its applications extend beyond digital currencies, impacting various industries such as finance, supply chain, and healthcare.


image


History

Blockchain originated with the introduction of Bitcoin in 2009 by an unknown person or group using the pseudonym Satoshi Nakamoto. Since then, it has evolved, giving rise to numerous blockchain platforms and applications.

THE MAIN AIM:

  • Decentralization: Nakamoto aimed to create a system that operates without a central authority, such as a government or financial institution. Decentralization would prevent a single point of control or failure, making the system more robust and resistant to censorship.
  • Peer-to-Peer Transactions: The design focused on enabling direct transactions between users (peers) without the need for intermediaries like banks. This peer-to-peer nature aimed to reduce transaction costs and increase financial inclusion.
  • Limited supply: Nakamoto designed Bitcoin with a capped supply of 21 million coins to control inflation and mimic the scarcity of precious metals like gold. The limited supply aims to prevent devaluation over time.
  • Anonymity: While not explicitly emphasized in the whitepaper, the Bitcoin network provides a degree of user privacy and pseudonymity(the state of using a pseudonym or a false identity instead of one's real name). Users are identified by cryptographic addresses rather than personal information.
  • Proof of work: To secure the network and achieve consensus on the state of the ledger, Nakamoto introduced the concept of Proof of Work (PoW). PoW involves miners solving complex mathematical problems to add new blocks to the blockchain, making it computationally expensive and time-consuming to alter historical transactions.

Keywords ๐Ÿ”‘๐Ÿง 


  1. Blockchain: The decentralized and distributed ledger technology that securely records transactions across a network of computers.
  2. Cryptocurrency:Digital or virtual currency that uses cryptography for security and operates on decentralized networks, often based on blockchain.
  3. Bitcoin: The first and most well-known cryptocurrency, introduced by an unknown person or group using the pseudonym Satoshi Nakamoto.
  4. Decentralization: The distribution of control and decision-making across a network rather than relying on a single central authority.
  5. Consensus Mechanism: The process by which participants in a blockchain network agree on the validity of transactions and the state of the ledger. Examples include Proof of Work (PoW) and Proof of Stake (PoS).
  6. Mining: The process of validating transactions and adding new blocks to the blockchain through computational effort. Commonly associated with PoW.
  7. Node: A participant in the blockchain network that maintains a copy of the entire ledger and participates in transaction validation.
  8. Immutable: The quality of data on the blockchain being tamper-resistant and unchangeable once confirmed and added to the ledger.
  9. Wallet : A digital tool or application that allows users to store, manage, and transact with their cryptocurrencies.
  10. Hash Function: A cryptographic function that takes an input (or message) and produces a fixed-size string of characters, typically representing a digest. A hash function is a mathematical algorithm that transforms input data into a fixed-size string of characters, called a hash value. It is deterministic, produces a unique output for each input, and is widely used for data integrity, digital signatures, password storage, and in blockchain technology for linking blocks securely.
  11. Fork: A split or divergence in the blockchain, resulting in two separate chains with different transaction histories.
  12. DApp (Decentralized Application): An application that runs on a decentralized network (blockchain) rather than a centralized server.
  13. Permissionless Blockchain: A blockchain where anyone can participate, validate transactions, and contribute to the network.
  14. Token: A unit of value issued by a project on the blockchain, often representing ownership or access rights.
  15. Private Key / Public Key: In asymmetric cryptography, a pair of keys used for secure communication. The private key is kept secret, while the public key is shared.
  16. SSL(secure Socket Layer): a deprecated cryptographic protocol that ensures secure communication over a computer network, commonly used to secure internet transactions and data transfer. It establishes a secure connection by encrypting the data exchanged between a user's web browser and a web server
  17. RSA (Rivestโ€“Shamirโ€“Adleman): a widely used public-key cryptosystem for secure data transmission and digital signatures. Utilizing a pair of keys โ€“ a public key for encryption and a private key for decryption. Its security relies on the difficulty of factoring large numbers. RSA is commonly employed for secure communication, digital signatures, and securing internet connections through protocols like SSL/TLS.
  18. Elliptic curve: Elliptic Curve Cryptography (ECC) is a way to keep information safe when it travels over the internet. Instead of using long passwords, ECC uses special curves in mathematics to create a pair of keys โ€“ one public key everyone can see and one private key that's kept secret. Even though the public key is known, it's incredibly hard for someone to figure out the private key. ECC is like having a secret code that's tough to crack, making online transactions and communications secure and efficient.
  19. CipherText: cyphertext is the result of encryption performed on plaintext using an algorithm, called a cipher. Ciphertext is also known as encrypted or encoded information because it contains a form of the original plaintext that is unreadable by a human or computer without the proper cipher to decrypt it.
  20. Hash Function: A hash function is a mathematical function that takes an input (or "message") and produces a fixed-size string of characters or numbers, which is typically of a much smaller size than the input data. This output is called a hash value or hash code.
  21. Bitcoin halving: Bitcoin halving is an event programmed into the Bitcoin protocol that occurs approximately every four years, reducing the block reward received by miners by half. It plays a crucial role in controlling the supply of bitcoins and has significant implications for the economics and security of the Bitcoin network.
  22. Sharding: sharding is a powerful technique for improving scalability and performance in distributed systems by dividing data into smaller, more manageable parts and distributing them across multiple servers.
  23. Erratta: refers to errors or mistakes found in cryptographic algorithms, protocols, or implementations. These errors can have significant implications for security, potentially leading to vulnerabilities or weaknesses that could be exploited by attackers
  24. TPS(Transactions Per Second): TPS refers to the number of transactions that a blockchain network can handle in a given time frame, usually measured in seconds. It's an important metric for evaluating the scalability and efficiency of blockchain networks, as higher TPS indicates that the network can handle more transactions per unit of time, thus accommodating increased user demand and supporting broader adoption.
  25. ECC (Eliptic curve cryptography) : ECC(Just like RSA ,it uses public & private key) provides efficient and secure cryptographic operations based on the mathematical properties of elliptic curves, making it a valuable tool in modern cryptography.
  26. HTTP 1/2/3: major version of the Hypertext Transfer Protocol (HTTP). People as of the now(feb 2024) are preffering to shift to the second version whereas the third version is also gaining momentum, but will take time to be adapted.
  27. Digital signing authority: a digital signing authority plays a critical role in enabling secure digital communications by issuing trusted digital certificates and digital signatures, which help verify the authenticity and integrity of digital content and transactions.
  28. Session key: a session key is a temporary cryptographic key used to encrypt and decrypt data exchanged during a single communication session, providing confidentiality, integrity, and enhanced security for the communication. Made with the help of public key. 29. Interoperability: Interoperability is a characteristic of a product or system to work with other products or systems. It is a very very important term in the whole Computer Science.
  29. Self Soverign Identity(SSI):self-sovereign identity (SSI), is a concept within decentralized identity management that emphasizes the individual's complete control over their own digital identity. It is based on the principles of privacy, autonomy, and user-centricity.
  30. Digital Identities: Digital identities refer to the online representations of individuals, organizations, or things in digital form. These identities consist of information that uniquely identifies and distinguishes entities in the digital realm.
  31. Decentralised Identity: Decentralized identity refers to a concept where individuals have control over their own digital identities without relying on a central authority or intermediary. Decentralized identity solutions leverage blockchain technology to enable individuals to manage their identities directly, providing greater privacy, security, and control over personal data.
  32. SSO(single sign on): Single sign-on is an authentication scheme that allows a user to log in with a single ID to any of several related, yet independent, software systems.An example of Single Sign-On (SSO) is when you use your Google account to log in to various services like Gmail, Google Drive, and YouTube without having to enter your credentials separately for each service.
  33. ERC(Etherium request for comments): ERC stands for Ethereum Request for Comments and refers to proposals for technical standards and protocols within the Ethereum ecosystem, facilitating interoperability and compatibility among Ethereum-based applications
  34. ICO(Initial Coin Offering): An Initial Coin Offering (ICO) is a fundraising method used by cryptocurrency startups, where new tokens or coins are sold to investors in exchange for legal tender or other cryptocurrencies, typically to fund the development of a new project or platform.
  35. DEFI: DeFi, short for Decentralized Finance, refers to a collection of financial services and applications built on blockchain technology, typically Ethereum, that aim to provide traditional financial services such as lending, borrowing, trading, and asset management in a decentralized manner, without the need for traditional financial intermediaries like banks or brokerages.
  36. Farming: typically refers to a practice known as yield farming. Yield farming involves participants providing liquidity to decentralized finance protocols in exchange for rewards, often in the form of additional tokens or a percentage of transaction fees. This process helps to incentivize liquidity provision and bootstrap adoption of decentralized platforms, while also allowing participants to earn passive income on their cryptocurrency holdings.
  37. Identity: in the context of technology and digital systems refers to the unique characteristics or attributes that distinguish one individual from another in the digital realm.
  38. POW: It's a consensus mechanism used in blockchain networks, including Bitcoin and Ethereum, to validate and confirm transactions and secure the network.
  39. POS:"PoS" stands for "Proof of Stake." It's a consensus mechanism used in blockchain networks to validate and confirm transactions and secure the network.
  • Proof of Work (PoW): Miners compete to solve complex puzzles, requiring significant computational power and energy consumption. Security relies on the computational difficulty of puzzles.
  • Proof of Stake (PoS): Validators are chosen to create new blocks based on the amount of cryptocurrency they hold and are willing to stake. Energy-efficient as it doesn't require intense computations. Security relies on validators staking their own assets.
  1. CBDC(Central bank digital currency): Central Bank Digital Currency (CBDC) refers to a digital form of central bank-issued currency. Unlike cryptocurrencies such as Bitcoin or Ethereum, which are decentralized and operate on public blockchain networks, CBDCs are issued and regulated by central banks, making them a form of digital fiat currency.
    • Wholesale CBDCs are primarily designed for use by financial institutions and central banks for interbank settlements, large-value transactions, and other financial operations at the institutional level.
      • Wholesale CBDCs facilitate faster and more efficient settlement of transactions between financial institutions, reducing counterparty risk and improving liquidity management in the financial system.
    • Retail CBDCs are intended for use by individuals, households, and businesses for everyday transactions and payments, similar to physical cash or electronic payments.
      • Retail CBDCs enable peer-to-peer transactions, online payments, and other retail transactions directly between individuals and businesses. They can be used for everyday purchases, bill payments, remittances, and other financial activities.
  2. PKI(Public Key Infrastructure): PKI stands for "Public Key Infrastructure." It is a set of policies, procedures, hardware, software, and roles that establish, manage, distribute, use, store, and revoke digital certificates and public keys. It provides a framework for establishing trust in the digital world and enables secure and reliable interactions between parties over insecure networks like the internet.
  3. NFT(Non Fungible Token): It's a type of digital asset that represents ownership or proof of authenticity of a unique item or piece of content using blockchain technology. Unlike cryptocurrencies such as Bitcoin or Ethereum, which are fungible and can be exchanged on a one-to-one basis, NFTs are unique and cannot be exchanged on a like-for-like basis.
  4. EVM: Ethereum Virtual Machine, is the runtime environment for smart contracts in the Ethereum network. It is a decentralized, Turing-complete virtual machine that executes code written in Ethereum's native programming language, Solidity.
  5. Smart Contracts: A smart contract is a self-executing contract with the terms of the agreement directly written into code. It is deployed on a blockchain network, such as Ethereum, and automatically enforces the terms of the contract without the need for intermediaries.
  6. Escrow Account: A financial arrangement where a third party holds and regulates payment of funds or assets between two parties involved in a transaction. The funds or assets are held by the escrow agent until the specified conditions of the transaction are met.
  7. ENS(Etherium Name Service): It is a decentralized domain name system built on the Ethereum blockchain that allows users to register and manage human-readable domain names for their Ethereum addresses, smart contracts, and decentralized applications (DApps). [Just like DNS]
  8. RFC(Request for comments): RFC is a document published by the Internet Engineering Task Force (IETF) or other standards organizations that describes methods, behaviors, research, or innovations applicable to the internet and its related technologies.
  9. W3C: The World Wide Web Consortium (W3C) is an international community that develops open standards to ensure the long-term growth and interoperability of the World Wide Web. Founded by Tim Berners-Lee, the inventor of the Web, the W3C is made up of member organizations, including industry leaders, academia, and government entities, working together to create web standards and guidelines.
  10. ABI (Application Binary Interface): It is a set of rules and conventions that dictate how binary programs interact with each other and with the operating system. ABIs define low-level details such as the binary format of data structures, function calling conventions, register usage, memory layout, and system call invocation.

Types of Blockchain

  1. Enterprise Blockchain: Enterprise blockchains are private or permissioned networks designed for use within a specific organization or group of organizations. These blockchains are typically used for internal processes, supply chain management, or facilitating transactions between trusted parties. Examples of enterprise blockchain platforms include Hyperledger Fabric and R3 Corda.
  2. Private Blockchain: Private blockchains are similar to enterprise blockchains in that they are restricted to a specific group of participants. However, private blockchains may not necessarily be used for enterprise purposes and can be deployed for various applications. The key characteristic of private blockchains is that access to the network and participation in consensus mechanisms are controlled by a centralized entity or group of entities.
  3. Public Permissioned Blockchain: Public permissioned blockchains are open to anyone to join and participate as a node in the network, but access to certain functionalities or actions may be restricted based on permissions. These blockchains maintain a level of decentralization while still imposing controls on who can validate transactions or execute smart contracts. Examples of public permissioned blockchains include EOS and Tezos.

Image


Token economy๐Ÿ’ธ๐Ÿช™

  1. Digital Asset Creation: A digital asset is created or designated to be represented on a blockchain. This asset can represent various forms of value, such as a cryptocurrency, tokenized real-world asset, digital collectible, or utility token for accessing a specific service or platform.

  2. Smart Contract Development: A smart contract is a self-executing contract with the terms of the agreement directly written into code. Smart contracts are programmed to automatically execute and enforce the terms of the contract when predefined conditions are met. Developers write the code for the smart contract, defining its functionalities, rules, and logic.

  3. Deployment on Blockchain: The smart contract, along with the digital asset it represents or manages, is deployed onto a blockchain network. This blockchain can be a public blockchain like Ethereum or a private/permissioned blockchain tailored for specific use cases.

image

     After that, Blockchain works
  1. Interactions and Transactions: Once deployed, participants can interact with the smart contract and the digital asset it governs. Transactions involving the digital asset, such as transfers, trades, purchases, or other actions, are recorded on the blockchain and executed according to the rules encoded in the smart contract.

  2. Decentralized Management: The smart contract serves as the decentralized authority governing the digital asset and its transactions. It ensures that transactions are executed transparently, securely, and autonomously, without the need for intermediaries or centralized control.

  3. Tokenomics and Ecosystem Dynamics: The digital asset and its associated smart contract form part of the token economy, where they interact with other participants, assets, and smart contracts within the ecosystem. Tokenomics principles and mechanisms govern the issuance, distribution, circulation, and value proposition of the digital asset, shaping the dynamics of the ecosystem.


Types of Cryptocurrency trading Methods๐Ÿ› ๏ธ

  1. DEX (Decentralized Exchange):

    • A DEX is a type of cryptocurrency exchange that operates without a central authority or intermediary. Instead, trades occur directly between users' wallets using smart contracts or other decentralized protocols.
    • DEXs offer users greater control over their funds and typically have lower trading fees compared to centralized exchanges. Examples include Uniswap, SushiSwap, and PancakeSwap.
  2. CEX (Centralized Exchange):

    • A CEX is a traditional cryptocurrency exchange that is operated by a centralized company or organization. These exchanges act as intermediaries between buyers and sellers, holding users' funds and executing trades on their behalf.
    • CEXs are often more user-friendly and have higher liquidity compared to DEXs. However, users must trust the exchange to securely hold their funds. Examples include Binance, Coinbase, and Kraken.
  3. P2P (Peer-to-Peer):

    • P2P refers to a trading method where buyers and sellers interact directly with each other without the need for an intermediary. In the context of cryptocurrency trading, P2P exchanges facilitate trades between users, allowing them to buy and sell cryptocurrencies directly with each other.
    • P2P exchanges typically offer a wide range of payment options and may be used for fiat-to-crypto or crypto-to-crypto trading. Examples include LocalBitcoins, Paxful, and Bisq.
  4. Instant Exchange:

    • Instant exchanges allow users to quickly and seamlessly swap one cryptocurrency for another at the current market rate. These exchanges typically do not require users to create an account or deposit funds, and transactions are executed instantly.
    • Instant exchanges are often used for quick conversions between different cryptocurrencies or for obtaining specific tokens without the need for a full-fledged trading platform. Examples include Changelly, ShapeShift, and CoinSwitch.

Layers in blockchain ๐Ÿฅž

image

  • Layer 3: Application Layer: This layer encompasses the various applications, services, and use cases built on top of the blockchain network. It includes decentralized applications (DApps), smart contracts, and protocols that enable specific functionalities and interactions within the blockchain ecosystem.

  • Layer 2: Layer 2 in the context of blockchain technology typically refers to solutions that are built on top of the underlying blockchain protocol to improve scalability, reduce transaction costs, and enhance functionality.

    • Some common examples of Layer 2 solutions include:
      • Off-chain Scaling Solutions: These solutions involve conducting transactions off the main blockchain to reduce congestion and improve scalability.
      • dechains: Sidechains are separate blockchains that are interoperable with the main blockchain. They enable faster transaction processing and experimentation with new features and protocols while still benefiting from the security of the main chain.
      • State Channels: State channels allow participants to conduct numerous transactions off-chain while only settling the final state on the main blockchain. This approach significantly reduces transaction fees and latency.
  • Layer 1: Layer 1 in the context of blockchain technology refers to the foundational layer of a blockchain network. It encompasses the core protocol and consensus mechanism that define how the blockchain operates.

  • Layer 0: Layer 0 focuses on the physical aspects of blockchain operation, such as the hardware and infrastructure required for data transfer and mining activities. It provides the foundation upon which the higher layers of the blockchain network, including the consensus mechanism, protocol rules, and application layers, operate.


ZK (Zero knowledge)๐Ÿง โŒโœ…

No knowledge/awareness/

"Zero knowledge" is a concept in cryptography and computer science that refers to a scenario where one party (the prover) can prove to another party (the verifier) that a statement is true without revealing any additional information beyond the fact that the statement is true.

Zero knowledge proof/ rollup

A zero-knowledge proof (ZKP) is a cryptographic method that allows one party (the prover) to prove to another party (the verifier) that a statement is true without revealing any additional information beyond the validity of the statement itself. In other words, a zero-knowledge proof enables the prover to demonstrate knowledge of a fact or possession of a secret without disclosing the actual fact or secret.

Zk SNARK(Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge)

  • Zero-Knowledge: zk-SNARKs allow the prover to convince the verifier that a statement is true without revealing any additional information beyond the validity of the statement itself.
  • Succinctness: zk-SNARKs are succinct, meaning that the proofs generated are short and can be quickly verified by the verifier.
  • Non-Interactive: zk-SNARKs are non-interactive, meaning that the proof can be generated by the prover without requiring any interaction with the verifier.

ZKP with Strokes

Zero-Knowledge Proof (ZKP) with Strokes likely involves using the unique patterns or characteristics of how someone draws or interacts with a touchscreen, touchpad, or stylus as a means of authentication or verification. The system would authenticate a user based on their specific stroke patterns without needing to reveal the actual strokes themselves.This form of authentication can be part of a broader set of biometric authentication methods, which utilize unique physical or behavioral traits for identity verification.


DAO (Decntralised Autonomous Organization) ๐Ÿข

DAO stands for Decentralized Autonomous Organization. It refers to an organization represented by rules encoded as a computer program that is transparent, controlled by organization members, and not influenced by a central government. DAOs operate on blockchain technology, typically Ethereum, and execute smart contracts to automate decision-making processes.

image

  1. Decentralization: DAOs are decentralized entities that operate without a central authority. Instead, decision-making processes are governed by smart contracts and consensus mechanisms executed on a blockchain network.

  2. Autonomy: DAOs are autonomous in the sense that they operate according to predefined rules encoded in smart contracts. Once deployed on the blockchain, these rules are executed automatically without the need for human intervention.

  3. Transparency: DAOs are transparent organizations where all transactions and decisions are recorded on the blockchain and can be audited by anyone. This transparency helps build trust among participants and ensures accountability.

  4. Community Governance: Decision-making in DAOs is often based on a consensus mechanism where members of the organization can vote on proposals and changes to the organization's rules. This community governance model enables democratic participation and collective decision-making.

  5. Tokenized Ownership: Ownership and voting rights in DAOs are often represented by cryptographic tokens issued on the blockchain. Token holders can participate in governance processes and influence the direction of the organization based on the number of tokens they hold.

  6. Use Cases: DAOs have various use cases, including decentralized finance (DeFi), governance of decentralized protocols and platforms, crowdfunding, decentralized investment funds, and more. They enable the creation of new forms of organization and collaboration that are not bound by traditional legal and regulatory frameworks.

While DAOs offer many benefits, including increased transparency, efficiency, and autonomy, they also face challenges such as regulatory uncertainty, security vulnerabilities, and scalability issues. However, with ongoing innovation and development in blockchain technology, DAOs are expected to play an increasingly important role in shaping the future of decentralized governance and organization.


Optimistic Rollups

  • What is it ?
  • Optimistic rollups allow Ethereum to process more transactions off-chain, reducing congestion and fees, while still ensuring the security of the network by relying on the main chain as a final arbiter in case of disputes or fraud.
    • Scaling Solution: Ethereum, like many blockchain platforms, has a limitation on the number of transactions it can process per second. This limitation results in high fees during times of congestion and slow transaction processing times. Optimistic rollups aim to address this scalability issue.
    • Transaction Aggregation Off-Chain: Instead of processing each transaction individually on the Ethereum blockchain, optimistic rollups bundle multiple transactions together into a single batch. These batches are processed off-chain by a group of validators.
    • Validators: Validators are responsible for processing and validating the transactions within the rollup. They maintain a separate ledger, called a rollup chain, which keeps track of the transactions and their outcomes.
    • Publishing the Rollup: Once the transactions are processed off-chain, the validators create a cryptographic proof, known as a rollup, which summarizes the batch of transactions. This rollup is then submitted to the Ethereum blockchain.
    • Challenge Period: After the rollup is published, there is a challenge period during which anyone can verify the validity of the rollup. If someone detects fraudulent activity or incorrect transactions, they can challenge the rollup.
    • Resolution: If no valid challenges are raised during the challenge period, the rollup is considered valid, and the transactions within it are accepted as confirmed on the Ethereum blockchain. However, if a valid challenge is raised, the rollup is rejected, and the transactions are reverted to the state on the main chain.
Difference

image


Algorithms and Theorems: ๐Ÿงฎ

  • Advanced Encryption Standard (AES): AES is a symmetric encryption algorithm established as a standard by the U.S. National Institute of Standards and Technology (NIST) in 2001.

    • Key Sizes: AES supports key sizes of 128, 192, or 256 bits.
    • Block Size: Operates on 128-bit blocks of data.
    • Operation: Employs a substitution-permutation network structure with a variable number of rounds (10 rounds for 128-bit keys, 12 rounds for 192-bit keys, and 14 rounds for 256-bit keys).
    • Security Features: AES is widely used and considered secure against known cryptographic attacks when using appropriate key sizes.
      • AES key - The AES key is a binary sequence of bits that determines how the encryption and decryption processes are applied. The length of the key significantly influences the security of the encryption.
  • Shor's algorithm: โ‰๏ธ A groundbreaking algorithm that can efficiently factor large integers, a task that classical computers struggle with.

    • Purpose: Shor's algorithm is designed to efficiently factorize large integers into their prime factors.

    • Impact: If large-scale quantum computers are realized, Shor's algorithm would break widely used public-key cryptosystems, including RSA, by efficiently factorizing the product of large prime numbers.

    • IMG_2805

  • Cipher: A cipher algorithm is a set of rules or procedures used to encrypt or decrypt data. It's a systematic method for transforming plaintext (original message) into ciphertext (encoded message) and vice versa. Cipher algorithms are used to secure communication and protect sensitive information from unauthorized access.

    *image

  • Secure Hash Algorithm: A cryptographic hash function used to generate fixed-size hash values from input data. It ensures data integrity and authenticity by producing a unique hash value for each input. SHA variants like SHA-1, SHA-256, and SHA-512 differ in hash length and security levels. *SHA-1 (Secure Hash Algorithm 1):

    • Produces a 160-bit hash value (20 bytes).
    • Widely used in the past but is now considered vulnerable to collision attacks, where two different inputs produce the same hash value.
    • Due to its vulnerabilities, its usage is discouraged, especially in security-sensitive applications.
  • SHA-256 (Secure Hash Algorithm 256):
    • Produces a 256-bit hash value (32 bytes).
    • Provides a higher level of security compared to SHA-1.
    • Widely used in modern cryptographic applications, including digital signatures, SSL/TLS certificates, and integrity verification of data.
  • SHA-512 (Secure Hash Algorithm 512):
    • Produces a 512-bit hash value (64 bytes).
    • Offers even greater security compared to SHA-256 due to its longer hash length.
    • Less commonly used compared to SHA-256 due to its longer hash length, but it is preferred for applications that require stronger security guarantees.
  • Double rachet algorithm: โ‰๏ธ The Double Ratchet Algorithm is a cryptographic algorithm used for secure end-to-end messaging with forward secrecy and message synchronization. It is commonly used in secure messaging applications like Signal and WhatsApp.
Refer to symmetric encryption
  • https://nfil.dev/coding/encryption/python/double-ratchet-example/ (For Deeeeeeeppppp knowledge and implementation)
  • Key Ratcheting:
    • Each party generates a chain of symmetric encryption keys (root key, sending chain key, and receiving chain key).
    • After each message sent or received, the sending and receiving chain keys are updated, "ratcheting" the keys forward.
    • This ensures that even if one message's key is compromised, future messages remain secure.
  • Forward Secrecy:
    • Each message is encrypted with a unique key derived from the sending chain key.
    • If a sending chain key is compromised, only messages encrypted with that key are vulnerable.
    • Previous and subsequent messages remain secure because they use different keys.
  • Message Synchronization:
    • A header attached to each message includes information about the current state of the sending and receiving chains.
    • This allows parties to synchronize their keys and maintain message continuity, even if messages are sent out of order or delayed.
    • X3DH: X3DH, which stands for "Extended Triple Diffie-Hellman ," is a key agreement protocol used to establish secure communication channels in end-to-end encryption systems. This algorithm is an extended verios of Triple Diffie-Hellman key exchange algorithm
        • Public parameters. both parties agree on public parameters.
        • Private keys. each party generates its own private key.
        • public key. each party calculates its public key and shares it with the other user.
        • Both parties use the received public keys and their own private keys to compute the shared secret key.
        • The calculated shared secret K is the same for both parties, even though they never directly exchanged their private keys. This shared secret can then be used as a symmetric encryption key for secure communication.
  • CAP Theorem The CAP theorem implies that in a distributed system, when a network partition occurs (P), a trade-off must be made between consistency (C) and availability (A)

    • The CAP theorem, also known as Brewer's theorem, is a fundamental principle in distributed systems that states that it is impossible for a distributed data store to simultaneously provide more than two out of the following three guarantees:
      • Consistency (C): All nodes in the system have the same data at the same time, regardless of which node is accessed. In other words, if a write operation is successful, all subsequent read operations will return the updated value.
      • Availability (A): Every request made to a non-failing node in the system receives a response, either success or failure, without delay. In other words, the system remains operational and responsive, even in the presence of faults or network partitions.
      • Partition tolerance (P): The system continues to operate despite network partitions (communication failures) that may cause some messages to be lost or delayed. In other words, the system remains available and functional even if some nodes are unable to communicate with each other.

WEB 1,2 & 3 ๐Ÿ•ธ๏ธ๐Ÿ‘ฉโ€๐Ÿ’ป

image

Web 1

it was designed to help people better find information. This web version dealt was dedicated to users searching for data. This web version is sometimes called โ€œthe read-only Webโ€ because it lacks the necessary forms, visuals, controls, and interactivity we enjoy on todayโ€™s Internet.

Web 2

It offers free information sorting, allowing users to retrieve and classify data collectively. It contains dynamic content that responds to the userโ€™s input . It employs Developed Application Programming Interfaces (API) . It encourages self-usage and allows forms of interaction like: Podcasting Social media Tagging Blogging Commenting Curating with RSS Social networking Web content voting

Itโ€™s used by society at large and not limited to specific communities.

Web 3

Is built on a foundation consisting of the core ideas of decentralization, openness, and more excellent user utility. Web 3.0 ultimately lets users interact, exchange information, and securely conduct financial transactions without a centralized authority or coordinator. As a result, each user becomes a content owner instead of just a content user.


Establishing a secure connection between a client and a server in HTTPS. ๐Ÿ”๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿš๐Ÿข

  • Server Certificate Check:
    • The client (e.g., a web browser) initiates a connection request to the server (e.g., a website) and receives the server's digital certificate.
    • The client checks the server's certificate to ensure it is valid and trusted. This involves verifying that the certificate is issued by a trusted certificate authority (CA) and that it has not expired or been revoked.
    • If the server's certificate passes these checks, the client proceeds with the connection. Otherwise, it may terminate the connection or display a warning to the user.
  • Key Exchange:
    • After verifying the server's certificate, the client and server perform a key exchange to establish a shared secret key for secure communication.
    • This key exchange is typically done using asymmetric cryptography, where the client and server exchange public keys and use them to derive a shared secret key without exposing it to potential eavesdroppers.
    • Common key exchange protocols include Diffie-Hellman (DH) and its variants, such as Elliptic Curve Diffie-Hellman (ECDH).
  • Encrypted Tunnel for Data Transmission:
    • With the shared secret key established, the client and server use symmetric-key cryptography to encrypt and decrypt data transmitted over the connection.
    • They negotiate encryption parameters, such as the encryption algorithm and key lengths, and then use the shared secret key to encrypt data using symmetric encryption algorithms like AES (Advanced Encryption Standard).
    • This creates an encrypted tunnel or channel through which data can securely traverse the network, protecting it from interception or tampering by unauthorized parties.

The process of establishing a secure connection involves verifying the server's certificate, performing a key exchange to establish a shared secret key, and using symmetric-key cryptography to encrypt data transmitted over the connection. This ensures confidentiality, integrity, and authenticity of the communication between the client and server.


ENCRYPTION ๐Ÿ”

  • Encryption: Encryption is a process that transforms information into an unreadable format using an algorithm and a key.Encryption is a process that converts readable data (plaintext) into an unreadable form (ciphertext) using an algorithm and a key. It ensures data confidentiality and security by making information inaccessible without the proper decryption key.
  • Types of encryption:
    • Symmetric encryption - {Is the one which even the Quantum computers can't break}
      • Symmetric encryption is a cryptographic technique where the same key is used for both encryption and decryption of data. Symmetric encryption is a cryptographic technique where a single secret key is used for both encryption and decryption. It is efficient, fast, and well-suited for encrypting large volumes of data, but the security relies on keeping the key secret from unauthorized parties.
      • common algorithms used : DES, AES

image

  • Asymmetric encryption -
    • Asymmetric encryption, also known as public-key cryptography, is a cryptographic technique that uses two different keys: a public key and a private key.
    • common algorithms used : RSA, ECC

image


The three Cryptographic algorithms . ๐Ÿ’ปโš›๏ธ๐Ÿงฎ

  • RSA (Rivest-Shamir-Adleman): RSA is a widely used asymmetric encryption algorithm for securing data transmission. It relies on the mathematical properties of large prime numbers to encrypt and decrypt messages. RSA is commonly used in secure communication protocols such as SSL/TLS for securing internet traffic.
  • AES (Advanced Encryption Standard): AES is a symmetric encryption algorithm used to secure sensitive data. It operates on fixed-size blocks of data and uses a symmetric key for both encryption and decryption. AES is widely adopted and considered highly secure for various applications, including data encryption in storage and communication protocols.
  • _SHA-256 _(Secure Hash Algorithm 256-bit): SHA-256 is a cryptographic hash function that generates a fixed-size output (256 bits) known as a hash value or digest. It is commonly used for data integrity verification and digital signatures. SHA-256 is used in various applications such as blockchain technology (Bitcoin, Ethereum), digital certificates, and password hashing.

The three phases of the encryption(s)

  • Ceiser/Cipher: his is one of the simplest and oldest encryption techniques. it involves shifting each letter in the plaintext by a fixed number of positions down or up the alphabet.
  • Classic: This term generally refers to traditional cryptographic techniques used before the advent of modern computer-based cryptography.
  • Post Quantum: This refers to cryptographic algorithms and protocols designed to be secure against attacks by quantum computers

Extras.. Or some things idk where to put๐Ÿ˜ƒ๐Ÿ‘..

What is wire shark?

  • Wireshark is a versatile and powerful tool for network administrators, security professionals, developers, and anyone else who needs to analyze and troubleshoot network communication. It helps users gain insight into network behavior, diagnose network problems, and ensure the security and efficiency of computer networks.

Uniswap?

  • Uniswap is a decentralized cryptocurrency exchange (DEX) protocol built on the Ethereum blockchain. It allows users to swap various ERC-20 tokens directly with each other without the need for an intermediary or order book. Uniswap utilizes liquidity pools and automated market-making algorithms to facilitate trading, where users can provide liquidity by depositing tokens into these pools and earn fees in return. It's known for its simple user interface and permissionless nature, enabling anyone with an Ethereum wallet to participate in decentralized trading.

Hyperledger

  • Yo kya? Hyperledger is an open-source collaborative effort created to advance cross-industry blockchain technologies. Hosted by the Linux Foundation, Hyperledger aims to develop blockchain frameworks and tools that support business transactions and data sharing across various industries.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published