diff --git a/.gitea/workflows/build-image.yaml b/.gitea/workflows/build-image.yaml index 7911cc1..c1d1fb3 100644 --- a/.gitea/workflows/build-image.yaml +++ b/.gitea/workflows/build-image.yaml @@ -5,6 +5,7 @@ on: paths: - "basedockerfile" - ".gitea/workflows/build-image.yaml" + - "requirements.txt" schedule: - cron: "0 0 1 * *" # 每月1号00:00执行 diff --git a/.gitignore b/.gitignore index 27385ff..42ab978 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,26 @@ src/tpre.cpython-311-x86_64-linux-gnu.so venv lib include -/frontend/node_modules/ \ No newline at end of file +/frontend/node_modules/ + +## LaTeX 临时文件 +*.aux +*.lof +*.log +*.lot +*.fls +*.out +*.toc +*.fmt +*.fot +*.cb +*.cb2 +*.dvi +*.bbl +*.bcf +*.blg +*-blx.aux +*-blx.bib +*.run.xml + + diff --git a/README_en.md b/README_en.md index 8585b48..104e55b 100644 --- a/README_en.md +++ b/README_en.md @@ -1,10 +1,12 @@ # tpre-python -This project is designed for the National Cryptography Competition and is implemented in Python to execute the TPRE algorithm. +This project is designed for the National Cryptography Competition +and is implemented in Python to execute the TPRE algorithm. ## Project Principle -The project uses the Chinese national standard cryptography algorithm to implement distributed proxy re-encryption (TPRE). +The project uses the Chinese national standard cryptography algorithm +to implement distributed proxy re-encryption (TPRE). ## Project Structure @@ -13,6 +15,8 @@ The project uses the Chinese national standard cryptography algorithm to impleme ├── dockerfile (being used to build application) ├── doc (development documents) ├── gmssl (gmssl source code) +├── include (gmssl header files) +├── lib (gmssl shared lib) ├── LICENSE ├── README_en.md ├── README.md diff --git a/src/demo2.py b/src/benchmark_tpre.py similarity index 89% rename from src/demo2.py rename to src/benchmark_tpre.py index 490670b..23326f8 100644 --- a/src/demo2.py +++ b/src/benchmark_tpre.py @@ -1,10 +1,19 @@ -from tpre import * +from tpre import ( + GenerateKeyPair, + Encrypt, + GenerateReKey, + ReEncrypt, + MergeCFrag, + DecryptFrags, +) import time import openpyxl # 初始化Excel工作簿和工作表 wb = openpyxl.Workbook() ws = wb.active +if ws is None: + raise Exception("无法创建Excel文件") ws.title = "算法性能结果" headers = [ "门限值 N",