Git Product home page Git Product logo

lamportc's Introduction

LamportC

LamportC is a C implementation of Lamport Signature

Special Thanks

B-Con and their sha256 implementation (If you're into cryptography and cryptographic algorithms definitely check the repo out. Amazing stuff)

Quick start

Using premake5

To build the project you'll need premake5 And any C compiler and build system that is supported by premake5. Then simply run premake5 and the build system of your choice, and build it from there. An example with Visual Studio 2022:

> premake5 vs2022

Compiling by hand

You can compile the project yourself using:

$ cc -o lamport -I BCon_sha256/include BCon_sha256/src/sha256.c Lamport/src/main.c Lamport/src/fileutils.c
$ ./lamport
[INFO] Signed message "Hello, I completely agree with this statement: I like pancakes"!
[INFO] Did we sign "Hello, I completely agree with this statement: I like pancakes"?
[INFO] Signature was VALID
[INFO] Did we sign "Hello, I completely agree with this statement: I DON'T like pancakes"?
[INFO] Signature was INVALID

TODO:

  • Test on multiple platforms - (Currently I'm only testing windows. It should work fine on linux. I'm only worried about fileutils really)
  • Some useful examples
  • Separating Lamport out to its own library maybe?
  • Test on x86 - (I haven't tested it. Given its C it should work fine. Don't know for sure though) = Probably slow for uint64 - fix that

Purpose

This project was mostly made because of curioucity and the fact I wanted to just check out how this algorithmn worked. I highly recommend you try and implement this yourself or build on top of what is already here. Its fairly straightforward and pretty simple to use too! To give you some ideas for what it can be used for:

  • Simple login system (A random access token generated and a sign with the username of the user. Every time they try to login they must provide the access token)
  • Chat System (A simple verification for if a specific user sent that message or not)

Be creative and play around with it. If there's any Issues you can add them to this github page

However, I'm not going to be accepting any Pull requests (except those who just want to fix an important bug in the code), especially not those who try and add more dependencies to the project (OpenSSL or something similar for cryptographic and secure randomness for example - this is a toy project and isn't anything serious).

lamportc's People

Contributors

dcraftbg avatar

Stargazers

 avatar

Watchers

 avatar

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.