All Projects → SergeyBel → AES

SergeyBel / AES

Licence: MIT license
C++ AES implementation

Programming Languages

C++
36643 projects - #6 most used programming language
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to AES

Siv Mode
RFC 5297 SIV mode of operation in Java
Stars: ✭ 22 (-93.97%)
Mutual labels:  aes, cipher
CppSecurity
C++ Security Library
Stars: ✭ 24 (-93.42%)
Mutual labels:  aes, cipher
Encrypt
🔒 A set of high-level APIs over PointyCastle for two-way cryptography.
Stars: ✭ 199 (-45.48%)
Mutual labels:  aes, cipher
WebCrypto.swift
A small collection of cryptographic functions based on the JavaScript WebCrypto API.
Stars: ✭ 16 (-95.62%)
Mutual labels:  aes, cipher
AES
AES for microcontrollers (Arduino & Raspberry pi)
Stars: ✭ 116 (-68.22%)
Mutual labels:  aes, cipher
jscrypto
Crypto library for Node/ES6/Typescript/Browser.
Stars: ✭ 20 (-94.52%)
Mutual labels:  aes, cipher
django-mirage-field
Django model field encrypt/decrypt your data, keep secret in database.
Stars: ✭ 86 (-76.44%)
Mutual labels:  aes, cipher
Forge
A native implementation of TLS in Javascript and tools to write crypto-based and network-heavy webapps
Stars: ✭ 4,204 (+1051.78%)
Mutual labels:  aes, cipher
Cryptoswift
CryptoSwift is a growing collection of standard and secure cryptographic algorithms implemented in Swift
Stars: ✭ 8,846 (+2323.56%)
Mutual labels:  aes, cipher
Qt Aes
Native Qt AES encryption class
Stars: ✭ 207 (-43.29%)
Mutual labels:  aes
aes-stream
A fast AES-PRF based secure random-number generator
Stars: ✭ 15 (-95.89%)
Mutual labels:  aes
Aescipher Ios
AES encryption working between Objective-C and Java.
Stars: ✭ 198 (-45.75%)
Mutual labels:  aes
crypto.js
base on crypto module
Stars: ✭ 13 (-96.44%)
Mutual labels:  aes
Encrypt Body Spring Boot Starter
(停止维护,替代品搜索:https://github.com/search?l=Java&q=encrypt&type=Repositories )SpringBoot控制器统一的响应体加密与请求体解密的注解处理方式,支持MD5/SHA/AES/DES/RSA
Stars: ✭ 198 (-45.75%)
Mutual labels:  aes
Fingerprint
Android library that simplifies the process of fingerprint authentications.
Stars: ✭ 68 (-81.37%)
Mutual labels:  cipher
Jncryptor
Java implementation of RNCryptor
Stars: ✭ 187 (-48.77%)
Mutual labels:  aes
Cry
Cross platform PoC ransomware written in Go
Stars: ✭ 179 (-50.96%)
Mutual labels:  aes
AES
Implementation of Rijndael cipher algorithm
Stars: ✭ 42 (-88.49%)
Mutual labels:  aes
mbedcrypto
a portable, small, easy to use and fast c++14 library for cryptography.
Stars: ✭ 38 (-89.59%)
Mutual labels:  cipher
Laravel Database Encryption
A package for automatically encrypting and decrypting Eloquent attributes in Laravel 5.5+, based on configuration settings.
Stars: ✭ 238 (-34.79%)
Mutual labels:  aes

AES

C++ AES(Advanced Encryption Standard) implementation

Build Status

Usage

This class is very simple to use:

...
unsigned char plain[] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }; //plaintext example
unsigned char key[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }; //key example
unsigned int plainLen = 16 * sizeof(unsigned char);  //bytes in plaintext

AES aes(AESKeyLength::AES_128);  ////128 - key length, can be 128, 192 or 256
c = aes.EncryptECB(plain, plainLen, key);
//now variable c contains plainLen bytes - ciphertext
...

Or for vectors:

...


vector<unsigned char> plain = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }; //plaintext example
vector<unsigned char> key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }; //key example

AES aes(AESKeyLength::AES_128);
c = aes.EncryptECB(plain, key);
//now vector c contains ciphertext
...

ECB, CBC, CFB modes are supported.

Padding

This library does not provide any padding because padding is not part of AES standard. Plaintext and ciphertext length in bytes must be divisible by 16. If length doesn't satisfy this condition exception will be thrown

Links

Development:

  1. git clone https://github.com/SergeyBel/AES.git
  2. docker-compose build
  3. docker-compose up -d
  4. use make commands

There are four executables in bin folder:

  • test - run tests
  • debug - version for debugging (main code will be taken from dev/main.cpp)
  • profile - version for profiling with gprof (main code will be taken from dev/main.cpp)
  • speedtest - performance speed test (main code will be taken from speedtest/main.cpp)
  • release - version with optimization (main code will be taken from dev/main.cpp)

Build commands:

  • make build_all - build all targets
  • make build_test - build test target
  • make build_debug - build debug target
  • make build_profile - build profile target
  • make build_speed_test - build speedtest target
  • make build_release - build release target
  • make style_fix - fix code style
  • make test - run tests
  • make debug - run debug version
  • make profile - run profile version
  • make speed_test - run performance speed test
  • make release - run release version
  • make clean - clean bin directory
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].