sangge-redmi 1b75a45984
Some checks failed
Test CI / test speed (push) Successful in 16s
Test CI / build-and-push (push) Failing after 6m39s
add env
2025-01-15 14:27:11 +08:00
2025-01-15 14:27:11 +08:00
2024-09-06 10:48:07 +08:00
2024-09-02 12:28:31 +08:00
2024-10-15 20:19:26 +08:00
2023-10-13 19:42:32 +08:00
2024-10-15 17:05:46 +08:00
2024-09-04 10:22:40 +08:00
2023-10-15 14:01:12 +08:00
2024-10-08 21:28:29 +08:00
2023-11-22 20:09:59 +08:00
2023-03-06 23:28:31 +08:00
2024-09-04 10:23:14 +08:00
2024-09-04 10:23:14 +08:00
2024-01-07 04:00:08 +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)
├── doc (development documents)
├── gmssl (gmssl source code)
├── LICENSE
├── README_en.md
├── README.md
├── requirements.txt
└── src (application source code)

Environment Dependencies

Bare mental version(UNTESTED)

System requirements:

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

The project relies on the following software:

  • Python 3.12
  • gmssl v3.1.1
  • gmssl-python 2.2.2

Docker installer

apt update && apt install mosh -y
chmod +x install_docker.sh
./install_docker.sh

Docker version

docker version:

  • 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 to learn how to install.

Or we use git submodule to reference repo of gmssl.

git clone --recursive https://git.mamahaha.work/sangge/tpre-python.git
chmod +x install_gmssl.sh
./install_gmssl.sh

Then install essential python libs

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

Docker Installation

Use base image and build yourself

docker build . -f basedockerfile -t git.mamahaha.work/sangge/tpre:base
(or docker pull git.mamahaha.work/sangge/tpre:base)
docker build . -t your_image_name

Use pre-build image

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

Usage Instructions

details in docs

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%