update doc and requirement

This commit is contained in:
sangge-redmi 2024-09-04 10:23:14 +08:00
parent 68ed843777
commit ca253dbb77
4 changed files with 41 additions and 34 deletions

View File

@ -2,7 +2,7 @@
本项目是全国密码学竞赛设计项目该项目是使用python实现tpre算法
## 项目原理
## 项目原理
使用国密算法实现分布式代理重加密tpre
@ -18,7 +18,7 @@
├── README_en.md
├── README.md
├── requirements.txt
└── src (程序源码)
└── src (程序源码)
## 环境依赖
@ -30,25 +30,25 @@
- Windows (需要自行安装gmssl的共享库)
该项目依赖以下软件:
python 3.11
gmssl
gmssl-python
python 3.12
gmssl v3.1.1
gmssl-python 2.2.2
### Docker 版本安装
```bash
apt update && apt install mosh -y
apt update && apt install mosh -y
chmod +x install_docker.sh
./install_docker.sh
```
### 开发环境docker版本信息
docker 版本:
docker 版本:
- 版本: 24.0.5
- API 版本: 1.43
- Go 版本: go1.20.6
- 版本: 24.0.5
- API 版本: 1.43
- Go 版本: go1.20.6
## 安装步骤
@ -56,6 +56,14 @@ docker 版本:
本项目依赖gmssl所以请提前安装好。访问 [GmSSL](https://github.com/guanzhi/GmSSL) 可以看到如何安装。
本项目也提供了submodule的方式可以直接使用
```bash
git clone --recurse-submodules https://git.mamahaha.work/sangge/tpre-python.git
chmod +x install_gmssl.sh
./install_docker.sh
```
然后安装必要的python库
```bash
@ -68,7 +76,7 @@ pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
```bash
docker build . -f basedockerfile -t git.mamahaha.work/sangge/tpre:base
(或者 docker pull git.mamahaha.work/sangge/tpre:base)
(或者 docker pull git.mamahaha.work/sangge/tpre:base)
docker build . -t your_image_name
```
@ -82,7 +90,7 @@ docker pull git.mamahaha.work/sangge/tpre:latest
详细说明查看开发文档 [docs](doc/README_app_en.md)
## 参考文献
## 参考文献
[TPRE Algorithm Blog Post](https://www.cnblogs.com/pam-sh/p/17364656.html#tprelib%E7%AE%97%E6%B3%95)
[Gmssl-python library](https://github.com/GmSSL/GmSSL-Python)

View File

@ -17,55 +17,55 @@ The project uses the Chinese national standard cryptography algorithm to impleme
├── README_en.md
├── README.md
├── requirements.txt
└── src (application source code)
└── src (application source code)
## Environment Dependencies
### Bare mental version(UNTESTED)
System requirements:
System requirements:
- Linux
- Windows(may need to complie and install gmssl yourself)
The project relies on the following software:
The project relies on the following software:
- Python 3.11
- gmssl
- gmssl-python
- Python 3.12
- gmssl v3.1.1
- gmssl-python 2.2.2
### Docker installer
```bash
apt update && apt install mosh -y
apt update && apt install mosh -y
chmod +x install_docker.sh
./install_docker.sh
```
### Docker version
docker version:
docker version:
- Version: 24.0.5
- API version: 1.43
- Go version: go1.20.6
- Version: 24.0.5
- API version: 1.43
- Go version: go1.20.6
## Installation Steps
### Pre-installation
This project depends on gmssl, so you need to compile it from source first.
Visit [GmSSL](https://github.com/guanzhi/GmSSL) to learn how to install.
Visit [GmSSL](https://github.com/guanzhi/GmSSL) to learn how to install.
Or we use git submodule to reference repo of gmssl.
```bash
git clone --recursive https://git.mamahaha.work/sangge/tpre-python.git
chmod +x install_gmssl.sh
./install_gmssl.sh
chmod +x install_gmssl.sh
./install_gmssl.sh
```
Then install essential python libs
Then install essential python libs
```bash
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
@ -77,7 +77,7 @@ pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
```bash
docker build . -f basedockerfile -t git.mamahaha.work/sangge/tpre:base
(or docker pull git.mamahaha.work/sangge/tpre:base)
(or docker pull git.mamahaha.work/sangge/tpre:base)
docker build . -t your_image_name
```
@ -91,7 +91,7 @@ docker pull git.mamahaha.work/sangge/tpre:latest
details in [docs](doc/README_app_en.md)
## References
## References
[TPRE Algorithm Blog Post](https://www.cnblogs.com/pam-sh/p/17364656.html#tprelib%E7%AE%97%E6%B3%95)
[Gmssl-python library](https://github.com/GmSSL/GmSSL-Python)

View File

@ -6,7 +6,6 @@ mkdir include
cp gmssl/include include
mkdir gmssl/build
cd gmssl/build
cd gmssl/build || exit
cmake ..
make
cp bin/lib* ../../lib
sudo make install

View File

@ -1,4 +1,4 @@
gmssl-python
gmssl-python>=2.2.2,<3.0.0
fastapi
uvicorn
requests
requests