Git Product home page Git Product logo

proyectontru's Introduction

NTRU for Post-Quantum tasks

1 minute tutorial

git clone https://github.com/ErlantzAyo/ProyectoNTRU
cd NTRU_HPS_4096821/ServerKEM/sources && make
../bin/Server/KEM
cd NTRU_HPS_4096821/ClienteKEM/sources && make
../bin/ClientKEM

Scenario

Client connects to Server and sends a value. This value is encrypted by using a post-quantum algorithm. Expected outcome: only the private key owner can read the value and this value is resistant against conventional and quantum attacks.

Projects

  • NTRU_HPS: the primary project. Use asymmetric+symmetric (stateless) data.
  • NTRU_HRSS: the secondary project. Use modified algorithm from KEM HRSS to send only asymmetric data.
  • QDEFENDER: a helper project to test different PQ algorithms other than NTRU.

Client flavours

  • for benchmarks. Run the benchmark executable containing CPU and NET benchmarks.
  • for production. Continuous mode. Use the __PRODUCTION__ macro or run the ClientKEM_Production. r

Note, when starting the application with -help flag, a description with available parameters is shown.

Detailed scenario

  1. Client connects to server
  2. Server sends the public key
  3. Client generates a secure key, a secure ciphertext, and encrypt the value (see later)
  4. Client sends the ciphertext+encripted value
  5. Server extracts the real value

Using KEM for encryption

KEM algorithms are designed for TLS (exchange a random secure key), so they are not well fit for encrypting arbitrary data. The normal procedure is to exchange a random key, so only the receiver can retrieve it from the encapsulated data. By using that key, the rest of data exchanged between client and server is encrypted by using symmetric algorithms.

To allow using KEM without session handling, we could encrypt the data in the following manner:

  1. Generate the key by using assymetric encryption
  2. Encrypt the value with that key by using symmetric encryption
  3. Only the receiver cand decipher the real value in two steps: Assymetric decryption(to get the key), then symmetric decryption (to get the value).

Format of data exchanged (the payload)

[ciphertext][nonce][encdata][auth_tag] in binary (non encoded), since the payload is flushed directly to the socket.

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.