Git Product home page Git Product logo

aes-gcm-example's Introduction

AES GCM Mode

Introduction

This module tries to explain AES GCM mode of encryption with an example. GCM mode is an AEAD mode of encryption and not commonly understood among engineers. This module tries to help folks understand it better by seeing it work. The code is written in python and is fairly well commented.

Theory

Authenticated encryption with associated data(AEAD) modes of encryption provide 2 security gurantees:

  • Confidenciality: The encrypted data will not leak any information about the secret plaintext data without the correct decryption key
  • Integrity: The secret plaintext data and associated data were not modified by an adversary after being encrypted with AES GCM

In simpler collocial English:

  • Only people who know the secret key can read the information that was encrypted
  • The information was not changed by anyone once it was encrypted

Difference from other modes of encryption

The more commonly known modes of encryption CBC, CTR modes don't provide the integrity gurantee that AEAD modes provide.

Running the script

Dependencies

It requires Python and Pycryptodomehttp://pycryptodome.readthedocs.io/en/latest/src/introduction.html
You can get Pycryptodome by running "pip install pycryptodome"
You should do it in a virtual enviorment if you already have pycrypto as it is a fork of pycrypto and they might interfeare with each other in unexpted ways

How to run

After you get the dependencies installed and download the file
From the terminal run - "python aes_gcm.py"
It will guide you through the whole encryption and decryption process

aes-gcm-example's People

Contributors

adarsh9616 avatar wolf43 avatar

Stargazers

 avatar errir avatar

Watchers

James Cloos 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.