Giter Club home page Giter Club logo

emsi-blockchain's Introduction

Overview

This repo represents the implementation of a basic blockchain from scratch, and entirely in C, as part of the Holberton Training Program.

image

OS Linux distro Ubuntu Programming language C OpenSSL Crypto

Topics

  • What is a Blockchain?
  • 0x00. Blockchain - Crypto
  • 0x01. Blockchain - Data structures concepts
  • 0x02. Blockchain - Block mining

What is a Blockchain?

A blockchain is essentially a digital ledger of transactions that is duplicated and distributed across the entire network of computer systems on the blockchain, each block contains data and a reference to the previous one in the list. Visit this blog to learn more about it.

0x00. Blockchain - Crypto

Tasks

  • "0. SHA256" :Function that computes the hash of a sequence of bytes
  • "1. EC_KEY creation" : Function that creates a new EC key pair
  • "2. EC_KEY to public key": Function that extracts the public key from an EC_KEY opaque structure
  • "3. EC_KEY from public key": function that creates an EC_KEY structure given a public key
  • "4. EC_KEY - Save to file": function that saves an existing EC key pair on the disk.
  • "5. EC_KEY - Load from file": function that loads an EC key pair from the disk
  • "6. Signature": Implementing a function that signs a given set of bytes, using a given EC_KEY private key
  • "7. Signature verification": Implementing a function that verifies the signature of a given set of bytes, using a given EC_KEY public key
  • 8. Library: Creation of a Makefile that compiles all the previous functions and archives them into a static library for future use.
  • 0x01. Blockchain - Data structures concepts

    Tasks

  • "0. Create Blockchain":Write a function that creates a Blockchain structure, and initializes it
  • "1. Create Block":Write a function that creates a Block structure and initializes it.
  • "2. Delete Block": Write a function that deletes an existing Block
  • "3. Delete Blockchain": Write a function that deletes an existing Blockchain, along with all the Blocks it contains/li>
  • "4. Hash Block": Write a function that computes the hash of a Block
  • "5. Save Blockchain": Write a function that serializes a Blockchain into a file
  • "6. Load Blockchain": Write a function that deserializes a Blockchain from a file
  • "7. Block validity": Write a function that verifies that a Block is valid
  • 0x02. Blockchain - Block mining

    Tasks

  • "0. Proof of work": Write a function that checks whether a given hash matches a given difficulty
  • "1. Block is valid v0.2": check if a Block’s hash matches its difficulty
  • "2. Block mining": Write a function that mines a Block in order to insert it in the Blockchain
  • "3. Adjust difficulty": Write a function that computes the difficulty to assign to a potential next Block in the Blockchain.
  • Requirements

    References

    emsi-blockchain's People

    Contributors

    abir9hassini avatar

    Watchers

     avatar

    Forkers

    louizimoncef

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. 📊📈🎉

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google ❤️ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.