Skip to content

Commit

Permalink
Initial Commit. RIP Tim May.
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptopatrick committed Dec 19, 2024
0 parents commit fd36a5e
Show file tree
Hide file tree
Showing 11 changed files with 668 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Cargo Build & Test

on:
push:
branches:
- master

env:
CARGO_TERM_COLOR: always

jobs:
build_and_test:
name: timed_release_crypto
runs-on: ubuntu-latest

steps:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Checkout code
uses: actions/checkout@v2

- name: Build
run: cargo build --verbose

- name: Test
run: cargo test --verbose
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Directories to exclude:
/target
/_wb
/_ref

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt:
**/*.rs.bk

# MacOS Related:
.DS_Store
38 changes: 38 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[package]
name = "timed_release_crypto"
version = "0.0.1"
authors = ["CryptoPatrick <[email protected]>"]
description = """
Abstractions and implementations for sending encrypted messages into the future.
"""
documentation = "https://github.com/cryptopatrick/timed_release_crypto"
homepage = "https://github.com/cryptopatrick/timed_release_crypto"
repository = "https://github.com/cryptopatrick/timed_release_crypto"
# keywords are terms that a user might search for (on crates.io).
keywords = ["cryptography", "crypto", "messaging", "command-line-utilities"]
# categories are related to crates.io
categories = ["cryptography", "command-line-utilities"]
license = "Unlicense OR MIT"
exclude = ["/.github/", "/ci/", "/scripts/"]
# build = "build.rs"
edition = "2021"
rust-version = "1.80"

[lib]
name = "timed_release_crypto"
path = "src/lib.rs"


[dependencies]
num-bigint = { version = "0.4.6", features = ["rand"] }
num-traits = "0.2.19"
rand = "0.8.5"
aes-gcm = "0.10"
base64 = "0.21"

[dev-dependencies]
criterion = "0.5.1"

#[[bench]]
#name = "generate_large_random_prime"
#harness = false
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

This crate is my way of showing my appreciation for the work of Timothy C. May.
The repo is still a work in progress, there's lots of exciting work to be done.

-CryptoPatrick

---

Date: Wed, 10 Feb 93 11:55:45 -0800
Cypherpunks,

I want to share with you folks some preliminary ideas on "timed-release
cryptographic protocols," that is, methods for sending encrypted messages
into the future.

-Tim May
16 changes: 16 additions & 0 deletions benches/generate_large_prime.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
use criterion::{criterion_group, criterion_main, Criterion};
use timed_release_crypto::generate_large_random_prime;

// Setup the test function.
fn generate_large_prime_benchmark(c: &mut Criterion) {
c.bench_function("generate large random prime", |b| {
b.iter(|| generate_large_random_prime(256u64))
});
}

// We can use the criterion_group! macro to call a number of functions
// using the same benchmark configuration.
// First argument is the name of the group, the rest: functions to benchmark.
criterion_group!(benches, generate_large_random_prime);
// Expands to a main macro that runs all the benchmarks in the group.
criterion_main!(benches);
1 change: 1 addition & 0 deletions benches/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cargo bench
8 changes: 8 additions & 0 deletions examples/basic.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extern crate timed_release_crypto;

use timed_release_crypto::Capsule;

fn main() {
#![allow(unused)]
let puzzle = Capsule::default();
}
2 changes: 2 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
max_width = 79
use_small_heuristics = "max"
Loading

0 comments on commit fd36a5e

Please sign in to comment.