diff --git a/implementations/rust/examples/node/Cargo.lock b/implementations/rust/examples/node/Cargo.lock index 6acbe5d1cee..599c84862be 100644 --- a/implementations/rust/examples/node/Cargo.lock +++ b/implementations/rust/examples/node/Cargo.lock @@ -156,7 +156,7 @@ dependencies = [ [[package]] name = "ockam" -version = "0.0.0" +version = "0.1.0" dependencies = [ "hashbrown", "hex", @@ -167,14 +167,14 @@ dependencies = [ [[package]] name = "ockam_core" -version = "0.1.0" +version = "0.2.0" dependencies = [ "async-trait", ] [[package]] name = "ockam_node" -version = "0.0.0" +version = "0.1.2" dependencies = [ "async-trait", "hashbrown", @@ -184,7 +184,7 @@ dependencies = [ [[package]] name = "ockam_node_attribute" -version = "0.1.2" +version = "0.1.3" dependencies = [ "quote", "syn", diff --git a/implementations/rust/examples/worker/Cargo.lock b/implementations/rust/examples/worker/Cargo.lock index 43a4541d693..f2860afb0e5 100644 --- a/implementations/rust/examples/worker/Cargo.lock +++ b/implementations/rust/examples/worker/Cargo.lock @@ -142,7 +142,7 @@ dependencies = [ [[package]] name = "ockam" -version = "0.0.0" +version = "0.1.0" dependencies = [ "hashbrown", "hex", @@ -153,14 +153,14 @@ dependencies = [ [[package]] name = "ockam_core" -version = "0.1.0" +version = "0.2.0" dependencies = [ "async-trait", ] [[package]] name = "ockam_node" -version = "0.0.0" +version = "0.1.2" dependencies = [ "async-trait", "hashbrown", @@ -170,7 +170,7 @@ dependencies = [ [[package]] name = "ockam_node_attribute" -version = "0.1.2" +version = "0.1.3" dependencies = [ "quote", "syn", diff --git a/implementations/rust/ockam/ockam_vault/Cargo.lock b/implementations/rust/ockam/ockam_vault/Cargo.lock index 2007de675e8..b9e96297ddb 100644 --- a/implementations/rust/ockam/ockam_vault/Cargo.lock +++ b/implementations/rust/ockam/ockam_vault/Cargo.lock @@ -12,6 +12,18 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +[[package]] +name = "as-slice" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb4d1c23475b74e3672afa8c2be22040b8b7783ad9b461021144ed10a46bb0e6" +dependencies = [ + "generic-array 0.12.3", + "generic-array 0.13.2", + "generic-array 0.14.4", + "stable_deref_trait", +] + [[package]] name = "async-trait" version = "0.1.42" @@ -29,7 +41,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array", + "generic-array 0.14.4", ] [[package]] @@ -56,7 +68,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array", + "generic-array 0.14.4", "subtle", ] @@ -79,7 +91,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array", + "generic-array 0.14.4", ] [[package]] @@ -105,6 +117,24 @@ dependencies = [ "zeroize", ] +[[package]] +name = "generic-array" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" +dependencies = [ + "typenum", +] + +[[package]] +name = "generic-array" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ed1e761351b56f54eb9dcd0cfaca9fd0daecf93918e1cfc01c8a3d26ee7adcd" +dependencies = [ + "typenum", +] + [[package]] name = "generic-array" version = "0.14.4" @@ -126,6 +156,15 @@ dependencies = [ "wasi", ] +[[package]] +name = "hash32" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4041af86e63ac4298ce40e5cca669066e75b6f1aa3390fe2561ffa5e1d9f4cc" +dependencies = [ + "byteorder", +] + [[package]] name = "hashbrown" version = "0.9.1" @@ -135,6 +174,18 @@ dependencies = [ "ahash", ] +[[package]] +name = "heapless" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb22866f8416bc2b65389ebcb8b48e1be541650c44063ea1288d04bcf903808" +dependencies = [ + "as-slice", + "generic-array 0.14.4", + "hash32", + "stable_deref_trait", +] + [[package]] name = "hex" version = "0.4.2" @@ -169,18 +220,14 @@ checksum = "1cca32fa0182e8c0989459524dc356b8f2b5c10f1b9eb521b7d182c03cf8c5ff" [[package]] name = "ockam_core" -version = "0.1.0" +version = "0.2.0" dependencies = [ "async-trait", ] -[[package]] -name = "ockam_core_macros" -version = "0.0.0" - [[package]] name = "ockam_vault" -version = "0.0.0" +version = "0.1.0" dependencies = [ "arrayref", "curve25519-dalek", @@ -189,7 +236,6 @@ dependencies = [ "hex", "hkdf", "ockam_core", - "ockam_core_macros", "ockam_vault_core", "rand", "sha2", @@ -199,11 +245,11 @@ dependencies = [ [[package]] name = "ockam_vault_core" -version = "0.0.0" +version = "0.1.0" dependencies = [ "cfg-if", + "heapless", "ockam_core", - "ockam_core_macros", "zeroize", ] @@ -303,6 +349,12 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0242b8e50dd9accdd56170e94ca1ebd223b098eb9c83539a6e367d0f36ae68" +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "subtle" version = "2.4.0" diff --git a/implementations/rust/ockam/ockam_vault/Cargo.toml b/implementations/rust/ockam/ockam_vault/Cargo.toml index eecafc45dcf..eec79dfbd41 100644 --- a/implementations/rust/ockam/ockam_vault/Cargo.toml +++ b/implementations/rust/ockam/ockam_vault/Cargo.toml @@ -1,25 +1,25 @@ [package] +name = "ockam_vault" +version = "0.1.0" authors = ["Ockam Developers"] -description = """ A software-only Ockam Vault implementation that can be used when no cryptographic hardware is available. -""" edition = "2018" -homepage = "https://www.ockam.io/" -keywords = ["ockam"] license = "Apache-2.0" -name = "ockam_vault" +homepage = "https://github.com/ockam-network/ockam" +repository = "https://github.com/ockam-network/ockam/tree/develop/implementations/rust/ockam/ockam_vault" readme = "README.md" -repository = "https://github.com/ockam-network/ockam" -version = "0.0.0" +keywords = ["ockam"] +categories = ["no-std"] +description = """A software-only Ockam Vault implementation. +""" [features] default = ["std"] -no-std = ["ockam_vault_core/heapless"] -# Requires the Rust Standard Library. -std = ["hex/std"] +std = ["ockam_core/std", "hex/std"] +no_std = ["ockam_vault_core/heapless"] [dependencies] -ockam_core = {path = "../ockam_core", version = "*"} -ockam_vault_core = {path = "../ockam_vault_core", version = "*"} +ockam_core = {path = "../ockam_core", version = "0.2.0"} +ockam_vault_core = {path = "../ockam_vault_core", version = "0.1.0"} arrayref = "0.3" curve25519-dalek = "3.0" ed25519-dalek = "1.0" diff --git a/implementations/rust/ockam/ockam_vault/src/lib.rs b/implementations/rust/ockam/ockam_vault/src/lib.rs index 2ae2927cf61..aaadd371b4c 100644 --- a/implementations/rust/ockam/ockam_vault/src/lib.rs +++ b/implementations/rust/ockam/ockam_vault/src/lib.rs @@ -16,17 +16,18 @@ pub extern crate ockam_vault_core; mod error; -pub use error::*; mod hash_impl; -pub use hash_impl::*; mod key_id_impl; -pub use key_id_impl::*; mod secret_impl; -pub use secret_impl::*; mod signer_impl; -pub use signer_impl::*; mod software_vault; -pub use software_vault::*; mod verifier_impl; -pub use verifier_impl::*; mod xeddsa; + +pub use error::*; +pub use hash_impl::*; +pub use key_id_impl::*; +pub use secret_impl::*; +pub use signer_impl::*; +pub use software_vault::*; +pub use verifier_impl::*; diff --git a/implementations/rust/ockam/ockam_vault_core/Cargo.lock b/implementations/rust/ockam/ockam_vault_core/Cargo.lock index 57980a981e9..a02069c9db0 100644 --- a/implementations/rust/ockam/ockam_vault_core/Cargo.lock +++ b/implementations/rust/ockam/ockam_vault_core/Cargo.lock @@ -1,5 +1,17 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +[[package]] +name = "as-slice" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb4d1c23475b74e3672afa8c2be22040b8b7783ad9b461021144ed10a46bb0e6" +dependencies = [ + "generic-array 0.12.3", + "generic-array 0.13.2", + "generic-array 0.14.4", + "stable_deref_trait", +] + [[package]] name = "async-trait" version = "0.1.42" @@ -11,6 +23,12 @@ dependencies = [ "syn", ] +[[package]] +name = "byteorder" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" + [[package]] name = "cfg-if" version = "1.0.0" @@ -18,23 +36,68 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "ockam_core" -version = "0.1.0" +name = "generic-array" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" dependencies = [ - "async-trait", + "typenum", ] [[package]] -name = "ockam_core_macros" -version = "0.0.0" +name = "generic-array" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ed1e761351b56f54eb9dcd0cfaca9fd0daecf93918e1cfc01c8a3d26ee7adcd" +dependencies = [ + "typenum", +] + +[[package]] +name = "generic-array" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "hash32" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4041af86e63ac4298ce40e5cca669066e75b6f1aa3390fe2561ffa5e1d9f4cc" +dependencies = [ + "byteorder", +] + +[[package]] +name = "heapless" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb22866f8416bc2b65389ebcb8b48e1be541650c44063ea1288d04bcf903808" +dependencies = [ + "as-slice", + "generic-array 0.14.4", + "hash32", + "stable_deref_trait", +] + +[[package]] +name = "ockam_core" +version = "0.2.0" +dependencies = [ + "async-trait", +] [[package]] name = "ockam_vault_core" -version = "0.0.0" +version = "0.1.0" dependencies = [ "cfg-if", + "heapless", "ockam_core", - "ockam_core_macros", "zeroize", ] @@ -56,6 +119,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "syn" version = "1.0.60" @@ -79,12 +148,24 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "typenum" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" + [[package]] name = "unicode-xid" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" +[[package]] +name = "version_check" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" + [[package]] name = "zeroize" version = "1.2.0" diff --git a/implementations/rust/ockam/ockam_vault_core/Cargo.toml b/implementations/rust/ockam/ockam_vault_core/Cargo.toml index 2d0efb504eb..16121134002 100644 --- a/implementations/rust/ockam/ockam_vault_core/Cargo.toml +++ b/implementations/rust/ockam/ockam_vault_core/Cargo.toml @@ -1,24 +1,24 @@ [package] +name = "ockam_vault_core" +version = "0.1.0" authors = ["Ockam Developers"] -description = """The abstract Ockam Vault trait. -""" edition = "2018" -homepage = "https://www.ockam.io/" -keywords = ["ockam"] license = "Apache-2.0" -name = "ockam_vault_core" +homepage = "https://github.com/ockam-network/ockam" +repository = "https://github.com/ockam-network/ockam/tree/develop/implementations/rust/ockam/ockam_vault_core" readme = "README.md" -repository = "https://github.com/ockam-network/ockam" -version = "0.0.0" +keywords = ["ockam"] +categories = ["no-std"] +description = """The Ockam Vault trait. +""" [features] default = ["std"] -no-std = ["heapless"] -# Requires the Rust Standard Library. -std = [] +std = ["ockam_core/std"] +no_std = ["heapless"] [dependencies] -ockam_core = {path = "../ockam_core", version = "*"} +ockam_core = {path = "../ockam_core", version = "0.2.0"} heapless = { version = "0.6", optional = true } zeroize = { version = "1.1", features = ["zeroize_derive"] } cfg-if = "1.0" diff --git a/implementations/rust/ockam/ockam_vault_core/src/lib.rs b/implementations/rust/ockam/ockam_vault_core/src/lib.rs index 8fa41b41dcf..6efe47e8628 100644 --- a/implementations/rust/ockam/ockam_vault_core/src/lib.rs +++ b/implementations/rust/ockam/ockam_vault_core/src/lib.rs @@ -16,17 +16,19 @@ )] mod hash_vault; -pub use hash_vault::*; mod key_id_vault; -pub use key_id_vault::*; -pub mod macros; +mod macros; mod secret; -pub use secret::*; mod secret_vault; -pub use secret_vault::*; mod signer_vault; -pub use signer_vault::*; mod types; -pub use types::*; mod verifier_vault; + +pub use hash_vault::*; +pub use key_id_vault::*; +pub use macros::*; +pub use secret::*; +pub use secret_vault::*; +pub use signer_vault::*; +pub use types::*; pub use verifier_vault::*; diff --git a/implementations/rust/ockam/ockam_vault_core/src/types.rs b/implementations/rust/ockam/ockam_vault_core/src/types.rs index 31c7483cc2e..5233d4bf3ac 100644 --- a/implementations/rust/ockam/ockam_vault_core/src/types.rs +++ b/implementations/rust/ockam/ockam_vault_core/src/types.rs @@ -16,7 +16,7 @@ pub const AES256_SECRET_LENGTH: usize = 32; pub const AES128_SECRET_LENGTH: usize = 16; cfg_if! { - if #[cfg(feature = "no-std")] { + if #[cfg(feature = "no_std")] { use heapless::consts::*; /// Secret Key Vector pub type SecretKeyVec = heapless::Vec;