Giter Site home page Giter Site logo

diffe_hellman_aes's Introduction

Diffie-Hellman algorithm for key exchange with AES encryption

Simple implemention of AES-128 with Diffie-Hellman algorythm for key exchange between client and server (socket)

## Getting Started The program require some initial paramaters which can be produced by Openssl

Prerequisites

Install Openssl from here

then install pycrypto:

pip install pycryptodome

How to run

  • step 0

    git clone https://github.com/saghal/Diffe_Hellman_AES.git
    
    • after cloning you can set new keys for client and server
  • step 1

    python server.py
    
  • step 2

    python client.py
    

How to generate keys

  • produce DH initial parameters with openssl

    with this command in Openssl, two public parameters for DH algorithm will produce and with next command we can see them.
    dhparam -out dhp.pem 128
    pkeyparam -in dhp.pem -text
    
  • how to genrate server/client public/private key

    then we can create private key for both sides and see the private keys
    genpkey -paramfile dhp.pem -out dhkey_client.pem
    genpkey -paramfile dhp.pem -out dhkey_server.pem
    pkey -in dhkey_client.pem -text -noout
    pkey -in dhkey_server.pem -text -noout
    
more information for generate this keys

helpful resources

diffe_hellman_aes's People

Contributors

saghal avatar mhe1999 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.