-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fd36a5e
Showing
11 changed files
with
668 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cargo bench |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
max_width = 79 | ||
use_small_heuristics = "max" |
Oops, something went wrong.