From 9ed63a10095ada701e6cdc436544220a11f409c0 Mon Sep 17 00:00:00 2001 From: leo <77177015+greendoescode@users.noreply.github.com> Date: Mon, 24 Jun 2024 23:57:45 +0100 Subject: [PATCH 01/11] chore: add cargo.lock to gitignore (#3) * docs: update readme to include more information * feat: add volariscore code - copied from dexios * fix: fixing cargolocks * chore: update cargo.toml * feature!: added volaris-domain and volaris-cli code (thanks jake) * fix: remove cargo.lock * fix: add cargo.lock? * fix: add cargo.lock to .gitignore --- .gitignore | 3 ++- crates/volaris-cli/src/cli.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 212de44..82b32a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target -.DS_Store \ No newline at end of file +.DS_Store +Cargo.lock diff --git a/crates/volaris-cli/src/cli.rs b/crates/volaris-cli/src/cli.rs index a3d2a7e..e676c09 100644 --- a/crates/volaris-cli/src/cli.rs +++ b/crates/volaris-cli/src/cli.rs @@ -146,7 +146,7 @@ pub fn get_matches() -> clap::ArgMatches { Command::new("volaris") .version(clap::crate_version!()) - .author("brxken128 ") + .author("brxken128 , greendoescode ") .about("Secure, fast and modern command-line encryption of files.") .subcommand_required(true) .arg_required_else_help(true) From d3a560617a3b00b29f17f856f6b0151c65162c7f Mon Sep 17 00:00:00 2001 From: leo <77177015+greendoescode@users.noreply.github.com> Date: Tue, 25 Jun 2024 21:03:52 +0100 Subject: [PATCH 02/11] ci: add buildandrelease --- .github/workflows/buildandrelease.yml | 129 ++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 .github/workflows/buildandrelease.yml diff --git a/.github/workflows/buildandrelease.yml b/.github/workflows/buildandrelease.yml new file mode 100644 index 0000000..dd54776 --- /dev/null +++ b/.github/workflows/buildandrelease.yml @@ -0,0 +1,129 @@ +name: Build and Upload + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + branches: [ master ] + +env: + CARGO_TERM_COLOR: always + +jobs: + clippy: + name: clippy (ubuntu-latest, stable) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + components: clippy + + - name: Restore cargo cache + uses: actions/cache@v2.1.7 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-stable-${{ hashFiles('Cargo.lock') }} + + - name: Clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --no-deps + + check: + name: check (ubuntu-latest, stable) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: Restore cargo cache + uses: actions/cache@v2.1.7 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-stable-${{ hashFiles('Cargo.lock') }} + + - name: Check + uses: actions-rs/cargo@v1 + with: + command: check + args: --release + + build: + strategy: + matrix: + os: + - ubuntu-latest + - windows-latest + - macos-latest + rust: + - stable + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + + - name: Toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + + - name: Restore cargo cache + uses: actions/cache@v2.1.7 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ matrix.os }}-cargo-${{ matrix.rust }}-${{ hashFiles('Cargo.lock') }} + + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --release + + - if: matrix.os != 'windows-latest' + name: Strip\ + run: strip target/release/volaris-cli + + - if: matrix.os == 'ubuntu-latest' + name: Hash the Binary + run: sha256sum target/release/volaris-cli + + - if: matrix.os == 'ubuntu-latest' + name: Upload Binary as artifact + uses: actions/upload-artifact@v3 + with: + name: volaris-linux64 + path: target/release/volaris-cli + - if: matrix.os == 'macos-latest' + name: Upload Binary as artifact + uses: actions/upload-artifact@v3 + with: + name: volaris-mac64 + path: target/release/volaris-cli + - if: matrix.os == 'windows-latest' + name: Upload Binary as artifact + uses: actions/upload-artifact@v3 + with: + name: volaris-cli-win64 + path: target/release/volaris-cli.exe From 8c46b572ced0729ff68bf2915e59b2a36b728f45 Mon Sep 17 00:00:00 2001 From: leo <77177015+greendoescode@users.noreply.github.com> Date: Tue, 25 Jun 2024 21:15:12 +0100 Subject: [PATCH 03/11] ci: change from just volaris to volaris-cli --- .github/workflows/buildandrelease.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildandrelease.yml b/.github/workflows/buildandrelease.yml index dd54776..2f85394 100644 --- a/.github/workflows/buildandrelease.yml +++ b/.github/workflows/buildandrelease.yml @@ -113,13 +113,13 @@ jobs: name: Upload Binary as artifact uses: actions/upload-artifact@v3 with: - name: volaris-linux64 + name: volaris-cli-linux64 path: target/release/volaris-cli - if: matrix.os == 'macos-latest' name: Upload Binary as artifact uses: actions/upload-artifact@v3 with: - name: volaris-mac64 + name: volaris-cli-mac64 path: target/release/volaris-cli - if: matrix.os == 'windows-latest' name: Upload Binary as artifact From 2c3c9258776e79f856b7c485956d6247d404acb2 Mon Sep 17 00:00:00 2001 From: leo <77177015+greendoescode@users.noreply.github.com> Date: Tue, 25 Jun 2024 21:16:59 +0100 Subject: [PATCH 04/11] ci: change from master to main --- .github/workflows/buildandrelease.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/buildandrelease.yml b/.github/workflows/buildandrelease.yml index 2f85394..d7a32f0 100644 --- a/.github/workflows/buildandrelease.yml +++ b/.github/workflows/buildandrelease.yml @@ -2,11 +2,11 @@ name: Build and Upload on: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] workflow_dispatch: - branches: [ master ] + branches: [ main ] env: CARGO_TERM_COLOR: always From 12bdeb081bea2b84e264f3ee17cda9dbcf7e4e6e Mon Sep 17 00:00:00 2001 From: leo <77177015+greendoescode@users.noreply.github.com> Date: Tue, 25 Jun 2024 21:46:05 +0100 Subject: [PATCH 05/11] chore: change security section --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fe4734b..6deeda8 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,8 @@ Volaris is an encryption tool designed to prioritize privacy and security. Built ## Security -Volaris uses modern cryptographic AEADs (XChaCha20-Poly1305 + AES-256-GCM), -with audited backends to ensure the safety and integrity of -your data. It's extremely easy to use Volaris before uploading your files to a -cloud service, to ensure that no prying eyes can read them. +Volaris uses modern cryptographic methods (XChaCha20-Poly1305 + AES-256-GCM), with audited backends to keep the safety of +your data. Using Volaris before sharing your files is effortless, keeping them safe in transit. ## Current Status From 42709b0c5f72e36e2a1b682c3cc68b4bf6dcef08 Mon Sep 17 00:00:00 2001 From: leo <77177015+greendoescode@users.noreply.github.com> Date: Tue, 25 Jun 2024 21:53:44 +0100 Subject: [PATCH 06/11] chore: add license and update cargo.toml (volaris-cli) (#4) * chore: add license and update cargo.toml --- Cargo.lock | 919 ++++++++++++++++++++++++++++++++++ crates/volaris-cli/Cargo.toml | 2 +- crates/volaris-cli/LICENSE | 24 + 3 files changed, 944 insertions(+), 1 deletion(-) create mode 100644 crates/volaris-cli/LICENSE diff --git a/Cargo.lock b/Cargo.lock index e69de29..237a2a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -0,0 +1,919 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "subtle", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "anyhow" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[package]] +name = "argon2" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db4ce4441f99dbd377ca8a8f57b698c44d0d6e712d8329b5040da5a64aa1ce73" +dependencies = [ + "base64ct", + "blake2", + "password-hash", +] + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "balloon-hash" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fdbafd8c776e0a7c250b5dfaf4723477e0d92b42c5a91ce4e50bd9bb2dcc9a1" +dependencies = [ + "crypto-bigint", + "digest", + "password-hash", +] + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest", +] + +[[package]] +name = "blake3" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "digest", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cc" +version = "1.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c891175c3fb232128f48de6590095e59198bbeb8620c310be349bfc3afd12c7b" +dependencies = [ + "jobserver", + "libc", + "once_cell", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chacha20" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "chacha20poly1305" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" +dependencies = [ + "aead", + "chacha20", + "cipher", + "poly1305", + "zeroize", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", + "zeroize", +] + +[[package]] +name = "clap" +version = "3.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +dependencies = [ + "atty", + "bitflags", + "clap_lex", + "indexmap", + "once_cell", + "strsim", + "termcolor", + "textwrap", +] + +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "console" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crypto-bigint" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "rand_core", + "typenum", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "deoxys" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00603a49e114bd99d87a4ab8d480f36ecd1451a9d6474f66973d1a829ff77789" +dependencies = [ + "aead", + "aes", + "subtle", + "zeroize", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "ghash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +dependencies = [ + "opaque-debug", + "polyval", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "indicatif" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d207dc617c7a380ab07ff572a6e52fa202a2a8f355860ac9c38e23f8196be1b" +dependencies = [ + "console", + "lazy_static", + "number_prefix", + "regex", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "jobserver" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +dependencies = [ + "libc", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "os_str_bytes" +version = "6.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" + +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core", + "subtle", +] + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "poly1305" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +dependencies = [ + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "polyval" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "regex" +version = "1.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" + +[[package]] +name = "rpassword" +version = "7.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" +dependencies = [ + "libc", + "rtoolbox", + "windows-sys 0.48.0", +] + +[[package]] +name = "rtoolbox" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "textwrap" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "volaris-cli" +version = "0.0.1" +dependencies = [ + "anyhow", + "blake3", + "clap", + "rand", + "rpassword", + "volaris-core", + "volaris-domain", + "zip", +] + +[[package]] +name = "volaris-core" +version = "0.0.1" +dependencies = [ + "aead", + "aes-gcm", + "anyhow", + "argon2", + "balloon-hash", + "blake3", + "chacha20poly1305", + "deoxys", + "indicatif", + "rand", + "zeroize", +] + +[[package]] +name = "volaris-domain" +version = "0.0.1" +dependencies = [ + "blake3", + "rand", + "volaris-core", + "walkdir", + "zip", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +dependencies = [ + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "byteorder", + "crc32fast", + "crossbeam-utils", + "zstd", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.11+zstd.1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75652c55c0b6f3e6f12eb786fe1bc960396bf05a1eb3bf1f3691c3610ac2e6d4" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/crates/volaris-cli/Cargo.toml b/crates/volaris-cli/Cargo.toml index fbe2368..ab3f31e 100644 --- a/crates/volaris-cli/Cargo.toml +++ b/crates/volaris-cli/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.1" authors = ["brxken128 ", "greendoescode "] readme = "README.md" edition = "2021" -description = "Secure, fast and authenticated command-line encryption of files with modern algorithms and an audited encryption backend." +description = "Efficient, robust, and verified command-line file encryption using contemporary algorithms and a audited encryption engine." keywords = ["encryption", "utility", "file", "command-line", "secure"] categories = ["cryptography", "command-line-utilities"] repository = "https://github.com/volar-is/volaris/tree/master/volaris" diff --git a/crates/volaris-cli/LICENSE b/crates/volaris-cli/LICENSE new file mode 100644 index 0000000..38283c6 --- /dev/null +++ b/crates/volaris-cli/LICENSE @@ -0,0 +1,24 @@ +BSD 2-Clause License + +Copyright (c) 2024, brxken128, greendoescode + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. From c5773a77ab51e7fda42955ba6a659a7304a5ca70 Mon Sep 17 00:00:00 2001 From: leo <77177015+greendoescode@users.noreply.github.com> Date: Tue, 25 Jun 2024 22:17:40 +0100 Subject: [PATCH 07/11] feature!: a fuck ton. (#6) * feature!: to be honest, it's a big commit and i've forgotten most of it --- Cargo.lock | 919 ------------------ crates/volaris-cli/Cargo.toml | 6 +- crates/volaris-cli/README.md | 2 +- crates/volaris-cli/src/cli/prompt.rs | 4 +- crates/volaris-cli/src/global/parameters.rs | 4 +- crates/volaris-cli/src/global/states.rs | 4 +- crates/volaris-cli/src/global/structs.rs | 2 +- crates/volaris-cli/src/subcommands/decrypt.rs | 8 +- crates/volaris-cli/src/subcommands/encrypt.rs | 14 +- crates/volaris-cli/src/subcommands/erase.rs | 12 +- crates/volaris-cli/src/subcommands/hashing.rs | 6 +- crates/volaris-cli/src/subcommands/header.rs | 24 +- crates/volaris-cli/src/subcommands/key.rs | 12 +- crates/volaris-cli/src/subcommands/pack.rs | 12 +- crates/volaris-cli/src/subcommands/unpack.rs | 8 +- crates/volaris-core/src/lib.rs | 40 - .../Cargo.toml | 8 +- .../{volaris-core => volaris-crypto}/LICENSE | 0 .../README.md | 16 +- .../src/cipher.rs | 2 +- .../src/header.rs | 4 +- .../src/key.rs | 6 +- crates/volaris-crypto/src/lib.rs | 40 + .../src/primitives.rs | 12 +- .../src/protected.rs | 0 .../src/stream.rs | 4 +- .../src/visual.rs | 2 +- .../src/wordlist.lst | 18 +- crates/volaris-domain/README.md | 1 - .../Cargo.toml | 10 +- crates/volaris-tools/README.md | 23 + .../src/decrypt.rs | 14 +- .../src/encrypt.rs | 14 +- .../src/erase.rs | 0 .../src/erase_dir.rs | 0 .../src/hash.rs | 2 +- .../src/hasher.rs | 0 .../src/header.rs | 0 .../src/header/dump.rs | 2 +- .../src/header/restore.rs | 2 +- .../src/header/strip.rs | 2 +- .../src/key.rs | 16 +- .../src/key/add.rs | 16 +- .../src/key/change.rs | 16 +- .../src/key/delete.rs | 6 +- .../src/key/verify.rs | 6 +- .../src/lib.rs | 21 +- .../src/overwrite.rs | 0 .../src/pack.rs | 10 +- .../src/storage.rs | 0 .../src/unpack.rs | 2 +- .../src/utils.rs | 10 +- .../tests/common.rs | 2 +- .../tests/storage.rs | 2 +- 54 files changed, 230 insertions(+), 1136 deletions(-) delete mode 100644 crates/volaris-core/src/lib.rs rename crates/{volaris-core => volaris-crypto}/Cargo.toml (77%) rename crates/{volaris-core => volaris-crypto}/LICENSE (100%) rename crates/{volaris-core => volaris-crypto}/README.md (79%) rename crates/{volaris-core => volaris-crypto}/src/cipher.rs (99%) rename crates/{volaris-core => volaris-crypto}/src/header.rs (99%) rename crates/{volaris-core => volaris-crypto}/src/key.rs (97%) create mode 100644 crates/volaris-crypto/src/lib.rs rename crates/{volaris-core => volaris-crypto}/src/primitives.rs (91%) rename crates/{volaris-core => volaris-crypto}/src/protected.rs (100%) rename crates/{volaris-core => volaris-crypto}/src/stream.rs (99%) rename crates/{volaris-core => volaris-crypto}/src/visual.rs (91%) rename crates/{volaris-core => volaris-crypto}/src/wordlist.lst (99%) delete mode 100644 crates/volaris-domain/README.md rename crates/{volaris-domain => volaris-tools}/Cargo.toml (71%) create mode 100644 crates/volaris-tools/README.md rename crates/{volaris-domain => volaris-tools}/src/decrypt.rs (96%) rename crates/{volaris-domain => volaris-tools}/src/encrypt.rs (97%) rename crates/{volaris-domain => volaris-tools}/src/erase.rs (100%) rename crates/{volaris-domain => volaris-tools}/src/erase_dir.rs (100%) rename crates/{volaris-domain => volaris-tools}/src/hash.rs (98%) rename crates/{volaris-domain => volaris-tools}/src/hasher.rs (100%) rename crates/{volaris-domain => volaris-tools}/src/header.rs (100%) rename crates/{volaris-domain => volaris-tools}/src/header/dump.rs (95%) rename crates/{volaris-domain => volaris-tools}/src/header/restore.rs (97%) rename crates/{volaris-domain => volaris-tools}/src/header/strip.rs (96%) rename crates/{volaris-domain => volaris-tools}/src/key.rs (90%) rename crates/{volaris-domain => volaris-tools}/src/key/add.rs (86%) rename crates/{volaris-domain => volaris-tools}/src/key/change.rs (86%) rename crates/{volaris-domain => volaris-tools}/src/key/delete.rs (90%) rename crates/{volaris-domain => volaris-tools}/src/key/verify.rs (85%) rename crates/{volaris-domain => volaris-tools}/src/lib.rs (54%) rename crates/{volaris-domain => volaris-tools}/src/overwrite.rs (100%) rename crates/{volaris-domain => volaris-tools}/src/pack.rs (97%) rename crates/{volaris-domain => volaris-tools}/src/storage.rs (100%) rename crates/{volaris-domain => volaris-tools}/src/unpack.rs (99%) rename crates/{volaris-domain => volaris-tools}/src/utils.rs (82%) rename crates/{volaris-domain => volaris-tools}/tests/common.rs (97%) rename crates/{volaris-domain => volaris-tools}/tests/storage.rs (99%) diff --git a/Cargo.lock b/Cargo.lock index 237a2a1..e69de29 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,919 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "aead" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" -dependencies = [ - "crypto-common", - "generic-array", -] - -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - -[[package]] -name = "aes-gcm" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" -dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", - "subtle", -] - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "anyhow" -version = "1.0.86" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" - -[[package]] -name = "argon2" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4ce4441f99dbd377ca8a8f57b698c44d0d6e712d8329b5040da5a64aa1ce73" -dependencies = [ - "base64ct", - "blake2", - "password-hash", -] - -[[package]] -name = "arrayref" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] - -[[package]] -name = "autocfg" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" - -[[package]] -name = "balloon-hash" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fdbafd8c776e0a7c250b5dfaf4723477e0d92b42c5a91ce4e50bd9bb2dcc9a1" -dependencies = [ - "crypto-bigint", - "digest", - "password-hash", -] - -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "blake2" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" -dependencies = [ - "digest", -] - -[[package]] -name = "blake3" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", - "digest", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "cc" -version = "1.0.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c891175c3fb232128f48de6590095e59198bbeb8620c310be349bfc3afd12c7b" -dependencies = [ - "jobserver", - "libc", - "once_cell", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chacha20" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - -[[package]] -name = "chacha20poly1305" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" -dependencies = [ - "aead", - "chacha20", - "cipher", - "poly1305", - "zeroize", -] - -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", - "zeroize", -] - -[[package]] -name = "clap" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" -dependencies = [ - "atty", - "bitflags", - "clap_lex", - "indexmap", - "once_cell", - "strsim", - "termcolor", - "textwrap", -] - -[[package]] -name = "clap_lex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] - -[[package]] -name = "console" -version = "0.15.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "constant_time_eq" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" - -[[package]] -name = "cpufeatures" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" - -[[package]] -name = "crypto-bigint" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "rand_core", - "typenum", -] - -[[package]] -name = "ctr" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher", -] - -[[package]] -name = "deoxys" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00603a49e114bd99d87a4ab8d480f36ecd1451a9d6474f66973d1a829ff77789" -dependencies = [ - "aead", - "aes", - "subtle", - "zeroize", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", - "subtle", -] - -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "ghash" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" -dependencies = [ - "opaque-debug", - "polyval", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown", -] - -[[package]] -name = "indicatif" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d207dc617c7a380ab07ff572a6e52fa202a2a8f355860ac9c38e23f8196be1b" -dependencies = [ - "console", - "lazy_static", - "number_prefix", - "regex", -] - -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", -] - -[[package]] -name = "jobserver" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" -dependencies = [ - "libc", -] - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "libc" -version = "0.2.155" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - -[[package]] -name = "os_str_bytes" -version = "6.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" - -[[package]] -name = "password-hash" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" -dependencies = [ - "base64ct", - "rand_core", - "subtle", -] - -[[package]] -name = "pkg-config" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" - -[[package]] -name = "poly1305" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" -dependencies = [ - "cpufeatures", - "opaque-debug", - "universal-hash", -] - -[[package]] -name = "polyval" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" -dependencies = [ - "cfg-if", - "cpufeatures", - "opaque-debug", - "universal-hash", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "regex" -version = "1.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" - -[[package]] -name = "rpassword" -version = "7.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" -dependencies = [ - "libc", - "rtoolbox", - "windows-sys 0.48.0", -] - -[[package]] -name = "rtoolbox" -version = "0.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" -dependencies = [ - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "universal-hash" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" -dependencies = [ - "crypto-common", - "subtle", -] - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "volaris-cli" -version = "0.0.1" -dependencies = [ - "anyhow", - "blake3", - "clap", - "rand", - "rpassword", - "volaris-core", - "volaris-domain", - "zip", -] - -[[package]] -name = "volaris-core" -version = "0.0.1" -dependencies = [ - "aead", - "aes-gcm", - "anyhow", - "argon2", - "balloon-hash", - "blake3", - "chacha20poly1305", - "deoxys", - "indicatif", - "rand", - "zeroize", -] - -[[package]] -name = "volaris-domain" -version = "0.0.1" -dependencies = [ - "blake3", - "rand", - "volaris-core", - "walkdir", - "zip", -] - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.5", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" -dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" - -[[package]] -name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" - -[[package]] -name = "zip" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" -dependencies = [ - "byteorder", - "crc32fast", - "crossbeam-utils", - "zstd", -] - -[[package]] -name = "zstd" -version = "0.11.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" -dependencies = [ - "libc", - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.11+zstd.1.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75652c55c0b6f3e6f12eb786fe1bc960396bf05a1eb3bf1f3691c3610ac2e6d4" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/crates/volaris-cli/Cargo.toml b/crates/volaris-cli/Cargo.toml index ab3f31e..bfce283 100644 --- a/crates/volaris-cli/Cargo.toml +++ b/crates/volaris-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "volaris-cli" -version = "0.0.1" +version = "0.0.2" authors = ["brxken128 ", "greendoescode "] readme = "README.md" edition = "2021" @@ -19,8 +19,8 @@ maintenance = { status = "actively-developed" } blake3 = "1.3.3" rand = "0.8.5" -domain = { package = "volaris-domain", version = "0.0.1", path = "../volaris-domain" } -core = { package = "volaris-core", path = "../volaris-core", version = "0.0.1" } +tools = { package = "volaris-tools", version = "0.0.1", path = "../volaris-tools" } +corecrypto = { package = "volaris-crypto", path = "../volaris-crypto", version = "0.0.1" } clap = { version = "3.2.21", features = ["cargo"] } anyhow = "1.0.65" diff --git a/crates/volaris-cli/README.md b/crates/volaris-cli/README.md index 9d3dfcd..06a9ba7 100644 --- a/crates/volaris-cli/README.md +++ b/crates/volaris-cli/README.md @@ -1,5 +1,5 @@ # Volaris -![GitHub License](https://img.shields.io/github/license/volarisapp/Volaris) ![GitHub Issues](https://img.shields.io/github/issues/volarisapp/Volaris) ![GitHub Stars](https://img.shields.io/github/stars/volarisapp/Volaris) +![GitHub License](https://img.shields.io/github/license/volar-is/Volaris) ![GitHub Issues](https://img.shields.io/github/issues/volar-is/Volaris) ![GitHub Stars](https://img.shields.io/github/stars/volar-is/Volaris) ## Introduction diff --git a/crates/volaris-cli/src/cli/prompt.rs b/crates/volaris-cli/src/cli/prompt.rs index 1dfbe63..e52a653 100644 --- a/crates/volaris-cli/src/cli/prompt.rs +++ b/crates/volaris-cli/src/cli/prompt.rs @@ -6,8 +6,8 @@ use crate::{ question, warn, }; -use core::protected::Protected; -use core::Zeroize; +use corecrypto::protected::Protected; +use corecrypto::Zeroize; // this handles user-interactivity, specifically getting a "yes" or "no" answer from the user // it requires the question itself, if the default is true/false diff --git a/crates/volaris-cli/src/global/parameters.rs b/crates/volaris-cli/src/global/parameters.rs index 5031df5..c7a42da 100644 --- a/crates/volaris-cli/src/global/parameters.rs +++ b/crates/volaris-cli/src/global/parameters.rs @@ -7,8 +7,8 @@ use crate::global::structs::PackParams; use crate::warn; use anyhow::{Context, Result}; use clap::ArgMatches; -use core::header::{HashingAlgorithm, ARGON2ID_LATEST, BLAKE3BALLOON_LATEST}; -use core::primitives::Algorithm; +use corecrypto::header::{HashingAlgorithm, ARGON2ID_LATEST, BLAKE3BALLOON_LATEST}; +use corecrypto::primitives::Algorithm; use super::states::{Compression, DirectoryMode, Key, KeyParams, PrintMode}; use super::structs::KeyManipulationParams; diff --git a/crates/volaris-cli/src/global/states.rs b/crates/volaris-cli/src/global/states.rs index 8b4ec8c..422f4f7 100644 --- a/crates/volaris-cli/src/global/states.rs +++ b/crates/volaris-cli/src/global/states.rs @@ -4,11 +4,11 @@ use anyhow::{Context, Result}; use clap::ArgMatches; -use core::protected::Protected; +use corecrypto::protected::Protected; use crate::cli::prompt::get_password; use crate::warn; -use core::key::generate_passphrase; +use corecrypto::key::generate_passphrase; #[derive(PartialEq, Eq, Clone, Copy)] pub enum DirectoryMode { diff --git a/crates/volaris-cli/src/global/structs.rs b/crates/volaris-cli/src/global/structs.rs index 15b3638..a4a5002 100644 --- a/crates/volaris-cli/src/global/structs.rs +++ b/crates/volaris-cli/src/global/structs.rs @@ -1,4 +1,4 @@ -use core::header::HashingAlgorithm; +use corecrypto::header::HashingAlgorithm; use crate::global::states::{ForceMode, HashMode}; diff --git a/crates/volaris-cli/src/subcommands/decrypt.rs b/crates/volaris-cli/src/subcommands/decrypt.rs index a413ecd..61c80ae 100644 --- a/crates/volaris-cli/src/subcommands/decrypt.rs +++ b/crates/volaris-cli/src/subcommands/decrypt.rs @@ -7,16 +7,16 @@ use crate::global::structs::CryptoParams; use anyhow::Result; -use domain::storage::Storage; +use tools::storage::Storage; // this function is for decrypting a file in stream mode // it handles any user-facing interactiveness, opening files, or redirecting to memory mode if // the header says so (backwards-compat) // it also manages using a detached header file if selected -// it creates the stream object and uses the convenience function provided by volaris-core +// it creates the stream object and uses the convenience function provided by volaris-crypto pub fn stream_mode(input: &str, output: &str, params: &CryptoParams) -> Result<()> { // TODO: It is necessary to raise it to a higher level - let stor = Arc::new(domain::storage::FileStorage); + let stor = Arc::new(tools::storage::FileStorage); // 1. validate and prepare options if input == output { @@ -41,7 +41,7 @@ pub fn stream_mode(input: &str, output: &str, params: &CryptoParams) -> Result<( .or_else(|_| stor.write_file(output))?; // 2. decrypt file - domain::decrypt::execute(domain::decrypt::Request { + tools::decrypt::execute(tools::decrypt::Request { header_reader: header_file.as_ref().and_then(|h| h.try_reader().ok()), reader: input_file.try_reader()?, writer: output_file.try_writer()?, diff --git a/crates/volaris-cli/src/subcommands/encrypt.rs b/crates/volaris-cli/src/subcommands/encrypt.rs index 792cb5a..87a0164 100644 --- a/crates/volaris-cli/src/subcommands/encrypt.rs +++ b/crates/volaris-cli/src/subcommands/encrypt.rs @@ -2,16 +2,16 @@ use crate::cli::prompt::overwrite_check; use crate::global::states::{EraseMode, HashMode, HeaderLocation, PasswordState}; use crate::global::structs::CryptoParams; use anyhow::Result; -use core::header::{HeaderType, HEADER_VERSION}; -use core::primitives::{Algorithm, Mode}; +use corecrypto::header::{HeaderType, HEADER_VERSION}; +use corecrypto::primitives::{Algorithm, Mode}; use std::process::exit; use std::sync::Arc; -use domain::storage::Storage; +use tools::storage::Storage; // this function is for encrypting a file in stream mode // it handles any user-facing interactiveness, opening files -// it creates the stream object and uses the convenience function provided by volaris-core +// it creates the stream object and uses the convenience function provided by volaris-crypto pub fn stream_mode( input: &str, output: &str, @@ -19,7 +19,7 @@ pub fn stream_mode( algorithm: Algorithm, ) -> Result<()> { // TODO: It is necessary to raise it to a higher level - let stor = Arc::new(domain::storage::FileStorage); + let stor = Arc::new(tools::storage::FileStorage); // 1. validate and prepare options if input == output { @@ -50,7 +50,7 @@ pub fn stream_mode( }; // 2. encrypt file - let req = domain::encrypt::Request { + let req = tools::encrypt::Request { reader: input_file.try_reader()?, writer: output_file.try_writer()?, header_writer: header_file.as_ref().and_then(|f| f.try_writer().ok()), @@ -62,7 +62,7 @@ pub fn stream_mode( }, hashing_algorithm: params.hashing_algorithm, }; - domain::encrypt::execute(req)?; + tools::encrypt::execute(req)?; // 3. flush result if let Some(header_file) = header_file { diff --git a/crates/volaris-cli/src/subcommands/erase.rs b/crates/volaris-cli/src/subcommands/erase.rs index 0437c44..96fa9dd 100644 --- a/crates/volaris-cli/src/subcommands/erase.rs +++ b/crates/volaris-cli/src/subcommands/erase.rs @@ -1,5 +1,5 @@ use anyhow::Result; -use domain::storage::Storage; +use tools::storage::Storage; use std::sync::Arc; use crate::global::states::ForceMode; @@ -12,7 +12,7 @@ use crate::cli::prompt::get_answer; #[allow(clippy::module_name_repetitions)] pub fn secure_erase(input: &str, passes: i32, force: ForceMode) -> Result<()> { // TODO: It is necessary to raise it to a higher level - let stor = Arc::new(domain::storage::FileStorage); + let stor = Arc::new(tools::storage::FileStorage); let file = stor.read_file(input)?; if file.is_dir() @@ -26,17 +26,17 @@ pub fn secure_erase(input: &str, passes: i32, force: ForceMode) -> Result<()> { } if file.is_dir() { - domain::erase_dir::execute( + tools::erase_dir::execute( stor, - domain::erase_dir::Request { + tools::erase_dir::Request { entry: file, passes, }, )?; } else { - domain::erase::execute( + tools::erase::execute( stor, - domain::erase::Request { + tools::erase::Request { path: input, passes, }, diff --git a/crates/volaris-cli/src/subcommands/hashing.rs b/crates/volaris-cli/src/subcommands/hashing.rs index 4d7e4a8..3aa1e15 100644 --- a/crates/volaris-cli/src/subcommands/hashing.rs +++ b/crates/volaris-cli/src/subcommands/hashing.rs @@ -12,9 +12,9 @@ pub fn hash_stream(files: &[String]) -> Result<()> { let mut input_file = std::fs::File::open(input) .with_context(|| format!("Unable to open file: {}", input))?; - let hash = domain::hash::execute( - domain::hasher::Blake3Hasher::default(), - domain::hash::Request { + let hash = tools::hash::execute( + tools::hasher::Blake3Hasher::default(), + tools::hash::Request { reader: RefCell::new(&mut input_file), }, )?; diff --git a/crates/volaris-cli/src/subcommands/header.rs b/crates/volaris-cli/src/subcommands/header.rs index 8314253..5a0c6f2 100644 --- a/crates/volaris-cli/src/subcommands/header.rs +++ b/crates/volaris-cli/src/subcommands/header.rs @@ -6,10 +6,10 @@ use std::{ use crate::cli::prompt::overwrite_check; use crate::global::states::ForceMode; use anyhow::{Context, Result}; -use core::header::HashingAlgorithm; -use core::header::{Header, HeaderVersion}; -use domain::storage::Storage; -use domain::utils::hex_encode; +use corecrypto::header::HashingAlgorithm; +use corecrypto::header::{Header, HeaderVersion}; +use tools::storage::Storage; +use tools::utils::hex_encode; pub fn details(input: &str) -> Result<()> { let mut input_file = @@ -65,7 +65,7 @@ pub fn details(input: &str) -> Result<()> { // it's used for extracting an encrypted file's header for backups and such // it implements a check to ensure the header is valid pub fn dump(input: &str, output: &str, force: ForceMode) -> Result<()> { - let stor = std::sync::Arc::new(domain::storage::FileStorage); + let stor = std::sync::Arc::new(tools::storage::FileStorage); let input_file = stor.read_file(input)?; if !overwrite_check(output, force)? { @@ -76,12 +76,12 @@ pub fn dump(input: &str, output: &str, force: ForceMode) -> Result<()> { .create_file(output) .or_else(|_| stor.write_file(output))?; - let req = domain::header::dump::Request { + let req = tools::header::dump::Request { reader: input_file.try_reader()?, writer: output_file.try_writer()?, }; - domain::header::dump::execute(req)?; + tools::header::dump::execute(req)?; stor.flush_file(&output_file)?; @@ -94,7 +94,7 @@ pub fn dump(input: &str, output: &str, force: ForceMode) -> Result<()> { // this does not work for files encrypted *with* a detached header // it implements a check to ensure the header is valid before restoring to a file pub fn restore(input: &str, output: &str) -> Result<()> { - let stor = std::sync::Arc::new(domain::storage::FileStorage); + let stor = std::sync::Arc::new(tools::storage::FileStorage); let input_file = stor.read_file(input)?; @@ -106,12 +106,12 @@ pub fn restore(input: &str, output: &str) -> Result<()> { .with_context(|| format!("Unable to open output file: {}", output))?, ); - let req = domain::header::restore::Request { + let req = tools::header::restore::Request { reader: input_file.try_reader()?, writer: &output_file, }; - domain::header::restore::execute(req)?; + tools::header::restore::execute(req)?; Ok(()) } @@ -129,11 +129,11 @@ pub fn strip(input: &str) -> Result<()> { .with_context(|| format!("Unable to open input file: {}", input))?, ); - let req = domain::header::strip::Request { + let req = tools::header::strip::Request { handle: &input_file, }; - domain::header::strip::execute(req)?; + tools::header::strip::execute(req)?; Ok(()) } diff --git a/crates/volaris-cli/src/subcommands/key.rs b/crates/volaris-cli/src/subcommands/key.rs index b2e9bc7..ff4c733 100644 --- a/crates/volaris-cli/src/subcommands/key.rs +++ b/crates/volaris-cli/src/subcommands/key.rs @@ -3,8 +3,8 @@ use crate::global::states::Key; use crate::global::states::PasswordState; use crate::global::structs::KeyManipulationParams; use anyhow::{Context, Result}; -use core::header::Header; -use core::header::HeaderVersion; +use corecrypto::header::Header; +use corecrypto::header::HeaderVersion; use std::cell::RefCell; use std::fs::OpenOptions; use std::io::Seek; @@ -45,7 +45,7 @@ pub fn add(input: &str, params: &KeyManipulationParams) -> Result<()> { let raw_key_new = params.key_new.get_secret(&PasswordState::Validate)?; - domain::key::add::execute(domain::key::add::Request { + tools::key::add::execute(tools::key::add::Request { handle: &input_file, hash_algorithm: params.hashing_algorithm, raw_key_old, @@ -89,7 +89,7 @@ pub fn change(input: &str, params: &KeyManipulationParams) -> Result<()> { let raw_key_new = params.key_new.get_secret(&PasswordState::Validate)?; - domain::key::change::execute(domain::key::change::Request { + tools::key::change::execute(tools::key::change::Request { handle: &input_file, hash_algorithm: params.hashing_algorithm, raw_key_old, @@ -127,7 +127,7 @@ pub fn delete(input: &str, key_old: &Key) -> Result<()> { let raw_key_old = key_old.get_secret(&PasswordState::Direct)?; - domain::key::delete::execute(domain::key::delete::Request { + tools::key::delete::execute(tools::key::delete::Request { handle: &input_file, raw_key_old, })?; @@ -162,7 +162,7 @@ pub fn verify(input: &str, key: &Key) -> Result<()> { let raw_key = key.get_secret(&PasswordState::Direct)?; - domain::key::verify::execute(domain::key::verify::Request { + tools::key::verify::execute(tools::key::verify::Request { handle: &input_file, raw_key, })?; diff --git a/crates/volaris-cli/src/subcommands/pack.rs b/crates/volaris-cli/src/subcommands/pack.rs index bea3f2b..594079b 100644 --- a/crates/volaris-cli/src/subcommands/pack.rs +++ b/crates/volaris-cli/src/subcommands/pack.rs @@ -3,8 +3,8 @@ use std::process::exit; use std::sync::Arc; use anyhow::Result; -use core::header::{HeaderType, HEADER_VERSION}; -use core::primitives::{Algorithm, Mode}; +use corecrypto::header::{HeaderType, HEADER_VERSION}; +use corecrypto::primitives::{Algorithm, Mode}; use crate::global::states::{HashMode, HeaderLocation, PasswordState}; use crate::{ @@ -14,7 +14,7 @@ use crate::{ structs::{CryptoParams, PackParams}, }, }; -use domain::storage::Storage; +use tools::storage::Storage; use crate::cli::prompt::overwrite_check; @@ -33,7 +33,7 @@ pub struct Request<'a> { // it erases the temporary archive afterwards, to stop any residual data from remaining pub fn execute(req: &Request) -> Result<()> { // TODO: It is necessary to raise it to a higher level - let stor = Arc::new(domain::storage::FileStorage); + let stor = Arc::new(tools::storage::FileStorage); // 1. validate and prepare options if req.input_file.iter().any(|f| f == req.output_file) { @@ -92,9 +92,9 @@ pub fn execute(req: &Request) -> Result<()> { }; // 2. compress and encrypt files - domain::pack::execute( + tools::pack::execute( stor.clone(), - domain::pack::Request { + tools::pack::Request { compress_files, compression_method, writer: output_file.try_writer()?, diff --git a/crates/volaris-cli/src/subcommands/unpack.rs b/crates/volaris-cli/src/subcommands/unpack.rs index a83ea1a..f308530 100644 --- a/crates/volaris-cli/src/subcommands/unpack.rs +++ b/crates/volaris-cli/src/subcommands/unpack.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use anyhow::Result; -use domain::storage::Storage; +use tools::storage::Storage; use crate::global::{ states::{HeaderLocation, PasswordState, PrintMode}, @@ -24,7 +24,7 @@ pub fn unpack( params: CryptoParams, // params for decrypt function ) -> Result<()> { // TODO: It is necessary to raise it to a higher level - let stor = Arc::new(domain::storage::FileStorage); + let stor = Arc::new(tools::storage::FileStorage); let input_file = stor.read_file(input)?; let header_file = match ¶ms.header_location { @@ -34,9 +34,9 @@ pub fn unpack( let raw_key = params.key.get_secret(&PasswordState::Direct)?; - domain::unpack::execute( + tools::unpack::execute( stor, - domain::unpack::Request { + tools::unpack::Request { header_reader: header_file.as_ref().and_then(|h| h.try_reader().ok()), reader: input_file.try_reader()?, output_dir_path: PathBuf::from(output), diff --git a/crates/volaris-core/src/lib.rs b/crates/volaris-core/src/lib.rs deleted file mode 100644 index f60fba7..0000000 --- a/crates/volaris-core/src/lib.rs +++ /dev/null @@ -1,40 +0,0 @@ -//! ## What is it? -//! -//! Volaris-Core is a library used for managing cryptographic functions and headers that adhere to the Volaris format. -//! -//! ## Security -//! -//! Volaris-Core uses modern, secure and audited1 AEADs for encryption and decryption. -//! -//! You may find the audits for both AES-256-GCM and XChaCha20-Poly1305 on [the NCC Group's website](https://research.nccgroup.com/2020/02/26/public-report-rustcrypto-aes-gcm-and-chacha20poly1305-implementation-review/). -//! -//! 1 Deoxys-II-256 does not have an official audit, so use it at your own risk -//! -//! ## Who uses Volaris-Core? -//! -//! This library is implemented by [Volaris](https://github.com/volar-is/Volaris), a secure multi-interface file -//! encryption utility. -//! -//! Volaris-Core makes it easy to integrate the Volaris format into your own projects (and if there's a feature that you'd like to see, please don't hesitate to [open a Github issue](https://github.com/volar-is/Volaris/issues)). -//! -//! You can read more about Volaris, Volaris-Core and the technical details [in the project's main documentation](https://github.com/volar-is/volaris/readme.md)! -//! -//! ## Thank you! -//! -//! Volaris-Core exclusively uses AEADs provided by the [RustCrypto Team](https://github.com/RustCrypto), so I'd like to give them a huge thank you for their hard work (this wouldn't have been possible without them!) -#![forbid(unsafe_code)] -#![warn(clippy::all)] - -pub const CORE_VERSION: &str = env!("CARGO_PKG_VERSION"); - -pub mod cipher; -pub mod header; -pub mod key; -pub mod primitives; -pub mod protected; -pub mod stream; -pub use aead::Payload; -pub use zeroize::Zeroize; - -#[cfg(feature = "visual")] -pub mod visual; diff --git a/crates/volaris-core/Cargo.toml b/crates/volaris-crypto/Cargo.toml similarity index 77% rename from crates/volaris-core/Cargo.toml rename to crates/volaris-crypto/Cargo.toml index 97aadb0..131ddbf 100644 --- a/crates/volaris-core/Cargo.toml +++ b/crates/volaris-crypto/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "volaris-core" -version = "0.0.1" +name = "volaris-crypto" +version = "0.0.2" edition = "2021" -description = "The core cryptography behind Volaris" +description = "The corecrypto cryptography behind Volaris" readme = "README.md" license = "BSD-2-Clause" authors = ["brxken128 ", "greendoescode "] -homepage = "https://github.com/volarisapp/volaris" +homepage = "https://github.com/volar-is/volaris" [dependencies] anyhow = "1.0.65" diff --git a/crates/volaris-core/LICENSE b/crates/volaris-crypto/LICENSE similarity index 100% rename from crates/volaris-core/LICENSE rename to crates/volaris-crypto/LICENSE diff --git a/crates/volaris-core/README.md b/crates/volaris-crypto/README.md similarity index 79% rename from crates/volaris-core/README.md rename to crates/volaris-crypto/README.md index c213c56..c10ca2c 100644 --- a/crates/volaris-core/README.md +++ b/crates/volaris-crypto/README.md @@ -1,11 +1,11 @@ ## What is it? -Volaris-Core is a library used for managing cryptographic functions and headers +volaris-crypto is a library used for managing cryptographic functions and headers that adhere to the volaris format. ## Security -Volaris-Core uses modern, secure and audited1 AEADs for encryption and +volaris-crypto uses modern, secure and audited1 AEADs for encryption and decryption. You may find the audits for both AES-256-GCM and XChaCha20-Poly1305 on @@ -14,12 +14,12 @@ You may find the audits for both AES-256-GCM and XChaCha20-Poly1305 on 1 Deoxys-II-256 does not have an official audit, so use it at your own risk -## Who uses volaris-Core? +## Who uses volaris-crypto? -This library is implemented by [volaris](https://github.com/volarisapp/volaris), a secure multi-interface file encryption utility. +This library is implemented by [volaris](https://github.com/volar-is/volaris), a secure multi-interface file encryption utility. -Volaris-Core makes it easy to integrate the volaris format into your own projects -(and if there's a feature that you'd like to see, please don't hesitate to [open a Github issue](https://github.com/volarisapp/volaris/issues)). +volaris-crypto makes it easy to integrate the volaris format into your own projects +(and if there's a feature that you'd like to see, please don't hesitate to [open a Github issue](https://github.com/volar-is/volaris/issues)). ## Features @@ -76,11 +76,11 @@ let decrypted_data = cipher.decrypt(&nonce, encrypted_data.as_slice()).unwrap(); assert_eq!(secret, decrypted_data); ``` -You can read more about volaris, Volaris-Core and the technical details [in the project's main documentation](https://github.com/volarisapp/volaris/)! +You can read more about volaris, volaris-crypto and the technical details [in the project's main documentation](https://github.com/volar-is/volaris/)! ## Thank you! -Volaris-Core exclusively uses AEADs provided by the +volaris-crypto exclusively uses AEADs provided by the [RustCrypto Team](https://github.com/RustCrypto), so I'd like to give them a huge thank you for their hard work (this wouldn't have been possible without them!) diff --git a/crates/volaris-core/src/cipher.rs b/crates/volaris-crypto/src/cipher.rs similarity index 99% rename from crates/volaris-core/src/cipher.rs rename to crates/volaris-crypto/src/cipher.rs index 9b1c1e7..668fe7b 100644 --- a/crates/volaris-core/src/cipher.rs +++ b/crates/volaris-crypto/src/cipher.rs @@ -28,7 +28,7 @@ use deoxys::DeoxysII256; use crate::primitives::Algorithm; use crate::protected::Protected; -/// This `enum` defines all possible cipher types, for each AEAD that is supported by `Volaris-core` +/// This `enum` defines all possible cipher types, for each AEAD that is supported by `volaris-crypto` pub enum Ciphers { Aes256Gcm(Box), XChaCha(Box), diff --git a/crates/volaris-core/src/header.rs b/crates/volaris-crypto/src/header.rs similarity index 99% rename from crates/volaris-core/src/header.rs rename to crates/volaris-crypto/src/header.rs index 1d3f9f0..5c78a05 100644 --- a/crates/volaris-core/src/header.rs +++ b/crates/volaris-crypto/src/header.rs @@ -83,7 +83,7 @@ pub struct HeaderType { /// This is the `HeaderType` struct, but in the format of raw bytes /// -/// This does not need to be used outside of this core library +/// This does not need to be used outside of this corecrypto library struct HeaderTag { pub version: [u8; 2], pub algorithm: [u8; 2], @@ -647,7 +647,7 @@ impl Header { /// /// It will return the bytes used for AAD /// - /// You may view more about what is used as AAD [here](https://brxken128.github.io/Volaris/Volaris-core/Headers.html#authenticating-the-header-with-aad-v840). + /// You may view more about what is used as AAD [here](https://brxken128.github.io/Volaris/volaris-crypto/Headers.html#authenticating-the-header-with-aad-v840). pub fn create_aad(&self) -> Result> { let tag = self.get_tag(); match self.header_type.version { diff --git a/crates/volaris-core/src/key.rs b/crates/volaris-crypto/src/key.rs similarity index 97% rename from crates/volaris-core/src/key.rs rename to crates/volaris-crypto/src/key.rs index 6892267..d921319 100644 --- a/crates/volaris-core/src/key.rs +++ b/crates/volaris-crypto/src/key.rs @@ -1,4 +1,4 @@ -//! This module handles key-related functionality within `Volaris-core` +//! This module handles key-related functionality within `volaris-crypto` //! //! It contains methods for `argon2id` and `balloon` hashing, and securely generating a salt //! @@ -25,7 +25,7 @@ use crate::protected::Protected; /// /// `HeaderVersion` is required as the parameters are linked to specific header versions /// -/// It returns a `Protected<[u8; 32]>` - `Protected` wrappers are used for all sensitive information within `Volaris-core` +/// It returns a `Protected<[u8; 32]>` - `Protected` wrappers are used for all sensitive information within `volaris-crypto` /// /// This function ensures that `raw_key` is securely erased from memory once hashed /// @@ -89,7 +89,7 @@ pub fn argon2id_hash( /// /// It's only supported on header versions V4 and above. /// -/// It returns a `Protected<[u8; 32]>` - `Protected` wrappers are used for all sensitive information within `Volaris-core` +/// It returns a `Protected<[u8; 32]>` - `Protected` wrappers are used for all sensitive information within `volaris-crypto` /// /// This function ensures that `raw_key` is securely erased from memory once hashed /// diff --git a/crates/volaris-crypto/src/lib.rs b/crates/volaris-crypto/src/lib.rs new file mode 100644 index 0000000..8df3697 --- /dev/null +++ b/crates/volaris-crypto/src/lib.rs @@ -0,0 +1,40 @@ +//! ## What is it? +//! +//! volaris-crypto is a library used for managing cryptographic functions and headers that adhere to the Volaris format. +//! +//! ## Security +//! +//! volaris-crypto uses modern, secure and audited1 AEADs for encryption and decryption. +//! +//! You may find the audits for both AES-256-GCM and XChaCha20-Poly1305 on [the NCC Group's website](https://research.nccgroup.com/2020/02/26/public-report-rustcrypto-aes-gcm-and-chacha20poly1305-implementation-review/). +//! +//! 1 Deoxys-II-256 does not have an official audit, so use it at your own risk +//! +//! ## Who uses volaris-crypto? +//! +//! This library is implemented by [Volaris](https://github.com/volar-is/Volaris), a secure multi-interface file +//! encryption utility. +//! +//! volaris-crypto makes it easy to integrate the Volaris format into your own projects (and if there's a feature that you'd like to see, please don't hesitate to [open a Github issue](https://github.com/volar-is/Volaris/issues)). +//! +//! You can read more about Volaris, volaris-crypto and the technical details [in the project's main documentation](https://github.com/volar-is/volaris/readme.md)! +//! +//! ## Thank you! +//! +//! volaris-crypto exclusively uses AEADs provided by the [RustCrypto Team](https://github.com/RustCrypto), so I'd like to give them a huge thank you for their hard work (this wouldn't have been possible without them!) +#![forbid(unsafe_code)] +#![warn(clippy::all)] + +pub const CRYPTO_VERSION: &str = env!("CARGO_PKG_VERSION"); + +pub mod cipher; +pub mod header; +pub mod key; +pub mod primitives; +pub mod protected; +pub mod stream; +pub use aead::Payload; +pub use zeroize::Zeroize; + +#[cfg(feature = "visual")] +pub mod visual; diff --git a/crates/volaris-core/src/primitives.rs b/crates/volaris-crypto/src/primitives.rs similarity index 91% rename from crates/volaris-core/src/primitives.rs rename to crates/volaris-crypto/src/primitives.rs index 08c68c9..26b24c5 100644 --- a/crates/volaris-core/src/primitives.rs +++ b/crates/volaris-crypto/src/primitives.rs @@ -1,4 +1,4 @@ -//! This module contains all cryptographic primitives used by `Volaris-core` +//! This module contains all cryptographic primitives used by `volaris-crypto` use crate::protected::Protected; use rand::{prelude::ThreadRng, RngCore}; @@ -15,7 +15,7 @@ pub const MASTER_KEY_LEN: usize = 32; pub const ENCRYPTED_MASTER_KEY_LEN: usize = 48; pub const ALGORITHMS_LEN: usize = 3; -/// This is an `enum` containing all AEADs supported by `Volaris-core` +/// This is an `enum` containing all AEADs supported by `volaris-crypto` #[derive(Copy, Clone, PartialEq, Eq)] pub enum Algorithm { Aes256Gcm, @@ -23,7 +23,7 @@ pub enum Algorithm { DeoxysII256, } -/// This is an array containing all AEADs supported by `Volaris-core`. +/// This is an array containing all AEADs supported by `volaris-crypto`. /// /// It can be used by and end-user application to show a list of AEADs that they may use pub static ALGORITHMS: [Algorithm; ALGORITHMS_LEN] = [ @@ -65,7 +65,7 @@ impl std::fmt::Display for Mode { /// # Examples /// /// ```rust -/// # use Volaris_core::primitives::*; +/// # use Volaris_corecrypto::primitives::*; /// let nonce = gen_nonce(&Algorithm::XChaCha20Poly1305, &Mode::StreamMode); /// ``` /// @@ -106,7 +106,7 @@ pub fn get_nonce_len(algorithm: &Algorithm, mode: &Mode) -> usize { /// # Examples /// /// ```rust -/// # use Volaris_core::primitives::*; +/// # use Volaris_corecrypto::primitives::*; /// let master_key = gen_master_key(); /// ``` /// @@ -124,7 +124,7 @@ pub fn gen_master_key() -> Protected<[u8; MASTER_KEY_LEN]> { /// # Examples /// /// ```rust -/// # use Volaris_core::primitives::*; +/// # use Volaris_corecrypto::primitives::*; /// let salt = gen_salt(); /// ``` /// diff --git a/crates/volaris-core/src/protected.rs b/crates/volaris-crypto/src/protected.rs similarity index 100% rename from crates/volaris-core/src/protected.rs rename to crates/volaris-crypto/src/protected.rs diff --git a/crates/volaris-core/src/stream.rs b/crates/volaris-crypto/src/stream.rs similarity index 99% rename from crates/volaris-core/src/stream.rs rename to crates/volaris-crypto/src/stream.rs index 5692f78..99005ef 100644 --- a/crates/volaris-core/src/stream.rs +++ b/crates/volaris-crypto/src/stream.rs @@ -44,7 +44,7 @@ use crate::protected::Protected; /// This `enum` contains streams for that are used solely for encryption /// -/// It has definitions for all AEADs supported by `Volaris-core` +/// It has definitions for all AEADs supported by `volaris-crypto` pub enum EncryptionStreams { Aes256Gcm(Box>), XChaCha20Poly1305(Box>), @@ -53,7 +53,7 @@ pub enum EncryptionStreams { /// This `enum` contains streams for that are used solely for decryption /// -/// It has definitions for all AEADs supported by `Volaris-core` +/// It has definitions for all AEADs supported by `volaris-crypto` pub enum DecryptionStreams { Aes256Gcm(Box>), XChaCha20Poly1305(Box>), diff --git a/crates/volaris-core/src/visual.rs b/crates/volaris-crypto/src/visual.rs similarity index 91% rename from crates/volaris-core/src/visual.rs rename to crates/volaris-crypto/src/visual.rs index 8ed6584..b174f65 100644 --- a/crates/volaris-core/src/visual.rs +++ b/crates/volaris-crypto/src/visual.rs @@ -1,4 +1,4 @@ -//! This module offers visual functionality within `Volaris-core`. +//! This module offers visual functionality within `volaris-crypto`. //! //! It isn't rather populated, nor does `Volaris` itself use it, but the option is always there. //! diff --git a/crates/volaris-core/src/wordlist.lst b/crates/volaris-crypto/src/wordlist.lst similarity index 99% rename from crates/volaris-core/src/wordlist.lst rename to crates/volaris-crypto/src/wordlist.lst index 0522960..e500e87 100644 --- a/crates/volaris-core/src/wordlist.lst +++ b/crates/volaris-crypto/src/wordlist.lst @@ -1921,7 +1921,7 @@ dollhouse dollop dolly dolphin -domain +tools domelike domestic dominion @@ -2223,7 +2223,7 @@ encircle enclose enclosure encode -encore +encorecrypto encounter encourage encroach @@ -3146,7 +3146,7 @@ happiness happy harbor hardcopy -hardcore +hardcorecrypto hardcover harddisk hardened @@ -4309,7 +4309,7 @@ outrage outrank outreach outright -outscore +outscorecrypto outsell outshine outshoot @@ -5683,11 +5683,11 @@ scoop scooter scope scorch -scorebook -scorecard -scored -scoreless -scorer +scorecryptobook +scorecryptocard +scorecryptod +scorecryptoless +scorecryptor scoring scorn scorpion diff --git a/crates/volaris-domain/README.md b/crates/volaris-domain/README.md deleted file mode 100644 index 6f0449f..0000000 --- a/crates/volaris-domain/README.md +++ /dev/null @@ -1 +0,0 @@ -## Soon \ No newline at end of file diff --git a/crates/volaris-domain/Cargo.toml b/crates/volaris-tools/Cargo.toml similarity index 71% rename from crates/volaris-domain/Cargo.toml rename to crates/volaris-tools/Cargo.toml index 7953122..bac6875 100644 --- a/crates/volaris-domain/Cargo.toml +++ b/crates/volaris-tools/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "volaris-domain" -description = "The libary for the workings of Volaris" -version = "0.0.1" +name = "volaris-tools" +description = "The libary that contains all workings and tools for volaris." +version = "0.0.2" edition = "2021" license = "BSD-2-Clause" keywords = ["encryption", "secure"] categories = ["cryptography", "encoding", "data-structures"] -repository = "https://github.com/volar-is/volaris/tree/master/crates/volaris-domain" +repository = "https://github.com/volar-is/volaris/tree/master/crates/volaris-tools" homepage = "https://github.com/volar-is/volaris" readme = "README.md" authors = ["brxken128 "] @@ -15,7 +15,7 @@ authors = ["brxken128 1 AEADs for encryption and decryption. + + You may find the audits for both AES-256-GCM and XChaCha20-Poly1305 on [the NCC Group's website](https://research.nccgroup.com/2020/02/26/public-report-rustcrypto-aes-gcm-and-chacha20poly1305-implementation-review/). + + 1 Deoxys-II-256 does not have an official audit, so use it at your own risk + + ## Who uses Volaris-Tools? + + This library is implemented by [volaris](https://github.com/volar-is/volaris), a secure command-line file + encryption utility. + + This crate was made to separate the logic away from the end-user application. + + It also allows for more things to be built on top of the corecrypto functionality, such as a GUI application. + + + You can read more about volaris, volaris-crypto, volaris-tools and the technical details [in the project's main documentation](https://github.com/volar-is/volaris/)! diff --git a/crates/volaris-domain/src/decrypt.rs b/crates/volaris-tools/src/decrypt.rs similarity index 96% rename from crates/volaris-domain/src/decrypt.rs rename to crates/volaris-tools/src/decrypt.rs index f55a992..be3c6d7 100644 --- a/crates/volaris-domain/src/decrypt.rs +++ b/crates/volaris-tools/src/decrypt.rs @@ -3,12 +3,12 @@ use std::cell::RefCell; use std::io::{Read, Seek, Write}; -use core::cipher::Ciphers; -use core::header::{Header, HeaderType}; -use core::key::decrypt_master_key; -use core::primitives::Mode; -use core::protected::Protected; -use core::stream::DecryptionStreams; +use corecrypto::cipher::Ciphers; +use corecrypto::header::{Header, HeaderType}; +use corecrypto::key::decrypt_master_key; +use corecrypto::primitives::Mode; +use corecrypto::protected::Protected; +use corecrypto::stream::DecryptionStreams; #[derive(Debug)] pub enum Error { @@ -111,7 +111,7 @@ where let ciphers = Ciphers::initialize(master_key, &header.header_type.algorithm) .map_err(|_| Error::InitializeChiphers)?; - let payload = core::Payload { + let payload = corecrypto::Payload { aad: &aad, msg: &encrypted_data, }; diff --git a/crates/volaris-domain/src/encrypt.rs b/crates/volaris-tools/src/encrypt.rs similarity index 97% rename from crates/volaris-domain/src/encrypt.rs rename to crates/volaris-tools/src/encrypt.rs index 8cac8af..1a3d1b9 100644 --- a/crates/volaris-domain/src/encrypt.rs +++ b/crates/volaris-tools/src/encrypt.rs @@ -3,11 +3,11 @@ use std::cell::RefCell; use std::io::{Read, Seek, Write}; -use core::cipher::Ciphers; -use core::header::{HashingAlgorithm, Header, HeaderType, Keyslot}; -use core::primitives::{Mode, ENCRYPTED_MASTER_KEY_LEN}; -use core::protected::Protected; -use core::stream::EncryptionStreams; +use corecrypto::cipher::Ciphers; +use corecrypto::header::{HashingAlgorithm, Header, HeaderType, Keyslot}; +use corecrypto::primitives::{Mode, ENCRYPTED_MASTER_KEY_LEN}; +use corecrypto::protected::Protected; +use corecrypto::stream::EncryptionStreams; use crate::utils::{gen_master_key, gen_nonce, gen_salt}; @@ -155,8 +155,8 @@ where pub mod tests { use std::io::Cursor; - use core::header::HeaderVersion; - use core::primitives::Algorithm; + use corecrypto::header::HeaderVersion; + use corecrypto::primitives::Algorithm; use super::*; diff --git a/crates/volaris-domain/src/erase.rs b/crates/volaris-tools/src/erase.rs similarity index 100% rename from crates/volaris-domain/src/erase.rs rename to crates/volaris-tools/src/erase.rs diff --git a/crates/volaris-domain/src/erase_dir.rs b/crates/volaris-tools/src/erase_dir.rs similarity index 100% rename from crates/volaris-domain/src/erase_dir.rs rename to crates/volaris-tools/src/erase_dir.rs diff --git a/crates/volaris-domain/src/hash.rs b/crates/volaris-tools/src/hash.rs similarity index 98% rename from crates/volaris-domain/src/hash.rs rename to crates/volaris-tools/src/hash.rs index 35efb7d..f171eca 100644 --- a/crates/volaris-domain/src/hash.rs +++ b/crates/volaris-tools/src/hash.rs @@ -1,6 +1,6 @@ //! This provides functionality for hashing a file with `BLAKE3`, using a stream reader to keep memory usage low. -use core::primitives::BLOCK_SIZE; +use corecrypto::primitives::BLOCK_SIZE; use std::fmt; use std::{ cell::RefCell, diff --git a/crates/volaris-domain/src/hasher.rs b/crates/volaris-tools/src/hasher.rs similarity index 100% rename from crates/volaris-domain/src/hasher.rs rename to crates/volaris-tools/src/hasher.rs diff --git a/crates/volaris-domain/src/header.rs b/crates/volaris-tools/src/header.rs similarity index 100% rename from crates/volaris-domain/src/header.rs rename to crates/volaris-tools/src/header.rs diff --git a/crates/volaris-domain/src/header/dump.rs b/crates/volaris-tools/src/header/dump.rs similarity index 95% rename from crates/volaris-domain/src/header/dump.rs rename to crates/volaris-tools/src/header/dump.rs index e178e83..509c57c 100644 --- a/crates/volaris-domain/src/header/dump.rs +++ b/crates/volaris-tools/src/header/dump.rs @@ -4,7 +4,7 @@ use super::Error; use std::cell::RefCell; use std::io::{Read, Seek, Write}; -use core::header::Header; +use corecrypto::header::Header; pub struct Request<'a, R, W> where diff --git a/crates/volaris-domain/src/header/restore.rs b/crates/volaris-tools/src/header/restore.rs similarity index 97% rename from crates/volaris-domain/src/header/restore.rs rename to crates/volaris-tools/src/header/restore.rs index 517a298..d07a747 100644 --- a/crates/volaris-domain/src/header/restore.rs +++ b/crates/volaris-tools/src/header/restore.rs @@ -4,7 +4,7 @@ use super::Error; use std::cell::RefCell; use std::io::{Read, Seek, Write}; -use core::header::Header; +use corecrypto::header::Header; pub struct Request<'a, R, RW> where diff --git a/crates/volaris-domain/src/header/strip.rs b/crates/volaris-tools/src/header/strip.rs similarity index 96% rename from crates/volaris-domain/src/header/strip.rs rename to crates/volaris-tools/src/header/strip.rs index d4bf5ae..606c7dd 100644 --- a/crates/volaris-domain/src/header/strip.rs +++ b/crates/volaris-tools/src/header/strip.rs @@ -4,7 +4,7 @@ use super::Error; use std::cell::RefCell; use std::io::{Read, Seek, Write}; -use core::header::Header; +use corecrypto::header::Header; pub struct Request<'a, RW> where diff --git a/crates/volaris-domain/src/key.rs b/crates/volaris-tools/src/key.rs similarity index 90% rename from crates/volaris-domain/src/key.rs rename to crates/volaris-tools/src/key.rs index cbe81c2..d59ac7d 100644 --- a/crates/volaris-domain/src/key.rs +++ b/crates/volaris-tools/src/key.rs @@ -1,10 +1,10 @@ -use core::key::vec_to_arr; -use core::primitives::Algorithm; -use core::primitives::ENCRYPTED_MASTER_KEY_LEN; -use core::primitives::MASTER_KEY_LEN; -use core::protected::Protected; -use core::Zeroize; -use core::{cipher::Ciphers, header::Keyslot}; +use corecrypto::key::vec_to_arr; +use corecrypto::primitives::Algorithm; +use corecrypto::primitives::ENCRYPTED_MASTER_KEY_LEN; +use corecrypto::primitives::MASTER_KEY_LEN; +use corecrypto::protected::Protected; +use corecrypto::Zeroize; +use corecrypto::{cipher::Ciphers, header::Keyslot}; pub mod add; pub mod change; @@ -90,7 +90,7 @@ pub fn decrypt_v5_master_key_with_index( impl std::error::Error for Error {} -// TODO(brxken128): make this available in the core +// TODO(brxken128): make this available in the corecrypto pub fn encrypt_master_key( master_key: Protected<[u8; MASTER_KEY_LEN]>, key_new: Protected<[u8; 32]>, diff --git a/crates/volaris-domain/src/key/add.rs b/crates/volaris-tools/src/key/add.rs similarity index 86% rename from crates/volaris-domain/src/key/add.rs rename to crates/volaris-tools/src/key/add.rs index de38725..5932ba9 100644 --- a/crates/volaris-domain/src/key/add.rs +++ b/crates/volaris-tools/src/key/add.rs @@ -3,13 +3,13 @@ use std::io::Seek; use super::Error; -use core::header::HashingAlgorithm; -use core::header::Keyslot; -use core::header::{Header, HeaderVersion}; -use core::primitives::gen_nonce; -use core::primitives::gen_salt; -use core::primitives::Mode; -use core::protected::Protected; +use corecrypto::header::HashingAlgorithm; +use corecrypto::header::Keyslot; +use corecrypto::header::{Header, HeaderVersion}; +use corecrypto::primitives::gen_nonce; +use corecrypto::primitives::gen_salt; +use corecrypto::primitives::Mode; +use corecrypto::protected::Protected; use std::cell::RefCell; use std::io::{Read, Write}; @@ -27,7 +27,7 @@ pub fn execute(req: Request<'_, RW>) -> Result<(), Error> where RW: Read + Write + Seek, { - let (header, _) = core::header::Header::deserialize(&mut *req.handle.borrow_mut()) + let (header, _) = corecrypto::header::Header::deserialize(&mut *req.handle.borrow_mut()) .map_err(|_| Error::HeaderDeserialize)?; if header.header_type.version < HeaderVersion::V5 { diff --git a/crates/volaris-domain/src/key/change.rs b/crates/volaris-tools/src/key/change.rs similarity index 86% rename from crates/volaris-domain/src/key/change.rs rename to crates/volaris-tools/src/key/change.rs index f7624b9..05c0b6d 100644 --- a/crates/volaris-domain/src/key/change.rs +++ b/crates/volaris-tools/src/key/change.rs @@ -3,13 +3,13 @@ use std::io::Seek; use super::Error; -use core::header::HashingAlgorithm; -use core::header::Keyslot; -use core::header::{Header, HeaderVersion}; -use core::primitives::gen_nonce; -use core::primitives::gen_salt; -use core::primitives::Mode; -use core::protected::Protected; +use corecrypto::header::HashingAlgorithm; +use corecrypto::header::Keyslot; +use corecrypto::header::{Header, HeaderVersion}; +use corecrypto::primitives::gen_nonce; +use corecrypto::primitives::gen_salt; +use corecrypto::primitives::Mode; +use corecrypto::protected::Protected; use std::cell::RefCell; use std::io::{Read, Write}; @@ -27,7 +27,7 @@ pub fn execute(req: Request<'_, RW>) -> Result<(), Error> where RW: Read + Write + Seek, { - let (header, _) = core::header::Header::deserialize(&mut *req.handle.borrow_mut()) + let (header, _) = corecrypto::header::Header::deserialize(&mut *req.handle.borrow_mut()) .map_err(|_| Error::HeaderDeserialize)?; if header.header_type.version < HeaderVersion::V5 { diff --git a/crates/volaris-domain/src/key/delete.rs b/crates/volaris-tools/src/key/delete.rs similarity index 90% rename from crates/volaris-domain/src/key/delete.rs rename to crates/volaris-tools/src/key/delete.rs index 5c7c97e..af35f7c 100644 --- a/crates/volaris-domain/src/key/delete.rs +++ b/crates/volaris-tools/src/key/delete.rs @@ -1,8 +1,8 @@ //! This provides functionality for adding a key to a header that both adheres to the volaris format, and is using a version >= V5. use super::Error; -use core::header::{Header, HeaderVersion}; -use core::protected::Protected; +use corecrypto::header::{Header, HeaderVersion}; +use corecrypto::protected::Protected; use std::cell::RefCell; use std::io::Seek; use std::io::{Read, Write}; @@ -19,7 +19,7 @@ pub fn execute(req: Request<'_, RW>) -> Result<(), Error> where RW: Read + Write + Seek, { - let (header, _) = core::header::Header::deserialize(&mut *req.handle.borrow_mut()) + let (header, _) = corecrypto::header::Header::deserialize(&mut *req.handle.borrow_mut()) .map_err(|_| Error::HeaderDeserialize)?; if header.header_type.version < HeaderVersion::V5 { diff --git a/crates/volaris-domain/src/key/verify.rs b/crates/volaris-tools/src/key/verify.rs similarity index 85% rename from crates/volaris-domain/src/key/verify.rs rename to crates/volaris-tools/src/key/verify.rs index f268f02..7ab3b21 100644 --- a/crates/volaris-domain/src/key/verify.rs +++ b/crates/volaris-tools/src/key/verify.rs @@ -3,8 +3,8 @@ use std::io::Seek; use super::Error; -use core::header::HeaderVersion; -use core::protected::Protected; +use corecrypto::header::HeaderVersion; +use corecrypto::protected::Protected; use std::cell::RefCell; use std::io::Read; @@ -20,7 +20,7 @@ pub fn execute(req: Request<'_, R>) -> Result<(), Error> where R: Read + Seek, { - let (header, _) = core::header::Header::deserialize(&mut *req.handle.borrow_mut()) + let (header, _) = corecrypto::header::Header::deserialize(&mut *req.handle.borrow_mut()) .map_err(|_| Error::HeaderDeserialize)?; if header.header_type.version < HeaderVersion::V5 { diff --git a/crates/volaris-domain/src/lib.rs b/crates/volaris-tools/src/lib.rs similarity index 54% rename from crates/volaris-domain/src/lib.rs rename to crates/volaris-tools/src/lib.rs index 0c10760..b863ea8 100644 --- a/crates/volaris-domain/src/lib.rs +++ b/crates/volaris-tools/src/lib.rs @@ -1,35 +1,26 @@ //! ## What is it? //! -//! volaris-Domain is a library used for managing the core logic behind volaris, and any applications that require easy integration with the volaris format. +//! volaris-tools is a library used for managing the corecrypto logic behind volaris, and any applications that require easy integration with the volaris format. //! //! ## Security //! -//! volaris-Domain is built on top of volaris-Core - which uses modern, secure and audited1 AEADs for encryption and decryption. +//! volaris-tools is built on top of volaris-crypto - which uses modern, secure and audited1 AEADs for encryption and decryption. //! //! You may find the audits for both AES-256-GCM and XChaCha20-Poly1305 on [the NCC Group's website](https://research.nccgroup.com/2020/02/26/public-report-rustcrypto-aes-gcm-and-chacha20poly1305-implementation-review/). //! //! 1 Deoxys-II-256 does not have an official audit, so use it at your own risk //! -//! ## Who uses volaris-Domain? +//! ## Who uses Volaris-Tools? //! -//! This library is implemented by [volaris](https://github.com/brxken128/volaris), a secure command-line file +//! This library is implemented by [volaris](https://github.com/volar-is/volaris), a secure command-line file //! encryption utility. //! //! This crate was made to separate the logic away from the end-user application. //! -//! It also allows for more things to be built on top of the core functionality, such as a GUI application. +//! It also allows for more things to be built on top of the corecrypto functionality, such as a GUI application. //! -//! ## Donating //! -//! If you like my work, and want to help support volaris, volaris-Core or volaris-Domain, feel free to donate! This is not necessary by any means, so please don't feel obliged to do so. -//! -//! ```text -//! XMR: 84zSGS18aHtT3CZjZUnnWpCsz1wmA5f65G6BXisbrvAiH7PxZpP8GorbdjAQYRtfeiANZywwUPjZcHu8eXJeWdafJQFK46G -//! BTC: bc1q8x0r7khrfj40qd0zr5xv3t9nl92rz2387pu48u -//! ETH: 0x9630f95F11dFa8703b71DbF746E5c83A31A3F2DD -//! ``` -//! -//! You can read more about volaris, volaris-Core, volaris-Domain and the technical details [in the project's main documentation](https://brxken128.github.io/volaris/)! +//! You can read more about volaris, volaris-crypto, volaris-tools and the technical details [in the project's main documentation](https://github.com/volar-is/volaris/)! //! // lints diff --git a/crates/volaris-domain/src/overwrite.rs b/crates/volaris-tools/src/overwrite.rs similarity index 100% rename from crates/volaris-domain/src/overwrite.rs rename to crates/volaris-tools/src/overwrite.rs diff --git a/crates/volaris-domain/src/pack.rs b/crates/volaris-tools/src/pack.rs similarity index 97% rename from crates/volaris-domain/src/pack.rs rename to crates/volaris-tools/src/pack.rs index 7619b17..1a60a3d 100644 --- a/crates/volaris-domain/src/pack.rs +++ b/crates/volaris-tools/src/pack.rs @@ -8,9 +8,9 @@ use std::cell::RefCell; use std::io::{BufWriter, Read, Seek, Write}; use std::sync::Arc; -use core::header::{HashingAlgorithm, HeaderType}; -use core::primitives::BLOCK_SIZE; -use core::protected::Protected; +use corecrypto::header::{HashingAlgorithm, HeaderType}; +use corecrypto::primitives::BLOCK_SIZE; +use corecrypto::protected::Protected; use zip::write::FileOptions; use crate::storage::Storage; @@ -137,8 +137,8 @@ mod tests { use super::*; use std::io::Read; - use core::header::{HeaderType, HeaderVersion}; - use core::primitives::{Algorithm, Mode}; + use corecrypto::header::{HeaderType, HeaderVersion}; + use corecrypto::primitives::{Algorithm, Mode}; use crate::encrypt::tests::PASSWORD; use crate::storage::{InMemoryStorage, Storage}; diff --git a/crates/volaris-domain/src/storage.rs b/crates/volaris-tools/src/storage.rs similarity index 100% rename from crates/volaris-domain/src/storage.rs rename to crates/volaris-tools/src/storage.rs diff --git a/crates/volaris-domain/src/unpack.rs b/crates/volaris-tools/src/unpack.rs similarity index 99% rename from crates/volaris-domain/src/unpack.rs rename to crates/volaris-tools/src/unpack.rs index 61f3142..009ae31 100644 --- a/crates/volaris-domain/src/unpack.rs +++ b/crates/volaris-tools/src/unpack.rs @@ -9,7 +9,7 @@ use std::sync::Arc; use crate::storage::{self, Storage}; use crate::{decrypt, overwrite}; -use core::protected::Protected; +use corecrypto::protected::Protected; #[derive(Debug)] pub enum Error { diff --git a/crates/volaris-domain/src/utils.rs b/crates/volaris-tools/src/utils.rs similarity index 82% rename from crates/volaris-domain/src/utils.rs rename to crates/volaris-tools/src/utils.rs index 17a2889..f14ce88 100644 --- a/crates/volaris-domain/src/utils.rs +++ b/crates/volaris-tools/src/utils.rs @@ -2,8 +2,8 @@ #[cfg(test)] mod test { - use core::primitives::{get_nonce_len, Algorithm, Mode, MASTER_KEY_LEN, SALT_LEN}; - use core::protected::Protected; + use corecrypto::primitives::{get_nonce_len, Algorithm, Mode, MASTER_KEY_LEN, SALT_LEN}; + use corecrypto::protected::Protected; use rand::{prelude::StdRng, RngCore, SeedableRng}; const SALT_SEED: u64 = 123_456; @@ -49,8 +49,8 @@ pub use test::gen_nonce; pub use test::gen_salt; #[cfg(not(test))] -pub use core::primitives::gen_master_key; +pub use corecrypto::primitives::gen_master_key; #[cfg(not(test))] -pub use core::primitives::gen_nonce; +pub use corecrypto::primitives::gen_nonce; #[cfg(not(test))] -pub use core::primitives::gen_salt; +pub use corecrypto::primitives::gen_salt; diff --git a/crates/volaris-domain/tests/common.rs b/crates/volaris-tools/tests/common.rs similarity index 97% rename from crates/volaris-domain/tests/common.rs rename to crates/volaris-tools/tests/common.rs index 97ac734..5e0c35e 100644 --- a/crates/volaris-domain/tests/common.rs +++ b/crates/volaris-tools/tests/common.rs @@ -1,4 +1,4 @@ -use volaris_domain::storage::{Error, FileStorage, Storage}; +use volaris_tools::storage::{Error, FileStorage, Storage}; use std::fs; use std::io::Write; use std::ops::Deref; diff --git a/crates/volaris-domain/tests/storage.rs b/crates/volaris-tools/tests/storage.rs similarity index 99% rename from crates/volaris-domain/tests/storage.rs rename to crates/volaris-tools/tests/storage.rs index 6588e85..62b65e5 100644 --- a/crates/volaris-domain/tests/storage.rs +++ b/crates/volaris-tools/tests/storage.rs @@ -1,6 +1,6 @@ mod common; use common::*; -use volaris_domain::storage::*; +use volaris_tools::storage::*; use std::fs; use std::io::{Read, Write}; use std::path::PathBuf; From a2e90078526c899803ec025f3edd2459c788fffe Mon Sep 17 00:00:00 2001 From: leo <77177015+greendoescode@users.noreply.github.com> Date: Tue, 25 Jun 2024 22:23:28 +0100 Subject: [PATCH 08/11] fix: 1 --- crates/volaris-cli/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/volaris-cli/Cargo.toml b/crates/volaris-cli/Cargo.toml index bfce283..81abea3 100644 --- a/crates/volaris-cli/Cargo.toml +++ b/crates/volaris-cli/Cargo.toml @@ -19,8 +19,8 @@ maintenance = { status = "actively-developed" } blake3 = "1.3.3" rand = "0.8.5" -tools = { package = "volaris-tools", version = "0.0.1", path = "../volaris-tools" } -corecrypto = { package = "volaris-crypto", path = "../volaris-crypto", version = "0.0.1" } +tools = { package = "volaris-tools", version = "0.0.2", path = "../volaris-tools" } +corecrypto = { package = "volaris-crypto", path = "../volaris-crypto", version = "0.0.2" } clap = { version = "3.2.21", features = ["cargo"] } anyhow = "1.0.65" From 176693f5cf744b4cdd5747479a985c078f581209 Mon Sep 17 00:00:00 2001 From: leo <77177015+greendoescode@users.noreply.github.com> Date: Tue, 25 Jun 2024 22:23:43 +0100 Subject: [PATCH 09/11] fix: 2 --- crates/volaris-tools/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/volaris-tools/Cargo.toml b/crates/volaris-tools/Cargo.toml index bac6875..ea5d6f7 100644 --- a/crates/volaris-tools/Cargo.toml +++ b/crates/volaris-tools/Cargo.toml @@ -15,7 +15,7 @@ authors = ["brxken128 Date: Thu, 27 Jun 2024 11:15:00 +0100 Subject: [PATCH 10/11] chore: slightly change text --- crates/volaris-crypto/README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/crates/volaris-crypto/README.md b/crates/volaris-crypto/README.md index c10ca2c..0977a31 100644 --- a/crates/volaris-crypto/README.md +++ b/crates/volaris-crypto/README.md @@ -76,11 +76,7 @@ let decrypted_data = cipher.decrypt(&nonce, encrypted_data.as_slice()).unwrap(); assert_eq!(secret, decrypted_data); ``` -You can read more about volaris, volaris-crypto and the technical details [in the project's main documentation](https://github.com/volar-is/volaris/)! - ## Thank you! -volaris-crypto exclusively uses AEADs provided by the -[RustCrypto Team](https://github.com/RustCrypto), so I'd like to give them a -huge thank you for their hard work (this wouldn't have been possible without -them!) +volaris-crypto uses AEADs provided by the +[RustCrypto Team](https://github.com/RustCrypto) From 175b4573f297169e7c576784d87f9a723d0e800e Mon Sep 17 00:00:00 2001 From: leo <77177015+greendoescode@users.noreply.github.com> Date: Thu, 27 Jun 2024 11:16:32 +0100 Subject: [PATCH 11/11] chore: refactor readme --- crates/volaris-tools/README.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/crates/volaris-tools/README.md b/crates/volaris-tools/README.md index 0567d19..09c0974 100644 --- a/crates/volaris-tools/README.md +++ b/crates/volaris-tools/README.md @@ -1,6 +1,6 @@ ## What is it? - volaris-tools is a library used for managing the corecrypto logic behind volaris, and any applications that require easy integration with the volaris format. + volaris-tools is a library used for managing the core logic behind volaris, and any applications that require easy integration with the volaris format. ## Security @@ -12,12 +12,7 @@ ## Who uses Volaris-Tools? - This library is implemented by [volaris](https://github.com/volar-is/volaris), a secure command-line file + This library is implemented by [volaris](https://github.com/volar-is/volaris), a secure file encryption utility. - This crate was made to separate the logic away from the end-user application. - - It also allows for more things to be built on top of the corecrypto functionality, such as a GUI application. - - - You can read more about volaris, volaris-crypto, volaris-tools and the technical details [in the project's main documentation](https://github.com/volar-is/volaris/)! + This crate was made to separate the logic away from the end-user application. \ No newline at end of file