2023-10-12 22:20:04 +08:00
2023-10-12 19:49:31 +08:00
2023-10-12 19:49:31 +08:00
2023-10-13 19:42:32 +08:00
2023-10-19 08:14:18 +08:00
2023-10-12 19:48:12 +08:00
2023-10-15 14:01:12 +08:00
2023-03-06 23:28:31 +08:00
2023-10-15 14:04:17 +08:00
2023-10-12 19:50:15 +08:00
2023-10-13 12:53:40 +08:00
2023-10-12 19:49:50 +08:00

tpre-python

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).

Project Structure

.
├── basedockerfile (being used to build base iamge)
├── dockerfile (being used to build application)
├── include (gmssl header)
├── lib (gmssl shared object)
├── LICENSE
├── README_en.md
├── README.md
├── requirements.txt
└── src (application source code)

Environment Dependencies

System requirements:

  • Linux
  • Windows(may need to complie and install gmssl yourself)

The project relies on the following software:

  • Python 3.11
  • gmssl
  • gmssl-python

Installation Steps

Pre-installation

This project depends on gmssl, so you need to compile it from source first.
Visit GmSSL to learn how to install.

pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

Docker Installation

my docker version:

  • Version: 24.0.5
  • API version: 1.43
  • Go version: go1.20.6

Use base image and build yourself

docker pull git.mamahaha.work/sangge/tpre:base  
docker build . -t your_image_name
docker run your_image_name

Use pre-build image

docker pull git.mamahaha.work/sangge/tpre:latest
docker run git.mamahaha.work/sangge/tpre:latest

Usage Instructions

References

TPRE Algorithm Blog Post
Gmssl-python library

License

GNU GENERAL PUBLIC LICENSE v3

Description
密码学竞赛项目
Readme 12 MiB
Languages
Python 83.9%
JavaScript 10.7%
CSS 3.8%
Shell 1.1%
HTML 0.5%