-
Notifications
You must be signed in to change notification settings - Fork 33
Initial KBKDF implementation #108
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
Merged
Merged
Changes from 19 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
5357d80
Initial commit for KBKDF
baloo 7617a2f
cleanup
baloo 2018242
add CI
baloo 42af5fc
cleanup
baloo 342e132
double-pipeline support
baloo 3c1e97e
fixup cargo.toml
baloo d7664e9
feat(kbkdf): add counter mode tests;
TheBestTvarynka a050281
feat(kbkdf): add counter mode tests: cmacaes;
TheBestTvarynka 7aeede2
feat(kbkdf): format tests;
TheBestTvarynka 0cb72fe
feat(kbkdf): add feedback mode with iv tests;
TheBestTvarynka 7f211fa
fix(kbkdf): double pipeline implementation: do not hash separator;
TheBestTvarynka af72de5
feat(kbkdf): tests: implement simple test vactors parser and implemen…
TheBestTvarynka 2bf73b5
feat(kbkdf): tests: refactor tests and implement feedback mode with i…
TheBestTvarynka 6f05fd4
feat(kbkdf): tests: implement double pipeline without counter tests;
TheBestTvarynka b9517fc
feat(kbkdf): implement `use_counter` flag;
TheBestTvarynka 77059cb
feat(kbkdf): tests: implement double pipeline with counter tests;
TheBestTvarynka 560d134
feat(kbkdf): tests: implement feedback mode with zero iv and feedback…
TheBestTvarynka 8bb2873
feat(kbkdf): fix broken sealing;
TheBestTvarynka bb86eab
feat(kbkdf): use pre-releases
baloo b56a967
chore: update MSRV for kbkdf;
TheBestTvarynka 4886b3b
chore: kbkdf: remove devrem and update hex-literal and rust versions;
TheBestTvarynka 289c98e
chore: kbkdf: exclude NIST test vectors from publishing. add simple
TheBestTvarynka 737aaa0
kbkdf: std is no longer required as core::error::Error stabilized (#2)
baloo fa2c25e
kbkdf: provide a README (#3)
baloo ad79ff9
kbkdf: cleanup tests (#4)
baloo 2c59f3a
kbkdf: fixup readme (#5)
baloo a5c1b21
kbkdf: split off unit tests (#6)
baloo 0715721
kbkdf: integration tests are not functional without data (#7)
baloo b9e3645
kbkdf: provide a param builder (#8)
baloo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,60 @@ | ||
name: kbkdf | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "kbkdf/**" | ||
- "Cargo.*" | ||
push: | ||
branches: master | ||
|
||
defaults: | ||
run: | ||
working-directory: kbkdf | ||
|
||
env: | ||
CARGO_INCREMENTAL: 0 | ||
RUSTFLAGS: "-Dwarnings" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: | ||
- 1.65.0 # MSRV | ||
- stable | ||
target: | ||
- thumbv7em-none-eabi | ||
- wasm32-unknown-unknown | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: RustCrypto/actions/cargo-cache@master | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
targets: ${{ matrix.target }} | ||
- run: cargo build --no-default-features --target ${{ matrix.target }} | ||
|
||
minimal-versions: | ||
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master | ||
with: | ||
working-directory: ${{ github.workflow }} | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: | ||
- 1.65.0 # MSRV | ||
- stable | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: RustCrypto/actions/cargo-cache@master | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
- run: cargo check --all-features | ||
- run: cargo test --no-default-features | ||
- run: cargo test | ||
- run: cargo test --all-features |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 |
---|---|---|
|
@@ -5,6 +5,7 @@ members = [ | |
"hkdf", | ||
"concat-kdf", | ||
"ansi-x963-kdf", | ||
"kbkdf", | ||
] | ||
|
||
[profile.dev] | ||
|
This file contains hidden or 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,35 @@ | ||
[package] | ||
name = "kbkdf" | ||
version = "0.1.0" | ||
edition = "2018" | ||
authors = ["RustCrypto Developers"] | ||
license = "MIT OR Apache-2.0" | ||
homepage = "https://github.com/RustCrypto/KDFs/" | ||
repository = "https://github.com/RustCrypto/KDFs/" | ||
description = "Key Derivation Using Pseudorandom Function (KBKDF)" | ||
keywords = ["crypto", "KBKDF", "KDF"] | ||
categories = ["cryptography", "no-std"] | ||
readme = "README.md" | ||
rust-version = "1.65" | ||
|
||
[dependencies] | ||
digest = { version = "0.11.0-pre.9", default-features = false, features = ["mac"] } | ||
|
||
# divrem can be dropped with MSRV >= 1.73 | ||
divrem = "1.0.0" | ||
|
||
[dev-dependencies] | ||
hex-literal = "0.2.2" | ||
tarcieri marked this conversation as resolved.
Show resolved
Hide resolved
|
||
hex = "0.4" | ||
hmac = { version = "0.13.0-pre.4", default-features = false } | ||
sha2 = { version = "0.11.0-pre.2", default-features = false } | ||
sha1 = { version = "0.11.0-pre.2", default-features = false } | ||
cmac = "0.8.0-pre.2" | ||
aes = "0.9.0-pre.2" | ||
|
||
[features] | ||
std = ["hmac/std"] | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true | ||
rustdoc-args = ["--cfg", "docsrs"] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.