All versions of the programs are available in the Releases section under the following tags:
- 🏷 v1 - Password Hashing & HMAC Authentication
- 🏷 v2 - Secure Key Derivation & AES Encryption
- 🏷 v3 - Azure Key Vault Integration & HSM Simulation
This project provides secure encryption, key wrapping, and Azure Key Vault integration using OpenSSL and cURL. It includes:
- PBKDF2-HMAC-SHA256 for password hashing
- AES-256-GCM encryption for secure message encryption
- Azure Key Vault integration for cloud-based key management
- HSM simulation for secure key handling
sudo apt update && sudo apt install -y openssl libssl-dev curl jq azure-cli
brew install openssl curl jq azure-cli # macOS (Homebrew)
- Download and install OpenSSL
- Download and install Azure CLI
- Install cURL & jq using Chocolatey:
choco install curl jq
- PBKDF2-HMAC-SHA256 derives keys from passwords
- AES-256-GCM provides authenticated encryption
- Random IV generation with OpenSSL
gcc PBKDF2_AES256.c -o PBKDF2_AES256 -lcrypto
./PBKDF2_AES256
- Encrypted DEK/KEK inside Database(HSM)
- Encrypts user-provided-message using AES-256-GCM with unencrypted DEK
- Authentication tag to ensure message integrity
- Random IV generation with OpenSSL
gcc HSM_AES256.c -o HSM_AES256 -lcrypto
./HSM_AES256
- Generates KEK & DEK inside a simulated HSM
- Encrypts & wraps the DEK using KEK
- Fetches KEK from Azure Key Vault
- Encrypts messages securely with AES-256-GCM
gcc HSM_AZURE_AES256.c -o HSM_AZURE_AES256 -lcrypto -lcurl
./HSM_AZURE_AES256
export AZURE_KEY_VAULT="https://yourvault.vault.azure.net"
export AZURE_KEY_NAME="KEK"
./HSM_AZURE_AES256
Enter message to encrypt: Secure Encryption Works!
Generated IV: f8d3a9e2c5a4
Encrypted Message: 7d9a1b04d87a34e2bcf9
Authentication Tag: 3e5a9f1e8b73
az role assignment list --assignee $(az ad signed-in-user show --query id -o tsv)
az logout && az login
openssl version
This project is licensed under the MIT License. See the LICENSE file for details.
Check out my uploaded notes for an in-depth explanation of encryption/decryption with code analysis.