aarushdubey/Post-Quantum-Secure-Cloud-Storage-

GitHub: aarushdubey/Post-Quantum-Secure-Cloud-Storage-

基于属性的后量子远程数据完整性检查协议的 C++ 实现,支持在不下载云端数据的情况下验证其完整性并抵御量子攻击。

Stars: 0 | Forks: 0

[![构建与测试](https://static.pigsec.cn/wp-content/uploads/repos/cas/7e/7eb7b968122ebea3aa4cfc3c0589159a1ab1f85b17e28997d4367765c4645ee4.svg)](https://github.com/aarushdubey/Post-Quantum-Secure-Cloud-Storage-/actions/workflows/build.yml) [![许可证:MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) [![C++17](https://img.shields.io/badge/C%2B%2B-17-blue.svg)](https://isocpp.org/std/the-standard) [![liboqs](https://img.shields.io/badge/Crypto-liboqs%20(ML--DSA--44)-green.svg)](https://openquantumsafe.org/) [![NIST PQC](https://img.shields.io/badge/NIST-FIPS%20204-orange.svg)](https://csrc.nist.gov/pubs/fips/204/final) # 基于格的属性远程数据完整性检查 (AB-RDIC) 一个基于属性的 RDIC 协议的 C++ 实现,允许授权用户使用后量子基于格的加密技术,在不下载云存储数据的情况下验证其完整性。 ## 本项目的作用 在云存储中,您将数据交由第三方托管。但您如何知道他们没有修改或丢失这些数据?**RDIC (远程数据完整性检查)** 通过让您仅检查随机的一部分数据块来验证数据完整性,从而解决了这个问题——这比下载所有内容要快得多。 本项目增加了两个关键创新: 1. **基于属性的访问** —— 审计权限由策略(例如,“工程部门中拥有绝密许可的任何人”)授予,而不是基于身份 2. **后量子安全** —— 通过 liboqs 使用 ML-DSA-44 (CRYSTALS-Dilithium, NIST FIPS 204),使其能够抵御量子计算机的攻击 ## 架构 ``` ┌─────────────────────────────────────────────────────────────┐ │ AB-RDIC System │ │ (ab_rdic_system.h) │ │ │ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────────┐ │ │ │ Attributes │ │ LSSS │ │ RDIC Protocol │ │ │ │ (attributes.h│ │ (lsss.h) │ │ (rdic.h) │ │ │ │ PolicyNode, │ │ Share matrix │ │ TagGen, Prove, │ │ │ │ AttributeSet│ │ for auth │ │ Verify │ │ │ └──────┬───────┘ └──────┬───────┘ └────────┬─────────┘ │ │ │ │ │ │ │ └─────────────────┴────────────────────┘ │ │ │ │ │ ┌────────────┴────────────┐ │ │ │ Lattice Primitives │ │ │ │ (lattice_primitives.h) │ │ │ │ ML-DSA-44 (Dilithium) │ │ │ │ via liboqs │ │ │ └─────────────────────────┘ │ └─────────────────────────────────────────────────────────────┘ ``` ## 快速开始 ### 前置条件 ``` # macOS brew install liboqs openssl cmake # 验证安装 ls /opt/homebrew/lib/liboqs* ``` ### 构建 ``` mkdir build && cd build cmake .. && make -j$(sysctl -n hw.ncpu) ``` ### 运行测试 ``` cd build && ctest --verbose ``` ### 运行演示(按顺序) ``` cd build ./demo_liboqs_basics # Module 1: Verify liboqs works ./demo_rdic # Module 2: RDIC protocol ./demo_identity_based # Module 3: Identity-based (shows limitation) ./demo_attribute_based # Module 4: Attribute-based (the solution) ./demo_full_system # Module 5: Everything together ``` ## 项目结构 ``` summer_internship/ ├── README.md ← You are here ├── ARCHITECTURE.md ← Detailed system design document ├── CMakeLists.txt ← Build configuration │ ├── include/ ← C++ headers (public API) │ ├── lattice_primitives.h — ML-DSA wrapper + hashing utilities │ ├── rdic.h — RDIC protocol (tags, challenge, proof, verify) │ ├── attributes.h — Attributes, policies (AND/OR/THRESHOLD) │ ├── lsss.h — Linear Secret Sharing Scheme │ └── ab_rdic_system.h — Complete system (ties everything together) │ ├── src/ ← C++ source files (implementations) │ ├── lattice_primitives.cpp │ ├── rdic.cpp │ ├── attributes.cpp │ ├── lsss.cpp │ └── ab_rdic_system.cpp │ ├── tests/ ← Unit tests │ └── test_all.cpp — Tests for all modules │ ├── modules/ ← Topic-based learning modules │ ├── 01_lattice_basics/ — Lattice crypto foundations │ ├── 02_rdic_protocol/ — RDIC challenge-response protocol │ ├── 03_identity_based/ — Identity-based RDIC (baseline) │ ├── 04_attribute_based/ — Attribute-based crypto components │ └── 05_full_system/ — Complete AB-RDIC system │ ├── docs/ ← Reports and presentations │ ├── reports/ │ └── presentations/ │ └── references/ ← External references ├── research_papers/ — 12 foundational research papers ├── libpdp/ — Classical PDP reference implementation └── analysis/ — Paper summaries and code analysis ``` ## 模块学习路径 | # | 模块 | 关键概念 | 演示 | |---|--------|-------------|------| | 1 | **格基础** | ML-DSA-44,密钥生成,签名,验证 | `demo_liboqs_basics` | | 2 | **RDIC 协议** | 文件块 → 标签 → 挑战 → 验证 | `demo_rdic` | | 3 | **基于身份** | 绑定到身份的标签(展示局限性) | `demo_identity_based` | | 4 | **基于属性** | 策略,LSSS,基于属性的密钥 | `demo_attribute_based` | | 5 | **完整系统** | 授权 + RDIC + 篡改检测 | `demo_full_system` | 每个模块文件夹包含: - 一个 **C++ 演示**(可运行的演示程序) - **文档**(Markdown 格式的学习笔记) - **Python 原型**(最初的原型实现) ## 技术栈 | 组件 | 技术 | 用途 | |-----------|-----------|---------| | 签名算法 | ML-DSA-44 (NIST FIPS 204) | 后量子数字签名 | | 加密库 | liboqs (Open Quantum Safe) | 生产级 PQC 实现 | | 编程语言 | C++17 | 性能与类型安全 | | 构建系统 | CMake 3.16+ | 跨平台构建 | | 哈希算法 | FNV-1a(原型) | 数据块标签消息哈希 | ## 新贡献者关键文件 如果您是初次接触本项目,请从这里开始: 1. **[ARCHITECTURE.md](ARCHITECTURE.md)** —— 系统设计与数据流 2. **[include/ab_rdic_system.h](include/ab_rdic_system.h)** —— 顶层 API 3. **[modules/05_full_system/demo_full_system.cpp](modules/05_full_system/demo_full_system.cpp)** —— 端到端示例 4. **[tests/test_all.cpp](tests/test_all.cpp)** —— “正确行为”的参考标准
标签:Bash脚本, C++, liboqs, 云存储安全, 后量子密码学, 密码学, 属性基加密, 手动系统调用, 数据完整性审计, 数据擦除, 网络扫描