Skip to content

Commit fd36a5e

Browse files
committed
Initial Commit. RIP Tim May.
0 parents  commit fd36a5e

File tree

11 files changed

+668
-0
lines changed

11 files changed

+668
-0
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Cargo Build & Test
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
build_and_test:
13+
name: timed_release_crypto
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Install Rust
18+
uses: actions-rs/toolchain@v1
19+
with:
20+
profile: minimal
21+
toolchain: stable
22+
23+
- name: Checkout code
24+
uses: actions/checkout@v2
25+
26+
- name: Build
27+
run: cargo build --verbose
28+
29+
- name: Test
30+
run: cargo test --verbose

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Directories to exclude:
2+
/target
3+
/_wb
4+
/_ref
5+
6+
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
7+
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
8+
Cargo.lock
9+
10+
# These are backup files generated by rustfmt:
11+
**/*.rs.bk
12+
13+
# MacOS Related:
14+
.DS_Store

Cargo.toml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[package]
2+
name = "timed_release_crypto"
3+
version = "0.0.1"
4+
authors = ["CryptoPatrick <[email protected]>"]
5+
description = """
6+
Abstractions and implementations for sending encrypted messages into the future.
7+
"""
8+
documentation = "https://github.com/cryptopatrick/timed_release_crypto"
9+
homepage = "https://github.com/cryptopatrick/timed_release_crypto"
10+
repository = "https://github.com/cryptopatrick/timed_release_crypto"
11+
# keywords are terms that a user might search for (on crates.io).
12+
keywords = ["cryptography", "crypto", "messaging", "command-line-utilities"]
13+
# categories are related to crates.io
14+
categories = ["cryptography", "command-line-utilities"]
15+
license = "Unlicense OR MIT"
16+
exclude = ["/.github/", "/ci/", "/scripts/"]
17+
# build = "build.rs"
18+
edition = "2021"
19+
rust-version = "1.80"
20+
21+
[lib]
22+
name = "timed_release_crypto"
23+
path = "src/lib.rs"
24+
25+
26+
[dependencies]
27+
num-bigint = { version = "0.4.6", features = ["rand"] }
28+
num-traits = "0.2.19"
29+
rand = "0.8.5"
30+
aes-gcm = "0.10"
31+
base64 = "0.21"
32+
33+
[dev-dependencies]
34+
criterion = "0.5.1"
35+
36+
#[[bench]]
37+
#name = "generate_large_random_prime"
38+
#harness = false

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
This crate is my way of showing my appreciation for the work of Timothy C. May.
3+
The repo is still a work in progress, there's lots of exciting work to be done.
4+
5+
-CryptoPatrick
6+
7+
---
8+
9+
Date: Wed, 10 Feb 93 11:55:45 -0800
10+
Cypherpunks,
11+
12+
I want to share with you folks some preliminary ideas on "timed-release
13+
cryptographic protocols," that is, methods for sending encrypted messages
14+
into the future.
15+
16+
-Tim May

benches/generate_large_prime.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
use criterion::{criterion_group, criterion_main, Criterion};
2+
use timed_release_crypto::generate_large_random_prime;
3+
4+
// Setup the test function.
5+
fn generate_large_prime_benchmark(c: &mut Criterion) {
6+
c.bench_function("generate large random prime", |b| {
7+
b.iter(|| generate_large_random_prime(256u64))
8+
});
9+
}
10+
11+
// We can use the criterion_group! macro to call a number of functions
12+
// using the same benchmark configuration.
13+
// First argument is the name of the group, the rest: functions to benchmark.
14+
criterion_group!(benches, generate_large_random_prime);
15+
// Expands to a main macro that runs all the benchmarks in the group.
16+
criterion_main!(benches);

benches/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cargo bench

examples/basic.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extern crate timed_release_crypto;
2+
3+
use timed_release_crypto::Capsule;
4+
5+
fn main() {
6+
#![allow(unused)]
7+
let puzzle = Capsule::default();
8+
}

rustfmt.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
max_width = 79
2+
use_small_heuristics = "max"

0 commit comments

Comments
 (0)