Skip to content

jonah-legg/JCryptL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JCryptL

This is a bare-bones mathematical encryption library for educational purposes only. It processes data and implements basic encryption protocols

WARNING: DO NOT USE IN PRODUCTION

This implementation is NOT secure and should NOT be used for actual encryption. It lacks:

  • Proper padding (vulnerable to padding oracle attacks)
  • Adequate key sizes (uses small keys that can be broken)

For real applications, use cryptographic libraries like OpenSSL, Libsodium, among others.

Usage Example

// Generate key pair
auto keys = crypto::rsa::generate_keypair();
    
// Original message
std::string message = "Test Message 123";
std::vector<uint8_t> data(message.begin(), message.end());
    
// Encrypt
auto encrypted = crypto::rsa::encrypt(data, keys.public_key);
    
// Decrypt
auto decrypted = crypto::rsa::decrypt(data, keys.private_key);

// Print decrypted message
std::cout << std::string(decrypted.begin(), decrypted.end());

Test Script

A test script is located in src/main.cpp

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages