X-bro1/SecureShield-FUD-Crypter
GitHub: X-bro1/SecureShield-FUD-Crypter
一款基于 C++20 的加密库与工具集,提供后量子密码学算法、多层加密和自解密可执行文件生成能力,解决高安全等级数据保护问题。
Stars: 0 | Forks: 0
# SecureShield v1.0.0
面向 C++20 的军用级加密库,支持后量子密码学和 Qt6 GUI。
## 功能
### 加密算法
- **AES-256-GCM** — 认证加密 (FIPS 197)
- **ChaCha20-Poly1305** — 现代流密码 (RFC 8439)
- **XChaCha20-Poly1305** — 支持 AAD 的扩展 nonce AEAD (RFC 9038)
- **Camellia-256-GCM** — 主权 AEAD 密码 (CTR+GHASH, ISO/IEC 18033-3)
- **Hybrid Cipher** — AES-256 + ECC (X25519) + RSA-2048 + ML-KEM-768/ML-DSA-44
- **10-Layer Cascade** — 军用级多算法加密
### 签名
- **Ed25519** — 椭圆曲线签名 (RFC 8032)
- **ML-DSA-44/65/87** — 通过 liboqs 实现的后量子签名 (NIST FIPS 204)
- **RSA-PSS-2048** — 传统签名 (FIPS 186-5)
### 密钥派生
- **Argon2id** — 基于密码的 KDF,支持可配置的内存/迭代/并行度 (RFC 9106)
- **Multi-Layer KDF** — 30 轮 PBKDF2 + 交替的 SHA-256/384/512 链
- **HKDF-SHA256** — 密钥派生 (RFC 5869)
### 安全特性
- **SSF Executables** — 具有 5 种抗量子签名的自解密可执行文件
- **Secure Deletion** — 使用 CSPRNG 模式进行多次覆盖擦除
- **String Obfuscation** — 编译时加密,运行时解密
- **Anti-Debug** — 多技术调试器/沙箱/虚拟机检测
- **Zstd Compression** — 加密前内置压缩
### GUI (Qt6)
- 带有算法选择的加密/解密组件
- 密钥管理选项卡 (Ed25519, Hybrid Key pairs)
- 基准测试组件(所有算法)
- SSF 可执行文件构建器
- 设置与保护仪表盘
- 国际化 (FR/EN)
## 环境要求
- C++20 编译器 (MSVC 2022+, GCC 12+, Clang 15+)
- CMake 3.20+
- OpenSSL 3.0+ (已测试 4.0.1)
- libsodium 1.0.18+
- liboqs (后量子)
- Zstd 1.5+
- BLAKE3
- Qt6 6.8+ (可选,用于 GUI)
- Google Test 1.17+ (用于测试)
## 快速开始
### Windows (推荐)
```
# 克隆和构建
git clone https://github.com/secure-shield/SecureShield.git
cd SecureShield
build.bat
```
### CMake 构建
```
# 配置
cmake -B build -S . -G "Visual Studio 17 2022" -A x64 \
-DCMAKE_PREFIX_PATH="C:/Qt/6.8.0/msvc2022_64" \
-DSECURESHIELD_BUILD_GUI=ON \
-DSECURESHIELD_BUILD_TESTS=ON
# 构建
cmake --build build --config Release
# 测试
cd build/bin/Release
test_crypto.exe
test_integration.exe
```
### CMake 选项
| 选项 | 默认值 | 描述 |
|--------|---------|-------------|
| `SECURESHIELD_BUILD_GUI` | ON | 构建 Qt6 GUI |
| `SECURESHIELD_BUILD_TESTS` | OFF | 构建单元测试 |
| `SECURESHIELD_FIPS_MODE` | OFF | FIPS 合规模式(仅限 NIST 算法)|
| `SECURESHIELD_SPECTRE` | OFF | 启用 /Qspectre + /CETCOMPAT 强化 |
| `SECURESHIELD_USE_LIBOQS` | ON | 启用后量子算法 |
## 使用示例
### AES-256-GCM 加密
```
#include "crypto/AESGCM.hpp"
#include "crypto/Random.hpp"
using namespace ss::crypto;
auto key = AES256GCM::GenerateKey();
std::vector plaintext = {'H', 'e', 'l', 'l', 'o'};
auto encrypted = AES256GCM::Encrypt(plaintext, key);
auto decrypted = AES256GCM::Decrypt(encrypted, key);
// decrypted == plaintext
```
### 带 AAD 的 Camellia-256-GCM
```
#include "crypto/Camellia.hpp"
auto key = CamelliaGCM::GenerateKey();
std::vector plaintext = {'S', 'e', 'c', 'u', 'r', 'e'};
std::vector aad = {'f', 'i', 'l', 'e', 'n', 'a', 'm', 'e'};
auto encrypted = CamelliaGCM::Encrypt(plaintext, key, aad);
auto decrypted = CamelliaGCM::Decrypt(encrypted, key, aad);
```
### 基于密码的加密
```
#include "crypto/KeyDerivation.hpp"
#include "crypto/AESGCM.hpp"
using namespace ss::crypto;
KeyDerivation::Salt salt;
SecureRandom::Fill(salt.data(), salt.size());
KeyDerivation::Argon2Config config;
config.iterations = 3;
config.memory_kb = 65536;
config.parallelism = 4;
auto derivedKey = KeyDerivation::Argon2id("my_password", salt, config);
```
### 自解密可执行文件 (.exe + .bat)
```
#include "crypto/SecureExecutable.hpp"
// Create self-extracting executable
SecureExecutable::CreateExecutable("secret.bin", "secret.exe", password);
```
## 项目结构
```
SecureShield/
├── include/ # Public headers
│ ├── core/ # Engine, Config, Logger
│ ├── crypto/ # Encryption algorithms
│ │ └── postquantum/ # ML-KEM, ML-DSA
│ ├── hash/ # Hash functions (SHA-3, BLAKE3)
│ ├── io/ # File operations, SecureDelete
│ ├── obfuscation/ # String encryption
│ ├── protection/ # AntiDebug, Integrity
│ ├── utils/ # Base64, Timer
│ └── compression/ # Zstd compression
├── src/ # Implementation files
├── gui/ # Qt6 GUI application
│ ├── stub/ # SSF self-extracting stub (C)
│ ├── widgets/ # Encrypt, Decrypt, Benchmark, KeyMgmt
│ └── dialogs/ # About, Settings
├── tests/ # Unit tests (GTest)
│ ├── test_crypto.cpp # Cipher tests
│ ├── test_integration.cpp # Integration tests
│ ├── test_hash.cpp # Hash tests
│ ├── test_io.cpp # I/O tests
│ └── test_liboqs.cpp # Post-quantum tests
├── build.bat # Windows one-click build
├── CMakeLists.txt # Build system
├── README.md
├── SECURITY.md
└── API.md
```
## 测试
```
# 涵盖 crypto、integration、hash、I/O 和 post-quantum 的 33 项测试
cmake -B build -S . -DSECURESHIELD_BUILD_TESTS=ON
cmake --build build --config Release
build/bin/Release/test_crypto.exe
build/bin/Release/test_integration.exe
```
## 安全注意事项
- 所有密码学操作均使用恒定时间比较
- 包含敏感信息的内存通过 `OPENSSL_cleanse` / `SecureZeroMemory` 进行擦除
- 所有密钥对(HybridKeyPair, Ed25519::KeyPair, RSAPssKeyPair)均使用 RAII 自动擦除析构函数
- 密码字符串应使用 `SecureString` 类以实现自动擦除
- 可启用反调试保护以增强运行时安全
- 文件加密使用认证加密 (AEAD) — 可检测篡改行为
- MSVC 强化:`/GS`, `/sdl`, `/DYNAMICBASE`, `/NXCOMPAT`
- 可选:通过 `-DSECURESHIELD_SPECTRE=ON` 启用 `/Qspectre`, `/CETCOMPAT`, `/guard:cf`
## 许可证
MIT 许可证 — 详情请参阅 [LICENSE](LICENSE)。
标签:Bash脚本, C++20, DNS 反向解析, Qt6, 免杀工具, 后量子密码学, 安全测试工具, 密码学库, 数据加密, 混淆与反调试