update doc and requirement
This commit is contained in:
parent
68ed843777
commit
ca253dbb77
32
README.md
32
README.md
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
本项目是全国密码学竞赛设计项目,该项目是使用python实现tpre算法
|
本项目是全国密码学竞赛设计项目,该项目是使用python实现tpre算法
|
||||||
|
|
||||||
## 项目原理
|
## 项目原理
|
||||||
|
|
||||||
使用国密算法实现分布式代理重加密tpre
|
使用国密算法实现分布式代理重加密tpre
|
||||||
|
|
||||||
@ -18,7 +18,7 @@
|
|||||||
├── README_en.md
|
├── README_en.md
|
||||||
├── README.md
|
├── README.md
|
||||||
├── requirements.txt
|
├── requirements.txt
|
||||||
└── src (程序源码)
|
└── src (程序源码)
|
||||||
|
|
||||||
## 环境依赖
|
## 环境依赖
|
||||||
|
|
||||||
@ -30,25 +30,25 @@
|
|||||||
- Windows (需要自行安装gmssl的共享库)
|
- Windows (需要自行安装gmssl的共享库)
|
||||||
|
|
||||||
该项目依赖以下软件:
|
该项目依赖以下软件:
|
||||||
python 3.11
|
python 3.12
|
||||||
gmssl
|
gmssl v3.1.1
|
||||||
gmssl-python
|
gmssl-python 2.2.2
|
||||||
|
|
||||||
### Docker 版本安装
|
### Docker 版本安装
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
apt update && apt install mosh -y
|
apt update && apt install mosh -y
|
||||||
chmod +x install_docker.sh
|
chmod +x install_docker.sh
|
||||||
./install_docker.sh
|
./install_docker.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### 开发环境docker版本信息
|
### 开发环境docker版本信息
|
||||||
|
|
||||||
docker 版本:
|
docker 版本:
|
||||||
|
|
||||||
- 版本: 24.0.5
|
- 版本: 24.0.5
|
||||||
- API 版本: 1.43
|
- API 版本: 1.43
|
||||||
- Go 版本: go1.20.6
|
- Go 版本: go1.20.6
|
||||||
|
|
||||||
## 安装步骤
|
## 安装步骤
|
||||||
|
|
||||||
@ -56,6 +56,14 @@ docker 版本:
|
|||||||
|
|
||||||
本项目依赖gmssl,所以请提前安装好。访问 [GmSSL](https://github.com/guanzhi/GmSSL) 可以看到如何安装。
|
本项目依赖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库
|
然后安装必要的python库
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@ -68,7 +76,7 @@ pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker build . -f basedockerfile -t git.mamahaha.work/sangge/tpre:base
|
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
|
docker build . -t your_image_name
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -82,7 +90,7 @@ docker pull git.mamahaha.work/sangge/tpre:latest
|
|||||||
|
|
||||||
详细说明查看开发文档 [docs](doc/README_app_en.md)
|
详细说明查看开发文档 [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)
|
[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)
|
[Gmssl-python library](https://github.com/GmSSL/GmSSL-Python)
|
||||||
|
34
README_en.md
34
README_en.md
@ -17,55 +17,55 @@ The project uses the Chinese national standard cryptography algorithm to impleme
|
|||||||
├── README_en.md
|
├── README_en.md
|
||||||
├── README.md
|
├── README.md
|
||||||
├── requirements.txt
|
├── requirements.txt
|
||||||
└── src (application source code)
|
└── src (application source code)
|
||||||
|
|
||||||
## Environment Dependencies
|
## Environment Dependencies
|
||||||
|
|
||||||
### Bare mental version(UNTESTED)
|
### Bare mental version(UNTESTED)
|
||||||
|
|
||||||
System requirements:
|
System requirements:
|
||||||
|
|
||||||
- Linux
|
- Linux
|
||||||
- Windows(may need to complie and install gmssl yourself)
|
- 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
|
- Python 3.12
|
||||||
- gmssl
|
- gmssl v3.1.1
|
||||||
- gmssl-python
|
- gmssl-python 2.2.2
|
||||||
|
|
||||||
### Docker installer
|
### Docker installer
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
apt update && apt install mosh -y
|
apt update && apt install mosh -y
|
||||||
chmod +x install_docker.sh
|
chmod +x install_docker.sh
|
||||||
./install_docker.sh
|
./install_docker.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Docker version
|
### Docker version
|
||||||
|
|
||||||
docker version:
|
docker version:
|
||||||
|
|
||||||
- Version: 24.0.5
|
- Version: 24.0.5
|
||||||
- API version: 1.43
|
- API version: 1.43
|
||||||
- Go version: go1.20.6
|
- Go version: go1.20.6
|
||||||
|
|
||||||
## Installation Steps
|
## Installation Steps
|
||||||
|
|
||||||
### Pre-installation
|
### Pre-installation
|
||||||
|
|
||||||
This project depends on gmssl, so you need to compile it from source first.
|
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.
|
Or we use git submodule to reference repo of gmssl.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone --recursive https://git.mamahaha.work/sangge/tpre-python.git
|
git clone --recursive https://git.mamahaha.work/sangge/tpre-python.git
|
||||||
chmod +x install_gmssl.sh
|
chmod +x install_gmssl.sh
|
||||||
./install_gmssl.sh
|
./install_gmssl.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
Then install essential python libs
|
Then install essential python libs
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
|
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
|
```bash
|
||||||
docker build . -f basedockerfile -t git.mamahaha.work/sangge/tpre:base
|
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
|
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)
|
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)
|
[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)
|
[Gmssl-python library](https://github.com/GmSSL/GmSSL-Python)
|
||||||
|
@ -6,7 +6,6 @@ mkdir include
|
|||||||
cp gmssl/include include
|
cp gmssl/include include
|
||||||
|
|
||||||
mkdir gmssl/build
|
mkdir gmssl/build
|
||||||
cd gmssl/build
|
cd gmssl/build || exit
|
||||||
cmake ..
|
cmake ..
|
||||||
make
|
sudo make install
|
||||||
cp bin/lib* ../../lib
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
gmssl-python
|
gmssl-python>=2.2.2,<3.0.0
|
||||||
fastapi
|
fastapi
|
||||||
uvicorn
|
uvicorn
|
||||||
requests
|
requests
|
||||||
|
Loading…
x
Reference in New Issue
Block a user