FintechEncryption 1.0.2
dotnet add package FintechEncryption --version 1.0.2
NuGet\Install-Package FintechEncryption -Version 1.0.2
<PackageReference Include="FintechEncryption" Version="1.0.2" />
<PackageVersion Include="FintechEncryption" Version="1.0.2" />
<PackageReference Include="FintechEncryption" />
paket add FintechEncryption --version 1.0.2
#r "nuget: FintechEncryption, 1.0.2"
#:package FintechEncryption@1.0.2
#addin nuget:?package=FintechEncryption&version=1.0.2
#tool nuget:?package=FintechEncryption&version=1.0.2
🔐 FintechEncryption
🚀 Enterprise Hybrid Encryption Library for Secure FinTech Application/Api
FintechEncryption is a lightweight .NET library that provides secure data encryption and decryption using Hybrid Cryptography.
It combines:
- 🔑 AES-256-GCM for fast symmetric encryption
- 🔐 RSA-2048 OAEP for secure key exchange
- ✍️ SHA256 Digital Signature for message integrity
This approach is widely used in banking systems, payment gateways, and fintech APIs.
✨ Features
✔ Hybrid Encryption (AES + RSA) ✔ AES-256-GCM authenticated encryption ✔ RSA-2048 OAEP key exchange ✔ SHA256 Digital Signature verification ✔ Secure random key generation ✔ Lightweight and dependency minimal ✔ Multi-framework support ✔ Easy integration into existing APIs
📦 Supported Frameworks
This library supports multiple .NET frameworks:
| Framework | Supported |
|---|---|
| .NET Framework 4.8 | ✅ |
| .NET Standard 2.0 | ✅ |
| .NET 6 / 7 / 8 | ✅ |
| ASP.NET MVC | ✅ |
| ASP.NET Core | ✅ |
| Console Applications | ✅ |
📥 Installation
Install via NuGet Package Manager
Install-Package FintechEncryption
or using .NET CLI
dotnet add package FintechEncryption
🔑 Hybrid Encryption Architecture
🔐 Security Design
The library follows industry-standard cryptographic practices:
| Component | Algorithm |
|---|---|
| Data Encryption | AES-256-GCM |
| Key Exchange | RSA-2048 OAEP |
| Signature | SHA256withRSA |
| Random Generation | SecureRandom |
🔁 Secure Communication Use Case
A common real-world scenario is secure communication between two systems, such as:
- 🏦 Bank ↔ Payment Gateway
- 🏢 FinTech Platform ↔ Partner API
- 🛒 Merchant System ↔ Payment Processor
Each system generates its own RSA key pair, then exchanges public keys to enable secure encrypted communication.
🔑 Step 1: Generate Key Pairs
Each system generates its own RSA key pair.
System A (Sender)
var systemAKeys = KeyGenerator.GenerateRSAKeys();
string systemAPublicKey = systemAKeys.PublicKey;
string systemAPrivateKey = systemAKeys.PrivateKey;
System B (Receiver)
var systemBKeys = KeyGenerator.GenerateRSAKeys();
string systemBPublicKey = systemBKeys.PublicKey;
string systemBPrivateKey = systemBKeys.PrivateKey;
🔄 Step 2: Exchange Public Keys
Both systems securely exchange public keys.
| System | Shares | Keeps Secret |
|---|---|---|
| System A | Public Key | Private Key |
| System B | Public Key | Private Key |
Example:
System A → sends PublicKeyA to System B
System B → sends PublicKeyB to System A
Private keys must never be shared.
🔒 Step 3: System A Encrypts Data
System A encrypts the payload using:
- its private key (for signing)
- System B's public key (for encrypting AES key)
var encryptionService = new EncryptionService();
string encryptedPayload = encryptionService.EncryptData(
plainTextData,
systemAPrivateKey,
systemBPublicKey
);
Encrypted data can now be sent over:
- REST APIs
- Message queues
- Webhooks
- Secure channels
🔓 Step 4: System B Decrypts Data
System B decrypts the message using:
- its private key (to decrypt AES key)
- System A's public key (to verify signature)
var decryptionService = new DecryptionService();
string decryptedPayload = decryptionService.DecryptData(
encryptedData,
systemBPrivateKey,
systemAPublicKey
);
System B can now safely process the data.
🔐 Security Guarantees
This hybrid encryption model provides:
| Security Property | Description |
|---|---|
| 🔒 Confidentiality | Only the receiver can decrypt the message |
| ✍️ Integrity | Message cannot be altered without detection |
| 👤 Authentication | Confirms the sender's identity |
| 🔑 Secure Key Exchange | AES key protected by RSA |
📡 Communication Flow
System A System B
--------- ---------
Generate KeyPair A Generate KeyPair B
PublicKeyA --------------------> PublicKeyA received
PublicKeyB <-------------------- PublicKeyB shared
Encrypt using:
PrivateKeyA + PublicKeyB
Encrypted Payload -------------> Receive Payload
Decrypt using:
PrivateKeyB + PublicKeyA
The payload is encrypted before transmission to ensure high-level API security.
⚠️ Exception Handling
FinTechEncryption uses a custom exception EncryptionException for all encryption and decryption related errors.
Applications using the library should catch this exception to safely handle failures.
Example Usage
using FinTechEncryption;
try
{
var encryptionService = new EncryptionService();
string encrypted = encryptionService.EncryptData(
jsonPayload,
senderPrivateKey,
receiverPublicKey
);
var decryptionService = new DecryptionService();
string decrypted = decryptionService.DecryptData(
encrypted,
receiverPrivateKey,
senderPublicKey
);
Console.WriteLine("Decrypted Data: " + decrypted);
}
catch (EncryptionException ex)
{
Console.WriteLine("Encryption operation failed: " + ex.Message);
}
🚀 When To Use This Library
Use FintechEncryption when building:
- FinTech APIs
- Payment gateway integrations
- Secure partner APIs
- Banking systems
- Sensitive data exchange services
- Enterprise API platforms
🤝 Contributing
Contributions are welcome!
Steps:
- Fork the repository
- Create a feature branch
- Commit your changes
- Open a Pull Request
📜 License
This project is licensed under the MIT License.
⭐ Support
If you find this project useful:
⭐ Star the repository 🐛 Report issues 💡 Suggest improvements
🔗 Keywords
dotnet encryption
hybrid encryption
aes rsa encryption
fintech security
secure api encryption
api payload encryption
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.8
- BouncyCastle.Cryptography (>= 2.6.2)
-
.NETStandard 2.0
- BouncyCastle.Cryptography (>= 2.6.2)
-
net6.0
- BouncyCastle.Cryptography (>= 2.6.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.2 | 106 | 3/6/2026 |