Skip to content

Commit

Permalink
fix(kyberlib): 🐛 fix derive declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienrousseau committed May 9, 2024
1 parent b90bb2b commit d3a926b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
15 changes: 9 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ repository = "https://github.com/sebastienrousseau/kyberlib"
version = "0.0.5"

[dependencies]
# Dependencies for the library
aes = { version = "0.8.4", optional = true }
ctr = { version = "0.9.2", optional = true }
pqc_core = { version = "0.3.0", features = ["zero"]}
Expand All @@ -45,18 +46,20 @@ wasm-bindgen = "0.2.92"
zeroize = { version = "1.7.0", features = ["derive"] }

[dev-dependencies]
# Dependencies for testing
criterion = "0.5.1"
rand = "0.8.5"
wasm-bindgen-test = "0.3.42"

# benchmarking = ["criterion"]

[build-dependencies]
# Dependencies for the build script
cc = {version = "1.0.97", optional = true }
nasm-rs = {version = "0.3.0", optional = true }

[lib]
crate-type = ["cdylib", "rlib"]
# Metadata about the library
crate-type = ["cdylib", "rlib", "staticlib"]
name = "kyberlib"
path = "src/lib.rs"

Expand Down Expand Up @@ -110,12 +113,12 @@ std = []

## Warn
# box_pointers = "warn"
# missing_copy_implementations = "warn"
# missing_docs = "warn"
# unstable_features = "warn"
missing_copy_implementations = "warn"
missing_docs = "warn"
unstable_features = "warn"
# unused_crate_dependencies = "warn"
# unused_extern_crates = "warn"
# unused_results = "warn"
unused_results = "warn"

## Allow
bare_trait_objects = "allow"
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ cargo run --example uake

### Platform support

`kyberlib` is supported and tested on MacOS, Linux, and Windows. The [GitHub Actions][10] shows the platforms in which the `kyberlib` library tests are run.
`kyberlib` supports a variety of CPU architectures. It is supported and tested on MacOS, Linux, and Windows.

### Documentation

Expand All @@ -258,8 +258,10 @@ backward compatibility, `kyberlib` follows [semantic versioning][06].

## License 📝

The project is licensed under the terms of Apache License, Version 2.0 and the
MIT license.
KyberLib is distributed under the terms of both the MIT license and the
Apache License (Version 2.0).

See [LICENSE-APACHE][01] and [LICENSE-MIT][02] for details.

## Contribution 🤝

Expand Down Expand Up @@ -289,15 +291,15 @@ A special thank you goes to the [Rust Reddit][12] community for
providing a lot of useful suggestions on how to improve this project.

[00]: https://kyberlib.com/ "KyberLib, A Robust Rust Library for CRYSTALS-Kyber Post-Quantum Cryptography"
[02]: http://opensource.org/licenses/MIT "KyberLib license"
[01]: http://opensource.org/licenses/Apache-2.0 "Apache License, Version 2.0"
[02]: http://opensource.org/licenses/MIT "MIT License"
[03]: https://github.com/sebastienrousseau/kyberlib/kyberlib/issues "KyberLib Issues"
[04]: https://github.com/sebastienrousseau/kyberlib/kyberlib/blob/main/CONTRIBUTING.md "KyberLib Contributing Guidelines"
[05]: https://github.com/sebastienrousseau/kyberlib/kyberlib/graphs/contributors "KyberLib Contributors"
[06]: http://semver.org/ "SemVer"
[07]: https://crates.io/crates/kyberlib "KyberLib on Crates.io"
[08]: https://docs.rs/kyberlib "KyberLib on Docs.rs"
[09]: https://lib.rs/crates/kyberlib "KyberLib on Lib.rs"
[10]: https://github.com/sebastienrousseau/kyberlib/kyberlib/actions "KyberLib on GitHub Actions"
[11]: https://www.rust-lang.org/policies/code-of-conduct "KyberLib Code of Conduct"
[12]: https://www.reddit.com/r/rust/ "Reddit"
[13]: https://www.rust-lang.org/learn/get-started "Rust"
Expand Down
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

/// Error types for the failure modes in Kyber key exchange.
#[derive(Debug, PartialEq)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]

Check warning on line 5 in src/error.rs

View check run for this annotation

Codecov / codecov/patch

src/error.rs#L5

Added line #L5 was not covered by tests
pub enum KyberLibError {
/// One or more inputs to a function are incorrectly sized. A likely cause of this is
/// two parties using different security levels while trying to negotiate a key exchange.
Expand Down
2 changes: 1 addition & 1 deletion src/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ impl Kex {

/// Represents Kyber parameters.
#[wasm_bindgen]
#[derive(Debug)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]

Check warning on line 187 in src/wasm.rs

View check run for this annotation

Codecov / codecov/patch

src/wasm.rs#L187

Added line #L187 was not covered by tests
pub struct Params {
/// The size of public key bytes.
#[wasm_bindgen(readonly)]
Expand Down

0 comments on commit d3a926b

Please sign in to comment.