Skip to content

ahnshy/Cryptopp-Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📦 Crypto++ Demo

This repository demonstrates how to use the Crypto++ (Crypto++) v8.9(Oct 2, 2023 Released) library in simple C++ projects. It includes hashing, AES encryption/decryption.
✅ Tested on Windows 10 / Visual Studio 2019 / CMake 3.31.8

🧩 About Crypto++

This repository demonstrates how to use the Crypto++ (https://cryptopp.com/) library in simple C++ projects. It includes hashing, encryption/decryption, digital signatures, and more.

⚙️ Build Environment

🚀 Build Instructions

git clone https://github.com/ahnshy/Cryptopp-Demo.git
cd Cryptopp-Demo



📁 Repository Tree

/ `Root`			# Source files with examples
├── TestData/			# Crypto Test Data
├── TestPrograms/		# Crypto Test Programs
├── TestVectors/		# Crypto Test Vectors
├── ...
├── HashExample.cpp
├── SymmetricCipher.cpp
├── AsymmetricExample.cpp
│── DigitalSignature.cpp
└── README.md			# You are here



🔍 Notes

  • When using RSA/ECDSA examples, ensure secure key sizes (e.g. RSA‑2048 or ECDSA P‑256).
  • Make sure to use AutoSeededRandomPool for cryptographically secure randomness.
  • Don't handle sensitive data (keys, IVs) in hard-coded strings in production.

📤 Output

Compiled libraries (.lib, .dll, .exe) will be located in:<br/

 Win32/cryptest
 Win32/cryptlib
 Win32/Output



🔍 Usage Example code for SymmetricCipher

int CRYPTOPP_API main(int argc, char *argv[]) {
	UNREFERENCED_PARAMETER(argc);
	UNREFERENCED_PARAMETER(argv);

	CryptoPP::byte key[CryptoPP::AES::DEFAULT_KEYLENGTH], initVector[CryptoPP::AES::BLOCKSIZE];
	memset(key, 0x00, CryptoPP::AES::DEFAULT_KEYLENGTH);
	memset(initVector, 0x00, CryptoPP::AES::BLOCKSIZE);

	std::string plainText = "PlainText Test 가나다라 with Korean.";

	auto ciphertext = AESEncrypt(plainText, key, initVector);
	auto decryptedtext = AESDecrypt(plainText, key, initVector);
}



💻 [Preview]

image

🧪 Running Examples

File Description
HashExample.cpp SHA‑256, SHA‑1, MD5 hashing demonstrations
SymmetricCipher.cpp AES‑CBC and AES‑GCM encryption/decryption flows
AsymmetricExample.cpp RSA key generation, encryption, decryption
DigitalSignature.cpp Signing and verifying data with RSA/ECDSA
./HashExample
./SymmetricCipher
./AsymmetricExample
./DigitalSignature



📝 License

This demo project is distributed under the MIT License. Crypto++ itself is licensed under Crypto++ License (similar to BSD) — see LICENSE files for details.

About

Crypto++ v8.9(Oct 2, 2023 Released.) with AES Algorithms Encrypt and Decrypt Sample Source Code

Resources

License

Stars

Watchers

Forks

Packages

No packages published