Git Product home page Git Product logo

cryptography-playground's Introduction

cryptography-playground

In this playground I'll try to add some resources related to Cryptography. Mostly written in Java, however other times it might be written in other languages like Typescript, Golang or Rust (if I have disposition for this :)).

Resources

Data Encryption Standard (DES)

This is an implementation of the Data Encryption Standard (DES). It isn't fully validated yet, since the Validation Test is still failing. Anyway, even after the Validation Test passes, this code isn't recommended for production use and this algorithm is not considered safe because its short key length isn't enough to prevent brute-force attacks.

The implementation of this algorithm was followed using the instructions from the book "Understanding Cryptography - by Christof Paarjan Pelzl"

This is still a Work in Progress!

The code for DES can be found under 'main/java/src/edu/boudoux/des'.

Message Digest (MD)

... The code for one of the MD algorithms (SHA-1) can be found under 'main/java/src/edu/boudoux/messageDigest'.

Schoolbook RSA

Basically a Schoolbook RSA is an implementation that follows the steps to encrypt/decrypt data, but suffers from some vulnerabilities. Without applying padding, the algorithm may fall short against some attacks, like the following: If public exponents (e) and Plain Texts are small, raising the Plain Text by e might not hit the modulo operation, which would allow an attacker to recover the Plain Text by applying the e-th root on the Ciphertext. Yet, even using padding, RSA may still suffer from Chosen-Ciphertext Attacks (CCA). There are two kinds of CCA attacks: CCA1 - passive chosen ciphertext attack; CCA2 - adaptative Chosen Ciphertext. For example, the PKCS#1v1.5 (Public Key Cryptography Standard) specifies a padding that may not withstand against CC2 attacks.

The resources related to this topic are under: 'main/java/src/edu/boudoux/rsa' Tests for the resources related to this topic are under: 'test/java/src/edu/boudoux/rsa'

One can play with RSA by running the class 'main/java/src/edu/boudoux/rsa/SchoolBookRsa.java'.

Probably bugs are around. Let me know by raising an issue!

Diffie-Hellman Key Exchange (DHKE)

This is one of the most used protocol for exchanging keys...

The sample code can be found under 'main/java/src/edu/boudoux/dhke'.

Elliptic Curve Cryptography (ECC + ECDSA)

... The sample code can be found under 'main/java/src/edu/boudoux/ecc'.

Elgamal

... The sample code can be found under 'main/java/src/edu/boudoux/elgamal'.

Digital Signature Algorithm (DSA)

... The sample code can be found under 'main/java/src/edu/boudoux/dsa'.

Proof of Work (Hashcash)

Hashcash is an algorithm created for preventing mail spam and Denial of Service. Today a variation of it is used in one of the most popular cryptocurrencies, Bitcoin, where it is used as the engine of the Proof of Work. The paper about Hashcash can be found at http://www.hashcash.org/papers/hashcash.pdf

The sample code can be found under 'main/java/src/edu/boudoux/proofOfWork'.

Merkle Tree

... The sample code can be found under 'main/java/src/edu/boudoux/merkleTree'.

Message Authentication Code (MAC)

... The sample code can be found under 'main/java/src/edu/boudoux/mac'.

Shamir Secret Sharing

Multiparty Computation (MPC)

Lattice

Homomorphic Encryption

Oblivious Encryption

Pairing-based Encryption

Zero-knowledge Proofs (ZKP)

Advanced Encryption System (AES)

cryptography-playground's People

Contributors

israelboudoux 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.