Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull in commit history of our ring compatible library #1

Merged
merged 193 commits into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
193 commits
Select commit Hold shift + click to select a range
dfe8e39
Initial commit
justsmth Jul 19, 2022
e469ed8
Add aws-lc-sys crate
justsmth Jul 20, 2022
403451e
AEAD tests
justsmth Jul 20, 2022
55b0fe0
Latest aws-lc-sys
justsmth Jul 21, 2022
ee30985
Simplify "use" statements.
justsmth Aug 10, 2022
d94d0ff
adding digest test file along with test harness
samuel40791765 Aug 10, 2022
25518f5
Merge pull request #1 from justsmth/testharness-and-digest-testbase
justsmth Aug 11, 2022
fa32136
Add pre-commit git hook
justsmth Aug 11, 2022
48ebf71
WIP
justsmth Jul 22, 2022
9e10ab5
aes_gcm_seal almost there
justsmth Aug 12, 2022
b9cb160
Encrypt working
justsmth Aug 15, 2022
94ec879
Merge pull request #2 from justsmth/aead-dev
justsmth Aug 15, 2022
684dc00
Decrypt working
justsmth Aug 16, 2022
64a5808
AEAD tests are passing
justsmth Aug 16, 2022
3aa353c
Merge pull request #3 from justsmth/aead-dev
justsmth Aug 16, 2022
3519748
basic digest tests framework
samuel40791765 Aug 16, 2022
4ceb051
Merge branch 'main' into digest-rust
samuel40791765 Aug 16, 2022
8722e89
Enable more AEAD tests
justsmth Aug 16, 2022
a4837ca
Remove AEAD ChaCha20 tests
justsmth Aug 16, 2022
bfcd446
Work In Progress - ChaCha20-Poly1305
justsmth Aug 17, 2022
e532802
use evp_md_digest APIs to manage AWS-LC digest bindings
samuel40791765 Aug 17, 2022
a7ecc0e
ChaCha20Poly1305 is working
justsmth Aug 18, 2022
8d345b9
Clippy fixes
justsmth Aug 18, 2022
977e6b5
Use EVP_AEAD_CTX_xxx for AES-GCM
justsmth Aug 18, 2022
c9a8b7f
Delete aes_test.rs
justsmth Aug 18, 2022
79ac9dc
Merge pull request #4 from justsmth/digest-rust
justsmth Aug 18, 2022
74ac201
Merge branch 'main' into aead-dev
justsmth Aug 18, 2022
40722b1
add drop for evp_md_ctx
samuel40791765 Aug 18, 2022
46be935
Merge pull request #6 from justsmth/drop-md
justsmth Aug 18, 2022
96b80a2
Unify Counter type definitions
justsmth Aug 18, 2022
ffa11de
Merge pull request #5 from justsmth/aead-dev
justsmth Aug 19, 2022
5e66437
Update aws-lc-sys
justsmth Aug 19, 2022
3f190c9
minor improvements for digest
samuel40791765 Aug 19, 2022
cc894d8
Merge pull request #7 from justsmth/aws-lc-sys
justsmth Aug 19, 2022
26fc043
Merge pull request #8 from justsmth/digest-improve
samuel40791765 Aug 19, 2022
636b9aa
Delete bindings.rs
justsmth Aug 19, 2022
0a938fb
Delete bindings.rs
justsmth Aug 19, 2022
bc15c14
Merge pull request #9 from justsmth/aead-dev
justsmth Aug 22, 2022
f6a4292
Add benches
justsmth Aug 22, 2022
75c277e
Merge branch 'main' into aead-dev-2
justsmth Aug 22, 2022
e2769bd
Fix compile error
justsmth Aug 22, 2022
deb6a4e
Call aws_lc_sys::CRYPTO_library_init()
justsmth Aug 22, 2022
d0f945d
It compiles
justsmth Aug 23, 2022
b9f1f94
Merge pull request #10 from justsmth/aead-dev
justsmth Aug 24, 2022
186510b
Refactoring
justsmth Aug 24, 2022
261aca2
Merge branch 'main' into aead-dev
justsmth Aug 24, 2022
f52d215
Cleanup benchmarks
justsmth Aug 24, 2022
936fd1e
Micro-benchmarks for AEAD
justsmth Aug 24, 2022
8e4d4c0
Merge pull request #11 from justsmth/aead-dev
justsmth Aug 24, 2022
235168a
Cleanup & Clippy
justsmth Aug 25, 2022
5a888cc
Improve performance of AEAD seal-append
justsmth Aug 25, 2022
9617b3f
Benchmarks for AES_256_GCM and ChaCha20
justsmth Aug 25, 2022
0ff4b9c
Merge pull request #12 from justsmth/aead-dev
justsmth Aug 25, 2022
ec23525
add hmac module for aws-lc-ring
samuel40791765 Aug 25, 2022
f5af3ef
Cleanup, improve test coverage
justsmth Aug 25, 2022
96b437f
Merge branch 'main' into aead-dev
justsmth Aug 25, 2022
2727404
Simplify nonce handling in AEAD
justsmth Aug 25, 2022
46fdc18
Merge pull request #13 from justsmth/aead-dev
justsmth Aug 25, 2022
3385ea3
add benchmarking for digests
samuel40791765 Aug 26, 2022
b8562ca
Merge pull request #14 from justsmth/digest-bench
justsmth Aug 26, 2022
0edb381
Move memory allocation outside of benchmark
justsmth Aug 26, 2022
5444e11
Move benchmark data in txt files
justsmth Aug 26, 2022
303a576
Cleanup
justsmth Aug 26, 2022
6ff8939
Merge pull request #15 from justsmth/digest-dev
samuel40791765 Aug 26, 2022
6ea6ef3
connect one-shot rust digest APIs to one-shot AWS-LC digest APIs
samuel40791765 Aug 26, 2022
df1d530
add benchmarks for digest one-shot APIs
samuel40791765 Aug 26, 2022
056c87b
Merge pull request #17 from justsmth/one-shot-digest
samuel40791765 Aug 26, 2022
766ac03
Work towards benchmarks for aead::quic
justsmth Aug 26, 2022
2d17078
Merge branch 'main' into aead-dev
justsmth Aug 26, 2022
1b04902
Fix/hack for SIGSEGV
justsmth Aug 26, 2022
be50372
Fix SIGSEGV
justsmth Aug 29, 2022
74a36bb
Add more quic benchmarks
justsmth Aug 29, 2022
87b1eb6
Avoid unneeded calls to Init/Reset cipher contexts
justsmth Aug 29, 2022
5da3a3f
Merge pull request #16 from justsmth/aead-dev
justsmth Aug 29, 2022
efcfa7d
create basic hmac rust bindings for aws-lc
samuel40791765 Aug 29, 2022
00e797b
Merge branch 'main' into hmac-rust
samuel40791765 Aug 29, 2022
cdafce1
align HMAC one-shot functions
samuel40791765 Aug 29, 2022
7d75e6f
Merge pull request #18 from justsmth/hmac-rust
justsmth Aug 30, 2022
28a8794
Add 'rand' module
justsmth Aug 30, 2022
8212a6e
libc dependency needed on Linux
justsmth Aug 30, 2022
d5bf453
Remove unnecessary mod declaration
justsmth Aug 30, 2022
4ccaa04
Provide AWS_LC_SECURE_RANDOM
justsmth Aug 30, 2022
ac52174
SystemRandom just uses AWS-LC's RAND_bytes
justsmth Aug 30, 2022
31c9851
Merge pull request #19 from justsmth/rand-dev
justsmth Aug 30, 2022
b10fe33
SIGSEGV
justsmth Aug 30, 2022
25c76c6
add benchmarking functionality for HMAC
samuel40791765 Aug 30, 2022
ca02d3c
clean up code for digest benchmarking
samuel40791765 Aug 30, 2022
d406ee0
Fix SIGSEGV
justsmth Aug 30, 2022
06a4157
move hmac_ctx initialization into key and other improvements
samuel40791765 Aug 30, 2022
30524bf
minor refactoring of ciphers; clippy cleanup
justsmth Aug 31, 2022
a111c09
benchmark hmac keys longer than the block length
samuel40791765 Aug 31, 2022
e651e10
change bits typo to bytes
samuel40791765 Aug 31, 2022
4371580
Merge pull request #20 from justsmth/hmac-bench
samuel40791765 Aug 31, 2022
b7ab950
progress on aead::openssh
justsmth Aug 31, 2022
ae69e2a
Merge branch 'main' into refactoring
justsmth Sep 1, 2022
fd33e49
Cleanup HMAC; reimplement HMAC oneshot
justsmth Sep 1, 2022
030af46
Refactor hmac::Context
justsmth Sep 1, 2022
cc78e59
Clone for hmac::Context
justsmth Sep 1, 2022
83a0d4d
Merge pull request #21 from justsmth/refactoring
justsmth Sep 1, 2022
b8ab8e9
Merge branch 'main' into openssh
justsmth Sep 1, 2022
3b303e6
add rand test
samuel40791765 Sep 1, 2022
3539ee9
count key construction in hmac benchmarks
samuel40791765 Sep 1, 2022
121172f
Tests are passing
justsmth Sep 2, 2022
35186ba
More tests passing
justsmth Sep 2, 2022
300e9a4
Cleanup
justsmth Sep 2, 2022
7b15202
More cleanup
justsmth Sep 6, 2022
2da0fc9
Restore AWS-LC ChaCha asm impl
justsmth Sep 6, 2022
8a38c40
Remove unsed Block::from(&[u8])
justsmth Sep 6, 2022
1b3e730
Add copyright
justsmth Sep 6, 2022
6506baf
Updated AEAD benchmarks
justsmth Sep 6, 2022
65be390
Fix bench group name
justsmth Sep 6, 2022
c731a0a
Group QUIC benchmarks
justsmth Sep 6, 2022
293939b
Benchmark groups for Digest and HMAC
justsmth Sep 6, 2022
a5ad973
change pub(crate) to pub(super)
samuel40791765 Sep 6, 2022
415dbd4
Merge pull request #23 from justsmth/openssh
justsmth Sep 6, 2022
01e6f86
Merge pull request #22 from justsmth/improvements
justsmth Sep 6, 2022
87c24cc
Merge branch 'main' into refactor-bench
justsmth Sep 6, 2022
10db810
Update digest/hmac bench names
justsmth Sep 6, 2022
5355f4d
Merge pull request #24 from justsmth/refactor-bench
justsmth Sep 6, 2022
cdda387
Remove SystemRandom indirection
justsmth Sep 6, 2022
b59c1ea
Merge pull request #25 from justsmth/rand-dev
justsmth Sep 6, 2022
e7d7a67
feature=alloc; remove unsed benchmark description
justsmth Sep 7, 2022
464b513
Move hmac_tests.txt
justsmth Sep 7, 2022
d92853d
hkdf module implementation for AWS-LC
samuel40791765 Sep 7, 2022
e7ea655
Merge pull request #26 from justsmth/aead-dev
justsmth Sep 7, 2022
09c278d
Remove unused *EVP_AEAD from KeyInner
justsmth Sep 7, 2022
3d4ae3a
Remove unused *EVP_AEAD from KeyInner
justsmth Sep 7, 2022
c60d11f
Merge pull request #27 from justsmth/hdkf-wrappers
justsmth Sep 8, 2022
7ed65b8
Merge branch 'main' into aead-dev
justsmth Sep 8, 2022
fdf7d4a
Fix compiler warning
justsmth Sep 8, 2022
6c42c90
Merge pull request #28 from justsmth/aead-dev
justsmth Sep 8, 2022
661e96a
add benchmarks for hkdf
samuel40791765 Sep 8, 2022
cf906c2
add benchmarks for hkdf
samuel40791765 Sep 8, 2022
3602240
Merge branch 'hkdf-bench' of github.com:justsmth/aws-lc-ring-facade i…
samuel40791765 Sep 8, 2022
75315df
change benchmarking punctuation
samuel40791765 Sep 8, 2022
5b3003b
minor benchmark naming improvements
samuel40791765 Sep 9, 2022
b30110f
Merge pull request #29 from justsmth/hkdf-bench
justsmth Sep 9, 2022
49429a6
import pbkdf2 tests from ring
samuel40791765 Sep 8, 2022
73a9a8a
add aws-lc wrappers for pbkdf2
samuel40791765 Sep 8, 2022
289ec26
correspond to clippy linters
samuel40791765 Sep 9, 2022
b03859c
Merge pull request #30 from justsmth/pkdf-dev
justsmth Sep 9, 2022
e6f0dda
benchmarks for pbkdf2
samuel40791765 Sep 9, 2022
ce597fb
Merge pull request #31 from justsmth/pkdf-bench
samuel40791765 Sep 12, 2022
4ae5745
Signature dev (#32)
justsmth Sep 14, 2022
a2b35cf
Address Sanitation; fix memory leaks (#33)
justsmth Sep 14, 2022
e1a92eb
Remove unused code (#35)
justsmth Sep 15, 2022
358ed9f
implement additional tests for better coverage (#34)
samuel40791765 Sep 15, 2022
dde3360
Use enum for algorithm ids (#36)
justsmth Sep 15, 2022
eac7f8b
restrict edge case test to platforms that allow large memory allocati…
samuel40791765 Sep 19, 2022
c87f7dc
uncomment aead's hkdf key derivation (#37)
samuel40791765 Sep 20, 2022
dc36ccb
impl Send for most structs (#39)
justsmth Sep 21, 2022
6244ba5
Ecdsa (#40)
justsmth Sep 23, 2022
9cd4121
Ecdsa dev (#41)
justsmth Sep 27, 2022
081cdf5
Ed25519 dev (#42)
justsmth Sep 27, 2022
d51c579
RSA benchmarks; Fix compatibility issues (#43)
justsmth Sep 29, 2022
9f38650
Use LcPtr in AEAD (#47)
justsmth Sep 30, 2022
0bbbfd6
ECDSA and Ed25519 benchmarks (#46)
justsmth Sep 30, 2022
cf1de0e
minor tweaks in benchmarks (#44)
samuel40791765 Sep 30, 2022
dae89f7
Inline `HMAC_CTX` structure (#48)
samuel40791765 Oct 4, 2022
b43fca3
More cleanup (#49)
justsmth Oct 4, 2022
3fc5135
remove duplicate test (#50)
samuel40791765 Oct 4, 2022
d782d36
Improve test coverage (#51)
justsmth Oct 4, 2022
e605c95
Remove 'hex' dependency (#52)
justsmth Oct 6, 2022
94f33aa
Agreement (#53)
justsmth Oct 11, 2022
59d34f5
Agreement benchmarks (#54)
justsmth Oct 11, 2022
a93d98a
Improve coverage: rand, signature (#55)
justsmth Oct 12, 2022
ef17033
move coverage tests to src files (#56)
samuel40791765 Oct 18, 2022
75a82e4
Update to latest aws-lc-sys (#59)
justsmth Oct 19, 2022
1df8280
Enable more link-time optimizations (#60)
justsmth Oct 19, 2022
ac637ca
add sync for hmac key
samuel40791765 Oct 20, 2022
49efd2c
add thread test for hkdf
samuel40791765 Oct 20, 2022
6744d92
Refactor RSA impl (#61)
justsmth Oct 21, 2022
241e6d5
ThreadLocal for aead (#58)
samuel40791765 Oct 21, 2022
e4f2504
Merge branch 'main' into save-thread
samuel40791765 Oct 21, 2022
28432d4
Merge pull request #62 from justsmth/save-thread
samuel40791765 Oct 21, 2022
8045bbe
Cleanup map_err (#63)
justsmth Oct 21, 2022
b1c8a0a
add test for non-thread_local (#64)
samuel40791765 Oct 21, 2022
764f4ac
Github CI (#65)
justsmth Oct 24, 2022
3b0c1df
Test Sync trait in signature module structs (#68)
justsmth Oct 24, 2022
11b6e3f
Remove more uses of EVP_PKEY (#67)
justsmth Oct 25, 2022
31f43a9
Rename feature to 'threadlocal' (#71)
justsmth Oct 25, 2022
2185fc6
Migrate to ParseCallbacks for Rust bindgen modifications (#72)
skmcgrail Oct 26, 2022
ed02183
Support Ring's IO module (#70)
justsmth Oct 26, 2022
6795d94
Make HMAC Keys stack allocatable (#69)
samuel40791765 Oct 27, 2022
6377eaa
Sync for agreement::EphemeralPrivateKey (#73)
justsmth Oct 27, 2022
6ab937a
CI test --all-targets (#74)
justsmth Oct 27, 2022
179a2dc
threadlocal for digest::Context (#75)
justsmth Oct 27, 2022
deb5b48
Fix StdError compat; add hkdf test (#76)
justsmth Oct 31, 2022
ee0ee9e
Resolve clippy lints for IO module; allow zeroize 1.x (#77)
justsmth Nov 1, 2022
a427abb
Rename AWS-LC libcrypto.a to avoid linker problems (#78)
justsmth Nov 1, 2022
5353076
Fixes for From trait implementation for Okm -> Salt (#79)
skmcgrail Nov 2, 2022
e2c8bb4
Minor build script cleanup (#80)
justsmth Nov 2, 2022
3ca2180
Merge branch 'main' into history
samuel40791765 Nov 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 23 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

HAS_ISSUES=0
FIRST_FILE=1

for file in $(git diff --name-only --staged); do
FMT_RESULT="$(rustfmt --edition 2021 --color auto --files-with-diff $file 2>/dev/null || true)"
if [ "$FMT_RESULT" != "" ]; then
if [ $FIRST_FILE -eq 0 ]; then
echo -n ", "
fi
echo -n "$file"
HAS_ISSUES=1
FIRST_FILE=0
fi
done

if [ $HAS_ISSUES -eq 0 ]; then
exit 0
fi

echo ". Your code has formatting issues in files listed above. Format your code with \`make format\` or call rustfmt manually."
exit 1
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: ci

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
name: CI
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v2
- run: cargo fmt --check --verbose
- run: cargo test --release --all-targets
- run: cargo test --no-default-features
- run: cargo test --no-default-features --features ring-io
- run: cargo test --no-default-features --features alloc
- run: cargo test --no-default-features --features threadlocal

18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Cargo
# will have compiled files and executables
/target/

# 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
deps/aws-lc-sys/src/bindings.rs
/flamegraph.svg

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


# Added by cargo

**/target
/Cargo.lock
72 changes: 72 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[package]
name = "aws-lc-ring-facade"
version = "0.1.0"
edition = "2021"
rust-version = "1.57"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
alloc = []
threadlocal = ["thread_local"]
default = ["alloc", "threadlocal", "ring-io"]
asan = ["aws-lc-sys/asan"]
ring-io = []

[dependencies]
untrusted = { version = "0.7.1" }
aws-lc-sys = { path = "deps/aws-lc-sys", version = "0.1.0" }
zeroize = "1"
libc = "0.2"
thread_local = { version ="1.1.4", optional = true }

[dev-dependencies]
rand = "0.8"
paste = "1.0"
criterion = "0.4"
ring = "0.16"
regex = "1.6.0"
lazy_static = "1.4.0"

[profile.bench]
lto = true

[[bench]]
name = "aead_benchmark"
harness = false

[[bench]]
name = "digest_benchmark"
harness = false

[[bench]]
name = "hkdf_benchmark"
harness = false

[[bench]]
name = "hmac_benchmark"
harness = false

[[bench]]
name = "pbkdf2_benchmark"
harness = false

[[bench]]
name = "quic_benchmark"
harness = false

[[bench]]
name = "rsa_benchmark"
harness = false

[[bench]]
name = "ecdsa_benchmark"
harness = false

[[bench]]
name = "ed25519_benchmark"
harness = false

[[bench]]
name = "agreement_benchmark"
harness = false
201 changes: 201 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
init:
rustup component add rustfmt && git config core.hooksPath .githooks

format:
cargo +nightly fmt -- --color auto --files-with-diff --verbose

clippy:
cargo clippy -- -W clippy::all

asan:
# TODO: This build target produces linker error on Mac.
# Run specific tests:
# RUST_BACKTRACE=1 ASAN_OPTIONS=detect_leaks=1 RUSTFLAGS=-Zsanitizer=address RUSTDOCFLAGS=-Zsanitizer=address cargo +nightly test --test ecdsa_tests --target `rustc -vV | sed -n 's|host: ||p'` --features asan
RUST_BACKTRACE=1 ASAN_OPTIONS=detect_leaks=1 RUSTFLAGS=-Zsanitizer=address RUSTDOCFLAGS=-Zsanitizer=address cargo +nightly test --lib --bins --tests --examples --target `rustc -vV | sed -n 's|host: ||p'` --features asan

asan-release:
# TODO: This build target produces linker error on Mac.
# Run specific tests:
# RUST_BACKTRACE=1 ASAN_OPTIONS=detect_leaks=1 RUSTFLAGS=-Zsanitizer=address RUSTDOCFLAGS=-Zsanitizer=address cargo +nightly test --release --test basic_rsa_test --target `rustc -vV | sed -n 's|host: ||p'` --features asan
RUST_BACKTRACE=1 ASAN_OPTIONS=detect_leaks=1 RUSTFLAGS=-Zsanitizer=address RUSTDOCFLAGS=-Zsanitizer=address cargo +nightly test --release --lib --bins --tests --examples --target `rustc -vV | sed -n 's|host: ||p'` --features asan

coverage:
cargo llvm-cov --open --hide-instantiations

ci:
cargo fmt --check --verbose
cargo test --release --all-targets
cargo test --no-default-features
cargo test --no-default-features --features ring-io
cargo test --no-default-features --features alloc
cargo test --no-default-features --features threadlocal
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
## My Project

TODO: Fill this README out!
# aws-lc-ring-facade
A Ring-compatible Rust library implemented with AWS-LC cryptographic operations

Be sure to:

Expand All @@ -15,4 +14,3 @@ See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more inform
## License

This library is licensed under the LICENSE NAME HERE License.

Loading