Skip to content

rriyaldhi/crypter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crypter

Crypter module provides a capability to encrypt a message using combination of AES-RSA hybrid encryption.

aes-rsa encryption schema

AES algorithm is implemented based on:

Improvement of Advanced Encryption Standard Algorithm with Shift Row and S.Box Modification Mapping In Mix Column

Dependencies

Botan - Crypto and TLS for Modern C++

https://botan.randombit.net/

Usage Example

AES
unsigned char data[] = "crypter";
int dataLength = strlen((const char *)data);

AESData *plain = new AESData(data, dataLength);

AutoSeeded_RNG rng;
AESKey *key = (AESKey *)Crypto::generateKey(&rng, Crypto::AES_KEY, 128);

AESData *cipher = (AESData *)Crypto::encrypt(Crypto::AES, plain, key);

AESData *decrypted = (AESData *)Crypto::decrypt(Crypto::AES, cipher, key);
RSA
RSAData *plain = new RSAData(BigInt("12345"));

AutoSeeded_RNG rng;
RSAKey *rsaKey = (RSAKey *)Crypto::generateKey(&rng, Crypto::RSA_KEY, 2048);

RSAData *cipher = (RSAData *) Crypto::encrypt(Crypto::RSA, plain, rsaKey);

RSAData *decrypted = (RSAData *) Crypto::decrypt(Crypto::RSA, cipher, rsaKey);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published