Git Product home page Git Product logo

aes-lib-cpp's Introduction

AES C++ Library

forthebadge

aes-lib-cpp is a complete AES/Rijndael C++ implementation
The library supports the industry standard of 128 bit key sizes and runs in CBC mode
Included also is the supporting research work that was written for this project
For the Javascript version of this library see aes-lib-js

Usage

Encrypting

You can use the following function to encrypt a plain-text message
You will need to input your plain-text bytes, the private-key, an IV and the key size (SMALL=128, MEDIUM=192, LARGE=256)
See notes below about the data type aliases used in aes-lib-cpp
The plain-text bytes in text are overwritten with the encrypted bytes

void AES::encryptMessage(std::vector<State*> &text, Key &privateKey, State &initialVector, KeyLength length)

Decrypting

Similarly, you can use the following funciton to decrypt an encrypted message
The cipher-text bytes in text are overwritten with decrypted plain-text bytes

void AES::decryptMessage(std::vector<State*> &text, Key &privateKey, State &initialVector, KeyLength length)

Data type aliases

There are several noteable data type aliases used in aes-lib-cpp

  • BYTE: std::bitset<8>
  • State: BYTE[4][4]
  • Key: BYTE[4][4]

Getting started

Prerequisites

  • Visual Studio 2013

Installation

  • Clone the aes-lib-cpp
git clone https://github.com/kyleruss/aes-lib-cpp.git
  • Open the VS solution AESImplementation.sln
  • Build the solution in Visual Studio

License

aes-lib-cpp is available under the MIT License
See LICENSE for more details

aes-lib-cpp's People

Contributors

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