pdpr-go

Cryptographic primitives for the Provable Data Provisioning protocol

https://github.com/titosilva/pdpr-go

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.9%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Cryptographic primitives for the Provable Data Provisioning protocol

Basic Info
  • Host: GitHub
  • Owner: titosilva
  • Language: Go
  • Default Branch: main
  • Homepage:
  • Size: 27.3 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 1 year ago · Last pushed 10 months ago
Metadata Files
Citation

https://github.com/titosilva/pdpr-go/blob/main/

# pdpr-go: Cryptographic Algorithms Benchmark Suite

This project implements and benchmarks several cryptographic algorithms, including hash functions, encryption schemes, and homomorphic hiding mechanisms. The benchmarks are written in Go and can be executed using the Go toolchain.

## Project Structure

- `crypto/hash/ghash/`  GHash cryptographic hash function and benchmarks
- `crypto/hash/lthash/`  LtHash cryptographic hash function and benchmarks
- `crypto/encryption/gcrypt/`  GCrypt encryption scheme and benchmarks
- `crypto/homomorphic_hiding/dlhh/`  DLHH homomorphic hiding and benchmarks

## Running Benchmarks

All benchmarks are implemented as Go benchmark tests (functions starting with `Benchmark`) in files ending with `_bench_test.go`. To run the benchmarks, use the following commands from the project root:

### 1. GHash Benchmarks

```
go test -bench=. ./crypto/hash/ghash/
```
This will run all benchmarks in `ghash_bench_test.go` and `pdpr_bench_test.go`, including:
- GHash performance for various parameters
- Full PDPr protocol benchmarks (encryption, proof generation, verification, decryption)

### 2. LtHash Benchmarks

```
go test -bench=. ./crypto/hash/lthash/
```
This will run all benchmarks in `lthash_bench_test.go`, including LtHash performance for different file and block sizes.

### 3. GCrypt Encryption Benchmarks

```
go test -bench=. ./crypto/encryption/gcrypt/
```
This will run all benchmarks in `gcrypt_bench_test.go`, including encryption and decryption performance for various key and message sizes.

### 4. DLHH Homomorphic Hiding Benchmarks

```
go test -bench=. ./crypto/homomorphic_hiding/dlhh/
```
This will run all benchmarks in `dlhh_bench_test.go`, including homomorphic hiding, encryption, decryption, proof generation, and verification.

## Customizing Benchmark Runs

You can pass additional flags to control the benchmarks, for example:
- `-benchtime=5s` to increase the benchmark duration
- `-count=3` to repeat benchmarks multiple times

Example:
```
go test -bench=Benchmark__Encrypt -benchtime=5s -count=3 ./crypto/encryption/gcrypt/
```

## Requirements
- Go 1.18 or newer

## Notes
- Benchmarks may require significant memory and CPU, especially for large file or key sizes.
- Results are reported in milliseconds per operation (e.g., `ms/hash`, `ms/encryption`).

## References
- See the source code in each subdirectory for details on the algorithms and their parameters.

Owner

  • Name: Tito Silva
  • Login: titosilva
  • Kind: user
  • Location: Brasilia, Brazil
  • Company: @Webvoto

Alive because of Jesus! Computer Engineering at University of Brasilia, Brasil.

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: Nascimento Silva
    given-names: João Tito
    orcid: https://orcid.org/0009-0004-0328-0404
title: "PDPr-go: cryptographic primitives for PDPr in Go"
version: 2.0.4
date-released: 2024-02-02

GitHub Events

Total
  • Push event: 5
  • Public event: 1
  • Create event: 2
Last Year
  • Push event: 5
  • Public event: 1
  • Create event: 2

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
proxy.golang.org: github.com/titosilva/pdpr-go
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.8%
Average: 6.0%
Dependent repos count: 6.2%
Last synced: 6 months ago