├── .gitignore ├── examples ├── ios │ ├── src │ │ └── lib.rs │ ├── Cargo.toml │ └── Cargo.lock ├── mobile_tests │ ├── Cargo.toml │ ├── src │ │ └── lib.rs │ └── Cargo.lock └── android │ ├── Cargo.toml │ └── src │ └── lib.rs ├── src ├── key.rs ├── secure_environment.rs ├── lib.rs ├── error.rs ├── jni_tokens.rs ├── ios.rs └── android.rs ├── makefile ├── .github └── workflows │ ├── cd.yml │ ├── android_test.sh │ └── ci.yml ├── SECURITY.md ├── CONTRIBUTING.md ├── Cargo.toml ├── README.md ├── CODE_OF_CONDUCT.md ├── LICENSE └── Cargo.lock /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | .DS_Store 3 | *.js 4 | -------------------------------------------------------------------------------- /examples/ios/src/lib.rs: -------------------------------------------------------------------------------- 1 | use mobile_tests::run_tests; 2 | 3 | #[no_mangle] 4 | pub extern "C" fn main_rs() { 5 | run_tests(); 6 | } 7 | -------------------------------------------------------------------------------- /src/key.rs: -------------------------------------------------------------------------------- 1 | use crate::error::SecureEnvResult; 2 | 3 | pub trait KeyOps { 4 | fn get_public_key(&self) -> SecureEnvResult>; 5 | 6 | fn sign(&self, msg: &[u8]) -> SecureEnvResult>; 7 | } 8 | -------------------------------------------------------------------------------- /src/secure_environment.rs: -------------------------------------------------------------------------------- 1 | use crate::{error::SecureEnvResult, key::KeyOps}; 2 | 3 | pub trait SecureEnvironmentOps { 4 | fn generate_keypair(id: impl Into, backed_by_biometrics: bool) -> SecureEnvResult; 5 | 6 | fn get_keypair_by_id(id: impl Into) -> SecureEnvResult; 7 | } 8 | -------------------------------------------------------------------------------- /examples/mobile_tests/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "mobile_tests" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | uuid = { version = "1.7.0", features = ["v4", "fast-rng"] } 8 | secure-env = { package = "animo-secure-env", path = "../..", features = ["android_testing"] } 9 | askar-crypto = "0.3.1" 10 | p256 = "0.13.2" 11 | -------------------------------------------------------------------------------- /examples/ios/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "ios" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [lib] 7 | crate-type = ["staticlib"] 8 | 9 | [package.metadata.ios] 10 | build_targets = ["aarch64-apple-ios-sim", "aarch64-apple-ios", "x86_64-apple-ios"] 11 | deployment_target = "17.0" 12 | bundle_id_prefix = "id.animo" 13 | dependencies = ["Security.framework"] 14 | 15 | [dependencies] 16 | mobile_tests = { path = "../mobile_tests" } 17 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | #[cfg(not(any(target_os = "android", target_os = "ios")))] 2 | compile_error!("Only Android and iOS are supported targets"); 3 | 4 | pub mod error; 5 | 6 | mod key; 7 | pub use key::*; 8 | 9 | mod secure_environment; 10 | pub use secure_environment::*; 11 | 12 | #[cfg(target_os = "ios")] 13 | mod ios; 14 | #[cfg(target_os = "ios")] 15 | pub use ios::*; 16 | 17 | #[cfg(target_os = "android")] 18 | mod android; 19 | #[cfg(target_os = "android")] 20 | pub use android::*; 21 | 22 | #[cfg(target_os = "android")] 23 | mod jni_tokens; 24 | -------------------------------------------------------------------------------- /makefile: -------------------------------------------------------------------------------- 1 | run-android: build-android-library 2 | cargo apk run --manifest-path ./examples/android/Cargo.toml 3 | 4 | build-android-library: 5 | cargo ndk -t arm64-v8a build --features=android_testing 6 | 7 | build-android: build-android-library 8 | cargo apk build --manifest-path ./examples/android/Cargo.toml 9 | 10 | test: test-ios test-android 11 | 12 | test-android: 13 | cargo ndk -t arm64-v8a build --features=android_testing 14 | (cd examples/android && cargo apk run) 15 | 16 | test-ios: 17 | (cd examples/ios && cargo xcodebuild b && cargo xcodebuild o) 18 | -------------------------------------------------------------------------------- /.github/workflows/cd.yml: -------------------------------------------------------------------------------- 1 | name: Crates.io Release 2 | 3 | env: 4 | RUST_VERSION: "1.74" 5 | 6 | on: 7 | workflow_dispatch: 8 | 9 | jobs: 10 | release-crates: 11 | name: Release crates.io 12 | runs-on: macos-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v4 16 | 17 | - name: Install Rust Toolchain 18 | uses: dtolnay/rust-toolchain@stable 19 | with: 20 | toolchain: ${{ env.RUST_VERSION }} 21 | targets: aarch64-apple-ios 22 | 23 | - run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --target=aarch64-apple-ios 24 | -------------------------------------------------------------------------------- /examples/android/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "android" 3 | version = "0.1.0" 4 | edition = "2021" 5 | publish = false 6 | 7 | [package.metadata.android] 8 | package = "id.animo.example.android" 9 | 10 | [package.metadata.android.sdk] 11 | min_sdk_version = 16 12 | target_sdk_version = 33 13 | 14 | [lib] 15 | name = "android" 16 | crate-type = ["cdylib"] 17 | 18 | [dependencies] 19 | mobile_tests = { path = "../mobile_tests" } 20 | android-activity = { version = "=0.5.0-beta.0", features = ["native-activity"] } 21 | android_logger = "0.13.2" 22 | jni = { version = "0.21.1", features = ["invocation"] } 23 | log = "0.4.20" 24 | ndk-context = "0.1.1" 25 | lazy_static = "1.4.0" 26 | -------------------------------------------------------------------------------- /.github/workflows/android_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | adb uninstall id.animo.example.android || true 4 | adb install -r "$1" 5 | adb logcat -c 6 | adb shell am start -a android.intent.action.MAIN -n "id.animo.example.android/android.app.NativeActivity" 7 | 8 | sleep 10 9 | 10 | LOG=$(adb logcat -d RustStdoutStderr:D '*:S') 11 | HAS_STARTED=$(echo $LOG | grep 'RustStdoutStderr') 12 | HAS_ERROR=$(echo $LOG | grep 'panicked') 13 | 14 | if [ -n "$HAS_STARTED" ]; then 15 | echo "App running" 16 | else 17 | echo "::error:: App not running" 18 | exit 1 19 | fi 20 | 21 | if [ -n "$HAS_ERROR" ]; then 22 | echo $LOG 23 | echo "::error:: Rust panicked! Tests failed. Logs will be uploaded" 24 | exit 1 25 | else 26 | echo "::success:: All tests passed!" 27 | exit 0 28 | fi 29 | 30 | exit 0 31 | -------------------------------------------------------------------------------- /examples/android/src/lib.rs: -------------------------------------------------------------------------------- 1 | use android_activity::AndroidApp; 2 | use mobile_tests::run_tests; 3 | 4 | use jni::{JavaVM, JNIEnv, objects::JClass, sys::jobject}; 5 | 6 | extern "system" { 7 | fn Java_id_animo_SecureEnvironment_set_1env<'local>(env: JNIEnv<'local>, _class: JClass<'local>); 8 | } 9 | 10 | #[no_mangle] 11 | fn android_main(app: AndroidApp) { 12 | // Since we cannot use the jvm pointer set by `android_activity` we manually call the exposed 13 | // method with a null pointer for a class (as it is not used anyways) and the jni env we 14 | // receive from the `app`. 15 | let jvm = unsafe { JavaVM::from_raw(app.vm_as_ptr() as *mut _) }.unwrap(); 16 | let env = unsafe { JNIEnv::from_raw(jvm.attach_current_thread().unwrap().get_raw()) }.unwrap(); 17 | let clazz = unsafe { JClass::from_raw(std::ptr::null::() as *mut _) }; 18 | unsafe { Java_id_animo_SecureEnvironment_set_1env(env, clazz) }; 19 | 20 | run_tests(); 21 | } 22 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | | Version | Supported | 6 | | ------- | --------- | 7 | | 1.x.x | yes | 8 | 9 | ## Reporting a Vulnerability 10 | 11 | We take the security of our project seriously. If you have discovered a 12 | security vulnerability, we appreciate your help in disclosing it to us in a 13 | responsible manner. 14 | 15 | Please report any security vulnerabilities by sending an email to 16 | [sliedrecht@berend.io](mailto:sliedrecht@berend.io). 17 | 18 | We will acknowledge receipt of your vulnerability report, commence an 19 | investigation, and work on a fix. 20 | 21 | ### Response Timeline: 22 | 23 | - Within 1-2 days: Acknowledge the report. 24 | - Within 7-10 days: Confirm the vulnerability and determine its impact. 25 | - Within 14-30 days: Patch the vulnerability, release an update, and publish a security advisory if necessary. 26 | 27 | Please refrain from publicly disclosing the vulnerability until we have addressed it. 28 | 29 | Thank you for helping to keep our project and its users safe. 30 | -------------------------------------------------------------------------------- /src/error.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug, thiserror::Error)] 2 | pub enum SecureEnvError { 3 | #[error("Unable to generate key. Additional Info: {0}")] 4 | UnableToGenerateKey(String), 5 | 6 | #[error("Unable to get keypair by id. Additional Info: {0}")] 7 | UnableToGetKeyPairById(String), 8 | 9 | #[error("Unable to create signature. Additional info: {0}")] 10 | UnableToCreateSignature(String), 11 | 12 | #[error("Unable to get public key. Additional info: {0}")] 13 | UnableToGetPublicKey(String), 14 | 15 | #[cfg(target_os = "android")] 16 | #[error("Unable to attach JVM to thread. Additional info: {0}")] 17 | UnableToAttachJVMToThread(String), 18 | 19 | #[cfg(target_os = "android")] 20 | #[error("Unable to create java value. Additional info: {0}")] 21 | UnableToCreateJavaValue(String), 22 | 23 | #[cfg(target_os = "android")] 24 | #[error("Device does not support hardware backed keys. Additional info: {0}")] 25 | HardwareBackedKeysAreNotSupported(String), 26 | } 27 | 28 | pub type SecureEnvResult = std::result::Result; 29 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## How to contribute 2 | 3 | You are encouraged to contribute to the repository by **forking and submitting a pull request**. 4 | 5 | For significant changes, please open an issue first to discuss the proposed changes to avoid re-work. 6 | 7 | (If you are new to GitHub, you might start with a [basic tutorial](https://help.github.com/articles/set-up-git) and check out a more detailed guide to [pull requests](https://help.github.com/articles/using-pull-requests/).) 8 | 9 | Pull requests will be evaluated by the repository guardians on a schedule and if deemed beneficial will be committed to the master. Pull requests should have a descriptive name and include an summary of all changes made in the pull request description. 10 | 11 | If you would like to propose a significant change, please open an issue first to discuss the work with the community. 12 | 13 | All contributors retain the original copyright to their stuff, but by contributing to this project, you grant a world-wide, royalty-free, perpetual, irrevocable, non-exclusive, transferable license to all users **under the terms of the license under which this project is distributed.** 14 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "animo-secure-env" 3 | version = "0.5.0" 4 | edition = "2021" 5 | rust-version = "1.67" 6 | license = "Apache-2.0" 7 | authors = ["Berend Sliedrecht "] 8 | description = "secure-env is a wrapper library around the Android KeyStore and the iOS Security Framework for key creation and sign operations using the Secure Element" 9 | repository = "https://github.com/animo/secure-env" 10 | keywords = ["cryptography", "hsm", "security", "keystore", "security-framework"] 11 | categories = ["cryptography"] 12 | 13 | [package.metadata.docs.rs] 14 | targets = [ 15 | "aarch64-apple-ios", 16 | "aarch64-apple-ios-sim", 17 | "x86_64-apple-ios", 18 | "aarch64-linux-android", 19 | "x86_64-linux-android", 20 | "armv7-linux-androideabi", 21 | "i686-linux-android" 22 | ] 23 | 24 | [badges] 25 | maintenance = { status = "actively-developed" } 26 | 27 | [lib] 28 | crate-type = ["cdylib", "rlib"] 29 | name = "secure_env" 30 | 31 | [features] 32 | default = [] 33 | android_testing = [] 34 | 35 | [target.'cfg(target_os = "ios")'.dependencies] 36 | security-framework = { version = "2.11.1", features = ["OSX_10_13"] } 37 | 38 | [target.'cfg(target_os = "android")'.dependencies] 39 | jni = { version = "0.21.1", features = ["invocation"] } 40 | lazy_static = "1.4.0" 41 | paste = "1.0.15" 42 | x509-parser = "0.16.0" 43 | libc = "0.2.155" 44 | ndk-context = "0.1.1" 45 | ndk-sys = "0.6.0" 46 | 47 | [dependencies] 48 | p256 = { version = "0.13.2", features = ["ecdsa-core"] } 49 | thiserror = "1.0.60" 50 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Secure Element Library for Android and iOS 2 | 3 | `secure-env` is a library that allows for key generation and signature creation using the mobile secure element. 4 | 5 | ## Supported targets 6 | 7 | - `aarch64-apple-ios` 8 | - `aarch64-apple-ios-sim` 9 | - `x86_64-apple-ios` 10 | - `aarch64-linux-android` 11 | - `armv7-linux-androideabi` 12 | - `i686-linux-android` 13 | - `x86_64-linux-android` 14 | 15 | ## iOS 16 | 17 | iOS bindings are done via [security-framework](https://github.com/kornelski/rust-security-framework). This is a safe wrapper around [Apple's security.framework](https://developer.apple.com/documentation/security). 18 | 19 | ## Android 20 | 21 | Android bindings are done via [jni-rs](https://github.com/jni-rs/jni-rs). It was discussed to use do this via IPC (Binder) or HIDL, but jni was chosen for its similicity and available documentation. 22 | 23 | Beneath these bindings it fully relies on `KeyStore`. During key generation, based on the support version, `setIsStrongBoxBacked` is set to make sure the key is store in hardware. If this is not supported we fall back to a lower level of security `setUserPresenceRequired`. 24 | 25 | > NOTE: there still needs to be some additional research done into the exact garantuees that `setUserPresenceRequired` provides. If it means TEE, it is all good. 26 | 27 | ### Additional setup 28 | 29 | Due to time constraints, currently some additional setup is required for Android to fully work. This has to do with accessing the JVM pointer from Rust. If something like [android_activity](https://github.com/rust-mobile/android-activity) is used, take a look at the [android example](./examples/android/src/lib.rs). If this library is used from a React Native context, or native Android app, include the following in your project: 30 | 31 | ```java 32 | package id.animo; 33 | 34 | public class SecureEnvironment { 35 | static { 36 | System.loadLibrary("secure_env"); 37 | } 38 | 39 | 40 | public static native void set_env(); 41 | } 42 | 43 | ``` 44 | 45 | Afterwards, you can call `SecureEnvironment.set_env` before making any calls to the library. Afterwards everything should be set up properly. 46 | 47 | ## Features 48 | 49 | | | ios | android | 50 | | ----------------- | --- | ------- | 51 | | generate keypair | ✅ | ✅ | 52 | | get keypair by id | ✅ | ✅ | 53 | | get public key | ✅ | ✅ | 54 | | sign | ✅ | ✅ | 55 | 56 | ## Usage 57 | 58 | Add the dependency 59 | 60 | ```console 61 | cargo add secure-env 62 | ``` 63 | 64 | ```rust 65 | // src/main.rs 66 | use secure_env::{SecureEnvironment, SecureEnvironmentOps, Key, KeyOps}; 67 | 68 | fn main() { 69 | let key = SecureEnvironment::generate_keypair("my-key-id").unwrap(); 70 | let key_from_id = SecureEnvironment::get_keypair_by_id("my-key-id").unwrap(); 71 | 72 | let msg = b"Hello World!"; 73 | 74 | let public_key = key.get_public_key().unwrap(); 75 | let signature = key.sign(msg).unwrap(); 76 | 77 | assert!(public_key.len(), 33); 78 | assert!(signature.len(), 64); 79 | } 80 | ``` 81 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, 8 | body size, disability, ethnicity, gender identity and expression, level of 9 | experience, nationality, personal appearance, race, religion, or sexual 10 | identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | - Using welcoming and inclusive language 18 | - Being respectful of differing viewpoints and experiences 19 | - Gracefully accepting constructive criticism 20 | - Focusing on what is best for the community 21 | - Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | - The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | - Trolling, insulting/derogatory comments, and personal or political attacks 28 | - Public or private harassment 29 | - Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | - Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an 52 | appointed representative at an online or offline event. Representation of a 53 | project may be further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | All complaints will be reviewed and investigated and will result in a response 58 | that is deemed necessary and appropriate to the circumstances. The project team 59 | is obligated to maintain confidentiality with regard to the reporter of an 60 | incident. Further details of specific enforcement policies may be posted 61 | separately. 62 | 63 | Project maintainers who do not follow or enforce the Code of Conduct in good 64 | faith may face temporary or permanent repercussions as determined by other 65 | members of the project's leadership. 66 | 67 | ## Attribution 68 | 69 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 70 | version 1.4, available at 71 | [http://contributor-covenant.org/version/1/4][version] 72 | 73 | [homepage]: http://contributor-covenant.org [version]: 74 | http://contributor-covenant.org/version/1/4/ 75 | -------------------------------------------------------------------------------- /examples/mobile_tests/src/lib.rs: -------------------------------------------------------------------------------- 1 | use askar_crypto::{alg::p256::P256KeyPair, repr::KeyPublicBytes}; 2 | use secure_env::{KeyOps, SecureEnvironment, SecureEnvironmentOps}; 3 | use std::{ 4 | panic::catch_unwind, 5 | process::exit, 6 | ptr::{addr_of, null}, 7 | }; 8 | use uuid::Uuid; 9 | 10 | macro_rules! run_tests { 11 | ($($test:ident),*) => { 12 | $( 13 | let result = catch_unwind(|| { 14 | $test(); 15 | }); 16 | let test_name = stringify!($test); 17 | match result { 18 | Ok(_) => { 19 | println!("{test_name} passed!"); 20 | } 21 | Err(e) => { 22 | eprintln!("{test_name} failed!"); 23 | eprintln!("{e:?}"); 24 | exit(1) 25 | } 26 | } 27 | )* 28 | } 29 | } 30 | 31 | pub fn run_tests() { 32 | run_tests!( 33 | test_generate_keypair, 34 | test_get_keypair_by_id, 35 | test_get_public_key, 36 | test_generate_and_sign, 37 | test_generate_and_sign_and_verify_with_askar, 38 | 39 | test_get_by_id_and_get_public_key, 40 | test_get_by_id_and_sign, 41 | test_get_by_id_and_sign_and_verify_with_askar 42 | ); 43 | } 44 | 45 | fn test_generate_keypair() { 46 | let id = Uuid::new_v4(); 47 | let key = SecureEnvironment::generate_keypair(id, false).unwrap(); 48 | 49 | assert!((addr_of!(key) != null())); 50 | } 51 | 52 | fn test_get_keypair_by_id() { 53 | let id = Uuid::new_v4(); 54 | 55 | SecureEnvironment::generate_keypair(id, false).unwrap(); 56 | let key = SecureEnvironment::get_keypair_by_id(id).unwrap(); 57 | 58 | assert!((addr_of!(key) != null())); 59 | } 60 | 61 | fn test_get_public_key() { 62 | let id = Uuid::new_v4(); 63 | let key = SecureEnvironment::generate_keypair(id, false).unwrap(); 64 | 65 | let public_key = key.get_public_key().unwrap(); 66 | 67 | assert_eq!(public_key.len(), 33); 68 | } 69 | 70 | fn test_get_by_id_and_get_public_key() { 71 | let id = Uuid::new_v4(); 72 | 73 | SecureEnvironment::generate_keypair(id, false).unwrap(); 74 | let key = SecureEnvironment::get_keypair_by_id(id).unwrap(); 75 | 76 | let public_key = key.get_public_key().unwrap(); 77 | 78 | assert!(p256::PublicKey::from_sec1_bytes(&public_key).is_ok()); 79 | assert_eq!(public_key.len(), 33); 80 | } 81 | 82 | fn test_generate_and_sign() { 83 | let id = Uuid::new_v4(); 84 | let key = SecureEnvironment::generate_keypair(id,false).unwrap(); 85 | let msg = b"Hello World!"; 86 | 87 | let signature = key.sign(msg).unwrap(); 88 | 89 | assert!(p256::ecdsa::Signature::from_slice(&signature).is_ok()); 90 | assert_eq!(signature.len(), 64); 91 | } 92 | 93 | fn test_get_by_id_and_sign() { 94 | let id = Uuid::new_v4(); 95 | SecureEnvironment::generate_keypair(id,false).unwrap(); 96 | let key = SecureEnvironment::get_keypair_by_id(id).unwrap(); 97 | let msg = b"Hello World!"; 98 | 99 | let signature = key.sign(msg).unwrap(); 100 | 101 | 102 | assert_eq!(signature.len(), 64); 103 | } 104 | 105 | fn test_generate_and_sign_and_verify_with_askar() { 106 | let id = Uuid::new_v4(); 107 | let key = SecureEnvironment::generate_keypair(id,false).unwrap(); 108 | let public_key = key.get_public_key().unwrap(); 109 | let msg = b"Hello World!"; 110 | 111 | let signature = key.sign(msg).unwrap(); 112 | 113 | let keypair = P256KeyPair::from_public_bytes(&public_key).unwrap(); 114 | 115 | let is_valid = keypair.verify_signature(msg, &signature); 116 | 117 | assert!(is_valid); 118 | 119 | } 120 | 121 | fn test_get_by_id_and_sign_and_verify_with_askar() { 122 | let id = Uuid::new_v4(); 123 | SecureEnvironment::generate_keypair(id,false).unwrap(); 124 | let key = SecureEnvironment::get_keypair_by_id(id).unwrap(); 125 | let public_key = key.get_public_key().unwrap(); 126 | let msg = b"Hello World!"; 127 | 128 | let signature = key.sign(msg).unwrap(); 129 | 130 | let keypair = P256KeyPair::from_public_bytes(&public_key).unwrap(); 131 | 132 | let is_valid = keypair.verify_signature(msg, &signature); 133 | 134 | assert!(is_valid); 135 | 136 | } 137 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Check 2 | 3 | on: 4 | pull_request: 5 | push: 6 | branches: 7 | - main 8 | 9 | env: 10 | RUST_VERSION: "1.68" 11 | 12 | jobs: 13 | format: 14 | name: Format 15 | 16 | runs-on: ubuntu-latest 17 | 18 | steps: 19 | - uses: actions/checkout@v4 20 | - name: Install Rust Toolchain 21 | uses: dtolnay/rust-toolchain@stable 22 | with: 23 | components: rustfmt 24 | 25 | - name: Cache cargo resources 26 | uses: Swatinem/rust-cache@v2 27 | with: 28 | shared-key: deps 29 | cache-on-failure: true 30 | 31 | - run: cargo fmt --all -- --check 32 | 33 | clippy: 34 | name: Clippy 35 | 36 | strategy: 37 | matrix: 38 | include: 39 | - target: aarch64-linux-android 40 | runner: ubuntu-latest 41 | - target: aarch64-apple-ios 42 | runner: macos-latest 43 | 44 | runs-on: ${{ matrix.runner }} 45 | 46 | steps: 47 | - uses: actions/checkout@v4 48 | - name: Install Rust Toolchain 49 | uses: dtolnay/rust-toolchain@stable 50 | with: 51 | toolchain: ${{ env.RUST_VERSION }} 52 | targets: ${{ matrix.target }} 53 | components: clippy 54 | 55 | - name: Cache cargo resources 56 | uses: Swatinem/rust-cache@v2 57 | with: 58 | shared-key: deps 59 | cache-on-failure: true 60 | 61 | - run: cargo clippy --target=${{ matrix.target }} 62 | 63 | audit: 64 | name: Audit 65 | 66 | runs-on: ubuntu-latest 67 | 68 | steps: 69 | - uses: actions/checkout@v4 70 | - name: Install Rust Toolchain 71 | uses: dtolnay/rust-toolchain@stable 72 | 73 | - name: Cache cargo resources 74 | uses: Swatinem/rust-cache@v2 75 | with: 76 | shared-key: deps 77 | cache-on-failure: true 78 | 79 | - run: cargo audit 80 | 81 | check: 82 | name: Check 83 | 84 | strategy: 85 | matrix: 86 | include: 87 | - target: aarch64-linux-android 88 | runner: macos-latest 89 | - target: aarch64-apple-ios 90 | runner: macos-latest 91 | 92 | runs-on: ${{ matrix.runner }} 93 | 94 | steps: 95 | - uses: actions/checkout@v4 96 | - name: Install Rust Toolchain 97 | uses: dtolnay/rust-toolchain@stable 98 | with: 99 | toolchain: ${{ env.RUST_VERSION }} 100 | targets: ${{ matrix.target }} 101 | 102 | - name: Cache cargo resources 103 | uses: Swatinem/rust-cache@v2 104 | with: 105 | shared-key: deps 106 | cache-on-failure: true 107 | 108 | - run: cargo check --target=${{ matrix.target }} 109 | 110 | test-android: 111 | name: Test Android 112 | 113 | # Using macos runner for hardware acceleration 114 | runs-on: macos-13 115 | 116 | env: 117 | # rust version 1.74 is required here due to cargo-apk -> clap-rs 118 | RUST_VERSION: "1.74" 119 | 120 | steps: 121 | - uses: actions/checkout@v4 122 | 123 | - name: Install Rust Toolchain 124 | uses: dtolnay/rust-toolchain@stable 125 | with: 126 | toolchain: ${{ env.RUST_VERSION }} 127 | targets: x86_64-linux-android 128 | 129 | - name: Install Cargo APK 130 | run: cargo install cargo-apk 131 | 132 | - name: Build Android Application 133 | run: cargo apk build --manifest-path ./examples/android/Cargo.toml --target=x86_64-linux-android 134 | 135 | - name: Run Tests 136 | uses: reactivecircus/android-emulator-runner@v2 137 | with: 138 | api-level: 31 139 | arch: x86_64 140 | emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -no-snapshot-save 141 | script: ./.github/workflows/android_test.sh examples/android/target/debug/apk/android.apk 142 | 143 | test-ios: 144 | name: Test iOS 145 | 146 | runs-on: macos-latest 147 | 148 | steps: 149 | - uses: actions/checkout@v4 150 | 151 | - name: Install Rust Toolchain 152 | uses: dtolnay/rust-toolchain@stable 153 | with: 154 | toolchain: ${{ env.RUST_VERSION }} 155 | targets: aarch64-apple-ios-sim, aarch64-apple-ios, x86_64-apple-ios 156 | 157 | - name: Install xcodegen 158 | run: brew install xcodegen 159 | 160 | - name: Install Cargo Xcodebuild 161 | run: cargo install cargo-xcodebuild 162 | 163 | - uses: futureware-tech/simulator-action@v3 164 | with: 165 | model: "iPhone 15" 166 | - run: cargo xcodebuild run --manifest-path examples/ios/Cargo.toml 167 | -------------------------------------------------------------------------------- /src/jni_tokens.rs: -------------------------------------------------------------------------------- 1 | pub static STRING_CLS: &str = "java/lang/String"; 2 | 3 | pub static EXCEPTION_TO_STRING: &str = "toString"; 4 | pub static EXCEPTION_TO_STRING_SIG: &str = "()Ljava/lang/String;"; 5 | 6 | pub static EC_ALGORITHM: &str = "EC"; 7 | pub static ANDROID_KEY_STORE_PROVIDER: &str = "AndroidKeyStore"; 8 | pub static SHA256_WITH_ECDSA_ALGO: &str = "SHA256withECDSA"; 9 | 10 | // Context 11 | 12 | pub static CONTEXT_GET_PACKAGE_MANAGER: &str = "getPackageManager"; 13 | pub static CONTEXT_GET_PACKAGE_MANAGER_SIG: &str = "()Landroid/content/pm/PackageManager;"; 14 | 15 | // Package manager 16 | 17 | pub static PACKAGE_MANAGER_HAS_SYSTEM_FEATURE: &str = "hasSystemFeature"; 18 | pub static PACKAGE_MANAGER_HAS_SYSTEM_FEATURE_SIG: &str = "(Ljava/lang/String;I)Z"; 19 | 20 | // Key Properties 21 | 22 | pub static KEY_PROPERTIES_CLS: &str = "android/security/keystore/KeyProperties"; 23 | 24 | pub static KEY_PROPERTIES_AUTH_BIOMETRIC_STRONG: &str = "AUTH_BIOMETRIC_STRONG"; 25 | pub static KEY_PROPERTIES_AUTH_BIOMETRIC_STRONG_SIG: &str = "I"; 26 | 27 | pub static KEY_PROPERTIES_PURPOSE_SIGN: &str = "PURPOSE_SIGN"; 28 | pub static KEY_PROPERTIES_PURPOSE_SIGN_SIG: &str = "I"; 29 | 30 | pub static KEY_PROPERTIES_DIGEST_SHA256: &str = "DIGEST_SHA256"; 31 | pub static KEY_PROPERTIES_DIGEST_SHA256_SIG: &str = "Ljava/lang/String;"; 32 | 33 | // Key Gen Parameter Spec Builder 34 | 35 | pub static KEY_GEN_PARAMETER_SPEC_BUILDER_CLS: &str = 36 | "android/security/keystore/KeyGenParameterSpec$Builder"; 37 | 38 | pub static KEY_GEN_PARAMETER_SPEC_BUILDER_CTOR_SIG: &str = "(Ljava/lang/String;I)V"; 39 | 40 | pub static KEY_GEN_PARAMETER_SPEC_BUILDER_SET_DIGESTS: &str = "setDigests"; 41 | pub static KEY_GEN_PARAMETER_SPEC_BUILDER_SET_DIGESTS_SIG: &str = 42 | "([Ljava/lang/String;)Landroid/security/keystore/KeyGenParameterSpec$Builder;"; 43 | 44 | pub static KEY_GEN_PARAMETER_SPEC_BUILDER_SET_KEY_SIZE: &str = "setKeySize"; 45 | pub static KEY_GEN_PARAMETER_SPEC_BUILDER_SET_KEY_SIZE_SIG: &str = 46 | "(I)Landroid/security/keystore/KeyGenParameterSpec$Builder;"; 47 | 48 | pub static KEY_GEN_PARAMETER_SPEC_BUILDER_SET_USER_AUTHENTICATION_REQUIRED: &str = 49 | "setUserAuthenticationRequired"; 50 | pub static KEY_GEN_PARAMETER_SPEC_BUILDER_SET_USER_AUTHENTICATION_REQUIRED_SIG: &str = 51 | "(Z)Landroid/security/keystore/KeyGenParameterSpec$Builder;"; 52 | 53 | pub static KEY_GEN_PARAMETER_SPEC_BUILDER_SET_INVALIDATED_BY_BIOMETRIC_ENROLLMENT: &str = 54 | "setInvalidatedByBiometricEnrollment"; 55 | pub static KEY_GEN_PARAMETER_SPEC_BUILDER_SET_INVALIDATED_BY_BIOMETRIC_ENROLLMENT_SIG: &str = 56 | "(Z)Landroid/security/keystore/KeyGenParameterSpec$Builder;"; 57 | 58 | pub static KEY_GEN_PARAMETER_SPEC_BUILDER_SET_USER_AUTHENTICATION_PARAMETERS: &str = 59 | "setUserAuthenticationParameters"; 60 | pub static KEY_GEN_PARAMETER_SPEC_BUILDER_SET_USER_AUTHENTICATION_PARAMETERS_SIG: &str = 61 | "(II)Landroid/security/keystore/KeyGenParameterSpec$Builder;"; 62 | 63 | pub static KEY_GEN_PARAMETER_SPEC_BUILDER_SET_IS_STRONG_BOX_BACKED: &str = "setIsStrongBoxBacked"; 64 | pub static KEY_GEN_PARAMETER_SPEC_BUILDER_SET_IS_STRONG_BOX_BACKED_SIG: &str = 65 | "(Z)Landroid/security/keystore/KeyGenParameterSpec$Builder;"; 66 | 67 | pub static KEY_GEN_PARAMETER_SPEC_BUILDER_BUILD: &str = "build"; 68 | pub static KEY_GEN_PARAMETER_SPEC_BUILDER_BUILD_SIG: &str = 69 | "()Landroid/security/keystore/KeyGenParameterSpec;"; 70 | 71 | // Key Pair Generator 72 | 73 | pub static KEY_PAIR_GENERATOR_CLS: &str = "java/security/KeyPairGenerator"; 74 | 75 | pub static KEY_PAIR_GENERATOR_GET_INSTANCE: &str = "getInstance"; 76 | pub static KEY_PAIR_GENERATOR_GET_INSTANCE_SIG: &str = 77 | "(Ljava/lang/String;Ljava/lang/String;)Ljava/security/KeyPairGenerator;"; 78 | 79 | pub static KEY_PAIR_GENERATOR_INITIALIZE: &str = "initialize"; 80 | pub static KEY_PAIR_GENERATOR_INITIALIZE_SIG: &str = 81 | "(Ljava/security/spec/AlgorithmParameterSpec;)V"; 82 | 83 | pub static KEY_PAIR_GENERATOR_GENERATE_KEY_PAIR: &str = "generateKeyPair"; 84 | pub static KEY_PAIR_GENERATOR_GENERATE_KEY_PAIR_SIG: &str = "()Ljava/security/KeyPair;"; 85 | 86 | // Key Store 87 | 88 | pub static KEY_STORE_CLS: &str = "java/security/KeyStore"; 89 | 90 | pub static KEY_STORE_GET_INSTANCE: &str = "getInstance"; 91 | pub static KEY_STORE_GET_INSTANCE_SIG: &str = "(Ljava/lang/String;)Ljava/security/KeyStore;"; 92 | 93 | pub static KEY_STORE_LOAD: &str = "load"; 94 | pub static KEY_STORE_LOAD_SIG: &str = "(Ljava/security/KeyStore$LoadStoreParameter;)V"; 95 | 96 | pub static KEY_STORE_GET_ENTRY: &str = "getEntry"; 97 | pub static KEY_STORE_GET_ENTRY_SIG: &str = "(Ljava/lang/String;Ljava/security/KeyStore$ProtectionParameter;)Ljava/security/KeyStore$Entry;"; 98 | 99 | // Key Store Entry 100 | 101 | pub static KEY_STORE_ENTRY_GET_PRIVATE_KEY: &str = "getPrivateKey"; 102 | pub static KEY_STORE_ENTRY_GET_PRIVATE_KEY_SIG: &str = "()Ljava/security/PrivateKey;"; 103 | 104 | pub static KEY_STORE_ENTRY_GET_CERTIFICATE: &str = "getCertificate"; 105 | pub static KEY_STORE_ENTRY_GET_CERTIFICATE_SIG: &str = "()Ljava/security/cert/Certificate;"; 106 | 107 | // Certificate 108 | 109 | pub static CERTIFICATE_GET_PUBLIC_KEY: &str = "getPublicKey"; 110 | pub static CERTIFICATE_GET_PUBLIC_KEY_SIG: &str = "()Ljava/security/PublicKey;"; 111 | 112 | // Key Pair 113 | 114 | pub static KEY_PAIR_CLS: &str = "java/security/KeyPair"; 115 | pub static KEY_PAIR_CTOR_SIG: &str = "(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V"; 116 | 117 | pub static KEY_PAIR_GET_PUBLIC: &str = "getPublic"; 118 | pub static KEY_PAIR_GET_PUBLIC_SIG: &str = "()Ljava/security/PublicKey;"; 119 | 120 | pub static KEY_PAIR_GET_PRIVATE: &str = "getPrivate"; 121 | pub static KEY_PAIR_GET_PRIVATE_SIG: &str = "()Ljava/security/PrivateKey;"; 122 | 123 | // Public Key 124 | 125 | pub static PUBLIC_KEY_GET_ENCODED: &str = "getEncoded"; 126 | pub static PUBLIC_KEY_GET_ENCODED_SIG: &str = "()[B"; 127 | 128 | pub static PUBLIC_KEY_GET_FORMAT: &str = "getFormat"; 129 | pub static PUBLIC_KEY_GET_FORMAT_SIG: &str = "()Ljava/lang/String;"; 130 | 131 | // Signature 132 | 133 | pub static SIGNATURE_CLS: &str = "java/security/Signature"; 134 | 135 | pub static SIGNATURE_GET_INSTANCE: &str = "getInstance"; 136 | pub static SIGNATURE_GET_INSTANCE_SIG: &str = "(Ljava/lang/String;)Ljava/security/Signature;"; 137 | 138 | pub static SIGNATURE_INIT_SIGN: &str = "initSign"; 139 | pub static SIGNATURE_INIT_SIGN_SIG: &str = "(Ljava/security/PrivateKey;)V"; 140 | 141 | pub static SIGNATURE_UPDATE: &str = "update"; 142 | pub static SIGNATURE_UPDATE_SIG: &str = "([B)V"; 143 | 144 | pub static SIGNATURE_SIGN: &str = "sign"; 145 | pub static SIGNATURE_SIGN_SIG: &str = "()[B"; 146 | 147 | pub static ACTIVITY_THREAD_CLS: &str = "android/app/ActivityThread"; 148 | 149 | pub static ACTIVITY_THREAD_GET_CURRENT_ACTIVITY_THREAD: &str = "currentActivityThread"; 150 | pub static ACTIVITY_THREAD_GET_CURRENT_ACTIVITY_THREAD_SIG: &str = "()Landroid/app/ActivityThread;"; 151 | 152 | pub static ACTIVITY_THREAD_GET_APPLICATION: &str = "getApplication"; 153 | pub static ACTIVITY_THREAD_GET_APPLICATION_SIG: &str = "()Landroid/app/Application;"; 154 | -------------------------------------------------------------------------------- /src/ios.rs: -------------------------------------------------------------------------------- 1 | use crate::{ 2 | error::{SecureEnvError, SecureEnvResult}, 3 | KeyOps, SecureEnvironmentOps, 4 | }; 5 | use p256::{ecdsa::Signature, elliptic_curve::group::GroupEncoding}; 6 | use security_framework::{ 7 | access_control::{ProtectionMode, SecAccessControl}, 8 | item::{ItemClass, ItemSearchOptions, KeyClass, Location, SearchResult}, 9 | key::{Algorithm, GenerateKeyOptions, KeyType, SecKey, Token}, 10 | passwords_options::AccessControlOptions, 11 | }; 12 | 13 | /// Unit struct that can be used to create and get keypairs by id 14 | /// 15 | /// # Examples 16 | /// 17 | /// ## Generate a keypair 18 | /// 19 | /// ``` 20 | /// use secure_env::{SecureEnvironment, SecureEnvironmentOps}; 21 | /// 22 | /// let key = SecureEnvironment::generate_keypair("my-unique-id").unwrap(); 23 | /// ``` 24 | /// 25 | /// ## Get a keypair from the keychain 26 | /// 27 | /// ``` 28 | /// use secure_env::{SecureEnvironment, SecureEnvironmentOps}; 29 | /// 30 | /// { 31 | /// SecureEnvironment::generate_keypair("my-unique-id").unwrap(); 32 | /// } 33 | /// 34 | /// let key = SecureEnvironment::get_keypair_by_id("my-unique-id").unwrap(); 35 | /// ``` 36 | #[derive(Debug, Clone, Eq, PartialEq, Copy)] 37 | pub struct SecureEnvironment; 38 | 39 | impl SecureEnvironmentOps for SecureEnvironment { 40 | fn generate_keypair(id: impl Into, backed_by_biometrics: bool) -> SecureEnvResult { 41 | // Create a dictionary with the following options: 42 | let mut opts = GenerateKeyOptions::default(); 43 | 44 | // Set the key type to `ec` (Elliptic Curve) 45 | let opts = opts.set_key_type(KeyType::ec()); 46 | 47 | // Set the a token of `SecureEnclave`. 48 | // Meaning Apple will store the key in a secure element 49 | let opts = opts.set_token(Token::SecureEnclave); 50 | 51 | let opts = if backed_by_biometrics { 52 | // Set the access control so that biometrics via LocalAuthentication.framework is required 53 | let access_control = SecAccessControl::create_with_protection( 54 | Some(ProtectionMode::AccessibleWhenUnlockedThisDeviceOnly), 55 | AccessControlOptions::BIOMETRY_CURRENT_SET.bits(), 56 | ) 57 | .map_err(|_| { 58 | SecureEnvError::UnableToGenerateKey( 59 | "Unable to create access control flags".to_owned(), 60 | ) 61 | })?; 62 | 63 | opts.set_access_control(access_control) 64 | } else { 65 | opts 66 | }; 67 | 68 | // Store the key in the keychain 69 | let opts = opts.set_location(Location::DataProtectionKeychain); 70 | 71 | // Give the key a label so we can retrieve it later 72 | // with the `SecureEnvironment::get_keypair_by_id` method 73 | let opts = opts.set_label(id); 74 | 75 | let dict = opts.to_dictionary(); 76 | 77 | // Generate a key using the dictionary 78 | // This also passes along any information the OS provides when an error occurs 79 | let key = SecKey::generate(dict) 80 | .map_err(|e| SecureEnvError::UnableToGenerateKey(e.to_string()))?; 81 | 82 | Ok(Key(key)) 83 | } 84 | 85 | fn get_keypair_by_id(id: impl Into) -> SecureEnvResult { 86 | let id = id.into(); 87 | 88 | let search_result = ItemSearchOptions::new() 89 | // Search by the provided label 90 | .label(&id) 91 | // Load the reference, not the actual data 92 | .load_refs(true) 93 | // Looking for a `Key` instance 94 | .class(ItemClass::key()) 95 | // We want access to the private key 96 | .key_class(KeyClass::private()) 97 | // Limit to 1 output key 98 | .limit(1) 99 | // Search the keychain 100 | .search() 101 | .map_err(|_| { 102 | SecureEnvError::UnableToGetKeyPairById(format!( 103 | "Key reference with id: '{id}' not found." 104 | )) 105 | })?; 106 | 107 | let result = search_result 108 | .first() 109 | .ok_or(SecureEnvError::UnableToGetKeyPairById(format!( 110 | "Key reference with id: '{id}' not found." 111 | )))?; 112 | 113 | match result { 114 | SearchResult::Ref(r) => match r { 115 | security_framework::item::Reference::Key(k) => Ok(Key(k.to_owned())), 116 | _ => Err(SecureEnvError::UnableToGetKeyPairById( 117 | "Found Reference, but not of key instance".to_owned(), 118 | )), 119 | }, 120 | _ => Err(SecureEnvError::UnableToGetKeyPairById( 121 | "Did not find search reference".to_owned(), 122 | )), 123 | } 124 | } 125 | } 126 | 127 | /// Key structure which allows for signing and retrieval of the public key 128 | /// 129 | /// # Examples 130 | /// 131 | /// ## Get the public Key 132 | /// 133 | /// ``` 134 | /// use secure_env::{SecureEnvironment, SecureEnvironmentOps, Key, KeyOps}; 135 | /// 136 | /// let key = SecureEnvironment::generate_keypair("documentation-public-key-token").unwrap(); 137 | /// let public_key_bytes = key.get_public_key().unwrap(); 138 | /// 139 | /// assert_eq!(public_key_bytes.len(), 33); 140 | /// ``` 141 | /// 142 | /// ## Sign a message 143 | /// 144 | /// ``` 145 | /// use secure_env::{SecureEnvironment, SecureEnvironmentOps, Key, KeyOps}; 146 | /// 147 | /// let key = SecureEnvironment::generate_keypair("documentation-sign-key-token").unwrap(); 148 | /// let signature = key.sign(b"Hello World").unwrap(); 149 | /// 150 | /// assert_eq!(signature.len(), 64); 151 | /// ``` 152 | /// 153 | /// ## Verify the signed message with `askar_crypto` 154 | /// 155 | /// ``` 156 | /// use secure_env::{SecureEnvironment, SecureEnvironmentOps, Key, KeyOps}; 157 | /// use askar_crypto::{alg::p256::P256KeyPair, repr::KeyPublicBytes}; 158 | /// 159 | /// let msg = b"Hello World!"; 160 | /// let key = SecureEnvironment::generate_keypair("my-test-sign-key").unwrap(); 161 | /// 162 | /// let public_key = key.get_public_key().unwrap(); 163 | /// let signature = key.sign(b"Hello World!").unwrap(); 164 | /// 165 | /// let verify_key = P256KeyPair::from_public_bytes(&public_key).unwrap(); 166 | /// let is_signature_valid = verify_key.verify_signature(msg, &signature); 167 | /// 168 | /// assert!(is_signature_valid); 169 | /// ``` 170 | #[derive(Debug, Clone, Eq, PartialEq)] 171 | pub struct Key(SecKey); 172 | 173 | impl KeyOps for Key { 174 | fn get_public_key(&self) -> SecureEnvResult> { 175 | // Retrieve the internal representation of the public key of the `SecKey` 176 | let public_key = self 177 | .0 178 | .public_key() 179 | .ok_or(SecureEnvError::UnableToGetPublicKey( 180 | "No public key reference found on the internal `SecKey`".to_owned(), 181 | ))?; 182 | 183 | // Convert the public key reference to the `sec1` format in bytes 184 | let sec1_bytes = public_key 185 | .external_representation() 186 | .ok_or(SecureEnvError::UnableToGetPublicKey( 187 | "Could not create an external representation for the public key on the `SecKey`" 188 | .to_owned(), 189 | ))? 190 | .to_vec(); 191 | 192 | // Instantiate a P256 public key from the `sec1` bytes 193 | let public_key = p256::PublicKey::from_sec1_bytes(&sec1_bytes) 194 | .map_err(|e| SecureEnvError::UnableToGetPublicKey(e.to_string()))?; 195 | 196 | // Get the affine point of the public key and convert this into a byte representation 197 | let public_key = public_key.as_affine().to_bytes().to_vec(); 198 | 199 | Ok(public_key) 200 | } 201 | 202 | /** 203 | * 204 | * Signing is an operation that requires authentication. Make sure to manually authenticate 205 | * before calling this operation 206 | * 207 | */ 208 | fn sign(&self, msg: &[u8]) -> SecureEnvResult> { 209 | // Sign the message with the `der` format 210 | let der_sig = self 211 | .0 212 | .create_signature(Algorithm::ECDSASignatureMessageX962SHA256, msg) 213 | .map_err(|e| SecureEnvError::UnableToCreateSignature(e.to_string()))?; 214 | 215 | // Convert the `ASN.1 der` format signature 216 | let signature = Signature::from_der(&der_sig) 217 | .map_err(|e| SecureEnvError::UnableToCreateSignature(e.to_string()))?; 218 | 219 | // Convert the signature to a byte representation 220 | let signature = signature.to_vec(); 221 | 222 | Ok(signature) 223 | } 224 | } 225 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | -------------------------------------------------------------------------------- /src/android.rs: -------------------------------------------------------------------------------- 1 | use crate::{ 2 | error::{SecureEnvError, SecureEnvResult}, 3 | jni_tokens::*, 4 | KeyOps, SecureEnvironmentOps, 5 | }; 6 | use jni::{ 7 | objects::{JByteArray, JClass, JObject, JString, JValue}, 8 | sys::jobject, 9 | JNIEnv, 10 | }; 11 | use lazy_static::lazy_static; 12 | use libc::c_void; 13 | use p256::{ecdsa::Signature, elliptic_curve::sec1::ToEncodedPoint}; 14 | use paste::paste; 15 | use std::sync::{Arc, Mutex}; 16 | use x509_parser::{prelude::FromDer, x509::SubjectPublicKeyInfo}; 17 | 18 | pub struct AndroidContext(*mut c_void); 19 | 20 | unsafe impl Send for AndroidContext {} 21 | unsafe impl Sync for AndroidContext {} 22 | 23 | lazy_static! { 24 | static ref JAVA_VM: Arc>> = Arc::new(Mutex::new(None)); 25 | } 26 | 27 | // Entry point that can be used to set the pointer to the jvm. It has to be called manually from a 28 | // Java environment, 29 | #[no_mangle] 30 | pub extern "system" fn Java_id_animo_SecureEnvironment_set_1env<'local>( 31 | env: JNIEnv<'local>, 32 | _class: JClass<'local>, 33 | ) { 34 | let vm = env.get_java_vm().unwrap(); 35 | *JAVA_VM.lock().unwrap() = Some(vm); 36 | } 37 | 38 | macro_rules! jni_handle_error { 39 | ($env:expr, $err:ident, $e:expr) => { 40 | match (|| -> $crate::error::SecureEnvResult<()> { 41 | if $env 42 | .exception_check() 43 | .map_err(|e| $crate::error::SecureEnvError::$err(e.to_string()))? 44 | { 45 | let throwable = $env 46 | .exception_occurred() 47 | .map_err(|e| $crate::error::SecureEnvError::$err(e.to_string()))?; 48 | $env.exception_clear() 49 | .map_err(|e| $crate::error::SecureEnvError::$err(e.to_string()))?; 50 | 51 | let message = $env 52 | .call_method( 53 | &throwable, 54 | EXCEPTION_TO_STRING, 55 | EXCEPTION_TO_STRING_SIG, 56 | &[], 57 | ) 58 | .and_then(|v| v.l()) 59 | .map_err(|e| { 60 | $crate::error::SecureEnvError::UnableToCreateJavaValue(e.to_string()) 61 | })?; 62 | 63 | let msg_rust: String = $env 64 | .get_string(&message.into()) 65 | .map_err(|e| { 66 | $crate::error::SecureEnvError::UnableToCreateJavaValue(e.to_string()) 67 | })? 68 | .into(); 69 | 70 | return Err($crate::error::SecureEnvError::$err(msg_rust)); 71 | } else { 72 | return Err($crate::error::SecureEnvError::$err($e.to_string())); 73 | } 74 | })() { 75 | Ok(_) => $crate::error::SecureEnvError::$err($e.to_string()), 76 | Err(e) => e, 77 | } 78 | }; 79 | } 80 | 81 | macro_rules! jni_call_method { 82 | ($env:expr, $cls:expr, $method:ident, $args:expr, $ret_typ:ident, $err:ident) => { 83 | paste! { 84 | $env.call_method($cls, $method, [<$method _SIG>], $args) 85 | .and_then(|v| v.$ret_typ()) 86 | .map_err(|e| jni_handle_error!($env, $err, e)) 87 | } 88 | }; 89 | 90 | ($env:expr, $cls:expr, $method:ident, $ret_typ:ident, $err:ident) => { 91 | jni_call_method!($env, $cls, $method, &[], $ret_typ, $err) 92 | }; 93 | } 94 | 95 | macro_rules! jni_call_static_method { 96 | ($env:expr, $cls:ident, $method:ident, $args:expr, $ret_typ:ident, $err:ident) => { 97 | paste! {{ 98 | $env.call_static_method([<$cls _CLS>], $method, [<$method _SIG>], $args) 99 | .and_then(|v| v.$ret_typ()) 100 | .map_err(|e| jni_handle_error!($env, $err, e)) 101 | }} 102 | }; 103 | 104 | ($env:expr, $cls:ident, $method:ident, $ret_typ:ident, $err:ident) => { 105 | jni_call_static_method!($env, $cls, $method, &[], $ret_typ, $err) 106 | }; 107 | } 108 | 109 | macro_rules! jni_get_static_field { 110 | ($env:expr, $cls:expr, $method:ident, $ret_typ:ident, $err:ident) => { 111 | paste! {{ 112 | $env.get_static_field($cls, $method, [<$method _SIG>]) 113 | .and_then(|v| v.$ret_typ()) 114 | .map_err(|e| jni_handle_error!($env, $err, e)) 115 | }} 116 | }; 117 | } 118 | 119 | macro_rules! jni_new_object { 120 | ($env:expr, $cls:ident, $args:expr, $err:ident) => { 121 | paste! {{ 122 | $env.new_object([<$cls _CLS>], [<$cls _CTOR_SIG>], $args) 123 | .map_err(|e| jni_handle_error!($env, $err, e)) 124 | }} 125 | }; 126 | } 127 | 128 | macro_rules! jni_find_class { 129 | ($env:expr, $cls:ident, $err:ident) => { 130 | paste! {{ 131 | $env.find_class([<$cls _CLS>]) 132 | .map_err(|e| jni_handle_error!($env, $err, e)) 133 | }} 134 | }; 135 | } 136 | 137 | #[derive(Debug)] 138 | pub struct SecureEnvironment; 139 | 140 | impl SecureEnvironmentOps for SecureEnvironment { 141 | fn generate_keypair(id: impl Into, backed_by_biometrics: bool) -> SecureEnvResult { 142 | let jvm = JAVA_VM.lock().map_err(|_| { 143 | SecureEnvError::UnableToAttachJVMToThread("Could not acquire lock on JVM".to_owned()) 144 | })?; 145 | 146 | let jvm = jvm 147 | .as_ref() 148 | .ok_or(SecureEnvError::UnableToAttachJVMToThread( 149 | "JVM has not been set".to_owned(), 150 | ))?; 151 | 152 | let mut env = jvm 153 | .attach_current_thread_as_daemon() 154 | .map_err(|e| SecureEnvError::UnableToAttachJVMToThread(e.to_string()))?; 155 | 156 | let id = id.into(); 157 | 158 | let id = env 159 | .new_string(id) 160 | .map_err(|e| SecureEnvError::UnableToCreateJavaValue(e.to_string()))?; 161 | 162 | let purpose_sign = jni_get_static_field!( 163 | env, 164 | KEY_PROPERTIES_CLS, 165 | KEY_PROPERTIES_PURPOSE_SIGN, 166 | i, 167 | UnableToGenerateKey 168 | )?; 169 | 170 | let builder = jni_new_object!( 171 | env, 172 | KEY_GEN_PARAMETER_SPEC_BUILDER, 173 | &[(&id).into(), JValue::from(purpose_sign)], 174 | UnableToGenerateKey 175 | )?; 176 | 177 | let kp_cls = jni_find_class!(env, KEY_PROPERTIES, UnableToGenerateKey)?; 178 | 179 | let digest_sha256 = jni_get_static_field!( 180 | env, 181 | &kp_cls, 182 | KEY_PROPERTIES_DIGEST_SHA256, 183 | l, 184 | UnableToGenerateKey 185 | )?; 186 | 187 | let string_cls = jni_find_class!(env, STRING, UnableToGenerateKey)?; 188 | 189 | let args = env 190 | .new_object_array(1, string_cls, &digest_sha256) 191 | .map_err(|e| SecureEnvError::UnableToCreateJavaValue(e.to_string()))?; 192 | 193 | let builder = jni_call_method!( 194 | env, 195 | builder, 196 | KEY_GEN_PARAMETER_SPEC_BUILDER_SET_DIGESTS, 197 | &[(&args).into()], 198 | l, 199 | UnableToGenerateKey 200 | )?; 201 | 202 | let builder = jni_call_method!( 203 | env, 204 | builder, 205 | KEY_GEN_PARAMETER_SPEC_BUILDER_SET_KEY_SIZE, 206 | &[JValue::from(256)], 207 | l, 208 | UnableToGenerateKey 209 | )?; 210 | 211 | let builder = if backed_by_biometrics { 212 | let auth_biometric_strong = jni_get_static_field!( 213 | env, 214 | &kp_cls, 215 | KEY_PROPERTIES_AUTH_BIOMETRIC_STRONG, 216 | i, 217 | UnableToGenerateKey 218 | )?; 219 | 220 | let builder = jni_call_method!( 221 | env, 222 | builder, 223 | KEY_GEN_PARAMETER_SPEC_BUILDER_SET_USER_AUTHENTICATION_REQUIRED, 224 | &[JValue::Bool(1)], 225 | l, 226 | UnableToGenerateKey 227 | )?; 228 | 229 | let builder = jni_call_method!( 230 | env, 231 | builder, 232 | KEY_GEN_PARAMETER_SPEC_BUILDER_SET_INVALIDATED_BY_BIOMETRIC_ENROLLMENT, 233 | &[JValue::Bool(1)], 234 | l, 235 | UnableToGenerateKey 236 | )?; 237 | 238 | jni_call_method!( 239 | env, 240 | builder, 241 | KEY_GEN_PARAMETER_SPEC_BUILDER_SET_USER_AUTHENTICATION_PARAMETERS, 242 | &[JValue::from(0), auth_biometric_strong.into()], 243 | l, 244 | UnableToGenerateKey 245 | )? 246 | } else { 247 | builder 248 | }; 249 | 250 | let current_activity_thread = jni_call_static_method!( 251 | env, 252 | ACTIVITY_THREAD, 253 | ACTIVITY_THREAD_GET_CURRENT_ACTIVITY_THREAD, 254 | l, 255 | UnableToGenerateKey 256 | )?; 257 | let ctx = jni_call_method!( 258 | env, 259 | current_activity_thread, 260 | ACTIVITY_THREAD_GET_APPLICATION, 261 | l, 262 | UnableToGenerateKey 263 | )?; 264 | 265 | let package_manager = jni_call_method!( 266 | env, 267 | ctx, 268 | CONTEXT_GET_PACKAGE_MANAGER, 269 | l, 270 | UnableToGenerateKey 271 | )?; 272 | 273 | let hardware_keystore_token = env 274 | .new_string("android.hardware.hardware_keystore") 275 | .map_err(|e| SecureEnvError::UnableToCreateJavaValue(e.to_string()))?; 276 | 277 | // This has not been documented anywhere that I could find. 278 | // After some debugging with emulators and multiple real device 279 | // (some with a Secure Element (Pixel 6a) and some without (OnePlus Nord)) 280 | // 300 seems to be the correct cut-off. 281 | let required_hardware_keystore_version = 300; 282 | 283 | let has_strongbox_support = jni_call_method!( 284 | env, 285 | &package_manager, 286 | PACKAGE_MANAGER_HAS_SYSTEM_FEATURE, 287 | &[ 288 | (&hardware_keystore_token).into(), 289 | required_hardware_keystore_version.into() 290 | ], 291 | z, 292 | UnableToGenerateKey 293 | )?; 294 | 295 | let builder = if has_strongbox_support { 296 | jni_call_method!( 297 | env, 298 | &builder, 299 | KEY_GEN_PARAMETER_SPEC_BUILDER_SET_IS_STRONG_BOX_BACKED, 300 | &[JValue::Bool(1)], 301 | l, 302 | UnableToGenerateKey 303 | )? 304 | } else { 305 | // 41: Hardware enforcement of device-unlocked keys 306 | // TODO: check the exact meaning behind this 307 | // Maybe there is number that corrolates to TEE? 308 | // This seems to work best with testing 309 | let required_device_unlocked_keystore_version = 41; 310 | 311 | let has_device_unlocked_keystore_support = jni_call_method!( 312 | env, 313 | &package_manager, 314 | PACKAGE_MANAGER_HAS_SYSTEM_FEATURE, 315 | &[ 316 | (&hardware_keystore_token).into(), 317 | required_device_unlocked_keystore_version.into() 318 | ], 319 | z, 320 | UnableToGenerateKey 321 | )?; 322 | 323 | if !has_device_unlocked_keystore_support { 324 | return Err(SecureEnvError::UnableToGenerateKey( 325 | "Unable to generate keypair. Device has insufficient keystore support" 326 | .to_owned(), 327 | )); 328 | } 329 | 330 | builder 331 | }; 332 | 333 | let algorithm = env 334 | .new_string(EC_ALGORITHM) 335 | .map_err(|e| SecureEnvError::UnableToCreateJavaValue(e.to_string()))?; 336 | 337 | let provider = env 338 | .new_string(ANDROID_KEY_STORE_PROVIDER) 339 | .map_err(|e| SecureEnvError::UnableToCreateJavaValue(e.to_string()))?; 340 | 341 | let key_pair_generator = jni_call_static_method!( 342 | env, 343 | KEY_PAIR_GENERATOR, 344 | KEY_PAIR_GENERATOR_GET_INSTANCE, 345 | &[(&algorithm).into(), (&provider).into()], 346 | l, 347 | UnableToGenerateKey 348 | )?; 349 | 350 | let params = jni_call_method!( 351 | env, 352 | &builder, 353 | KEY_GEN_PARAMETER_SPEC_BUILDER_BUILD, 354 | l, 355 | UnableToGenerateKey 356 | )?; 357 | 358 | jni_call_method!( 359 | env, 360 | &key_pair_generator, 361 | KEY_PAIR_GENERATOR_INITIALIZE, 362 | &[(¶ms).into()], 363 | v, 364 | UnableToGenerateKey 365 | )?; 366 | 367 | let key = jni_call_method!( 368 | env, 369 | &key_pair_generator, 370 | KEY_PAIR_GENERATOR_GENERATE_KEY_PAIR, 371 | l, 372 | UnableToGenerateKey 373 | )?; 374 | 375 | Ok(Key(Arc::new(Mutex::new(*key)))) 376 | } 377 | 378 | fn get_keypair_by_id(id: impl Into) -> SecureEnvResult { 379 | let jvm = JAVA_VM.lock().map_err(|_| { 380 | SecureEnvError::UnableToAttachJVMToThread("Could not acquire lock on JVM".to_owned()) 381 | })?; 382 | 383 | let jvm = jvm 384 | .as_ref() 385 | .ok_or(SecureEnvError::UnableToAttachJVMToThread( 386 | "JVM has not been set".to_owned(), 387 | ))?; 388 | 389 | let mut env = jvm 390 | .attach_current_thread_as_daemon() 391 | .map_err(|e| SecureEnvError::UnableToAttachJVMToThread(e.to_string()))?; 392 | 393 | let provider = env 394 | .new_string(ANDROID_KEY_STORE_PROVIDER) 395 | .map_err(|e| SecureEnvError::UnableToCreateJavaValue(e.to_string()))?; 396 | 397 | let id = id.into(); 398 | let id = env 399 | .new_string(id) 400 | .map_err(|e| SecureEnvError::UnableToCreateJavaValue(e.to_string()))?; 401 | 402 | let key_store = jni_call_static_method!( 403 | env, 404 | KEY_STORE, 405 | KEY_STORE_GET_INSTANCE, 406 | &[(&provider).into()], 407 | l, 408 | UnableToGetKeyPairById 409 | )?; 410 | 411 | jni_call_method!( 412 | env, 413 | &key_store, 414 | KEY_STORE_LOAD, 415 | &[(&JObject::null()).into()], 416 | v, 417 | UnableToGetKeyPairById 418 | )?; 419 | 420 | let entry = jni_call_method!( 421 | env, 422 | &key_store, 423 | KEY_STORE_GET_ENTRY, 424 | &[(&id).into(), (&JObject::null()).into()], 425 | l, 426 | UnableToGetKeyPairById 427 | )?; 428 | 429 | let private_key = jni_call_method!( 430 | env, 431 | &entry, 432 | KEY_STORE_ENTRY_GET_PRIVATE_KEY, 433 | l, 434 | UnableToGetKeyPairById 435 | )?; 436 | 437 | let certificate = jni_call_method!( 438 | env, 439 | &entry, 440 | KEY_STORE_ENTRY_GET_CERTIFICATE, 441 | l, 442 | UnableToGetKeyPairById 443 | )?; 444 | 445 | let public_key = jni_call_method!( 446 | env, 447 | &certificate, 448 | CERTIFICATE_GET_PUBLIC_KEY, 449 | l, 450 | UnableToGetKeyPairById 451 | )?; 452 | 453 | let key_pair = jni_new_object!( 454 | env, 455 | KEY_PAIR, 456 | &[(&public_key).into(), (&private_key).into()], 457 | UnableToGetKeyPairById 458 | )?; 459 | 460 | Ok(Key(Arc::new(Mutex::new(*key_pair)))) 461 | } 462 | } 463 | 464 | #[derive(Debug)] 465 | pub struct Key(Arc>); 466 | 467 | unsafe impl Send for Key {} 468 | unsafe impl Sync for Key {} 469 | 470 | impl Key { 471 | unsafe fn get_object(&self) -> JObject { 472 | let raw = self.0.lock().unwrap(); 473 | JObject::from_raw(*raw) 474 | } 475 | } 476 | 477 | impl KeyOps for Key { 478 | fn get_public_key(&self) -> SecureEnvResult> { 479 | let jvm = JAVA_VM.lock().map_err(|_| { 480 | SecureEnvError::UnableToAttachJVMToThread("Could not acquire lock on JVM".to_owned()) 481 | })?; 482 | 483 | let jvm = jvm 484 | .as_ref() 485 | .ok_or(SecureEnvError::UnableToAttachJVMToThread( 486 | "JVM has not been set".to_owned(), 487 | ))?; 488 | 489 | let mut env = jvm 490 | .attach_current_thread_as_daemon() 491 | .map_err(|e| SecureEnvError::UnableToAttachJVMToThread(e.to_string()))?; 492 | 493 | let key = unsafe { self.get_object() }; 494 | 495 | let public_key = jni_call_method!(env, &key, KEY_PAIR_GET_PUBLIC, l, UnableToGetPublicKey)?; 496 | 497 | let public_key_encoded = jni_call_method!( 498 | env, 499 | &public_key, 500 | PUBLIC_KEY_GET_ENCODED, 501 | l, 502 | UnableToGetPublicKey 503 | )?; 504 | 505 | let format = jni_call_method!( 506 | env, 507 | &public_key, 508 | PUBLIC_KEY_GET_FORMAT, 509 | l, 510 | UnableToGetPublicKey 511 | )?; 512 | 513 | let format = JString::from(format); 514 | let format = env 515 | .get_string(&format) 516 | .map_err(|e| SecureEnvError::UnableToCreateJavaValue(e.to_string()))?; 517 | let format = format 518 | .to_str() 519 | .map_err(|e| SecureEnvError::UnableToGetPublicKey(e.to_string()))?; 520 | 521 | if format != "X.509" { 522 | return Err(SecureEnvError::UnableToGetPublicKey(format!( 523 | "Unexpected key format. Expected 'X.509', received: '{format}'" 524 | ))); 525 | } 526 | 527 | let public_key: JByteArray = public_key_encoded.into(); 528 | 529 | let public_key = env 530 | .convert_byte_array(public_key) 531 | .map_err(|e| SecureEnvError::UnableToCreateJavaValue(e.to_string()))?; 532 | 533 | let spki = SubjectPublicKeyInfo::from_der(&public_key) 534 | .map_err(|e| SecureEnvError::UnableToGetPublicKey(e.to_string()))?; 535 | 536 | let spki_data = spki.1.subject_public_key.data; 537 | 538 | let public_key = p256::PublicKey::from_sec1_bytes(&spki_data) 539 | .map_err(|e| SecureEnvError::UnableToGetPublicKey(e.to_string()))?; 540 | 541 | let encoded_point = public_key.to_encoded_point(true); 542 | 543 | let public_key = encoded_point.to_bytes().to_vec(); 544 | 545 | Ok(public_key) 546 | } 547 | 548 | /** 549 | * 550 | * Signing is an operation that requires authentication. Make sure to manually authenticate 551 | * before calling this operation 552 | * 553 | */ 554 | fn sign(&self, msg: &[u8]) -> SecureEnvResult> { 555 | let jvm = JAVA_VM.lock().map_err(|_| { 556 | SecureEnvError::UnableToAttachJVMToThread("Could not acquire lock on JVM".to_owned()) 557 | })?; 558 | 559 | let jvm = jvm 560 | .as_ref() 561 | .ok_or(SecureEnvError::UnableToAttachJVMToThread( 562 | "JVM has not been set".to_owned(), 563 | ))?; 564 | 565 | let mut env = jvm 566 | .attach_current_thread_as_daemon() 567 | .map_err(|e| SecureEnvError::UnableToAttachJVMToThread(e.to_string()))?; 568 | 569 | let key = unsafe { self.get_object() }; 570 | 571 | let algorithm = env 572 | .new_string(SHA256_WITH_ECDSA_ALGO) 573 | .map_err(|e| SecureEnvError::UnableToCreateJavaValue(e.to_string()))?; 574 | 575 | let private_key = 576 | jni_call_method!(env, &key, KEY_PAIR_GET_PRIVATE, l, UnableToCreateSignature)?; 577 | 578 | let signature_instance = jni_call_static_method!( 579 | env, 580 | SIGNATURE, 581 | SIGNATURE_GET_INSTANCE, 582 | &[(&algorithm).into()], 583 | l, 584 | UnableToCreateSignature 585 | )?; 586 | 587 | jni_call_method!( 588 | env, 589 | &signature_instance, 590 | SIGNATURE_INIT_SIGN, 591 | &[(&private_key).into()], 592 | v, 593 | UnableToCreateSignature 594 | )?; 595 | 596 | let b_arr = env 597 | .byte_array_from_slice(msg) 598 | .map_err(|e| SecureEnvError::UnableToCreateJavaValue(e.to_string()))?; 599 | 600 | jni_call_method!( 601 | env, 602 | &signature_instance, 603 | SIGNATURE_UPDATE, 604 | &[(&b_arr).into()], 605 | v, 606 | UnableToCreateSignature 607 | )?; 608 | 609 | let signature = jni_call_method!( 610 | env, 611 | &signature_instance, 612 | SIGNATURE_SIGN, 613 | l, 614 | UnableToCreateSignature 615 | )?; 616 | 617 | let signature: JByteArray = signature.into(); 618 | 619 | let signature = env 620 | .convert_byte_array(signature) 621 | .map_err(|e| SecureEnvError::UnableToCreateJavaValue(e.to_string()))?; 622 | 623 | let signature = Signature::from_der(&signature) 624 | .map_err(|e| SecureEnvError::UnableToCreateSignature(e.to_string()))?; 625 | 626 | let r = signature.r(); 627 | let s = signature.s(); 628 | let compact_signature = [r.to_bytes(), s.to_bytes()].concat(); 629 | 630 | Ok(compact_signature) 631 | } 632 | } 633 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "animo-secure-env" 7 | version = "0.4.0" 8 | dependencies = [ 9 | "jni", 10 | "lazy_static", 11 | "libc", 12 | "ndk-context", 13 | "ndk-sys", 14 | "p256", 15 | "paste", 16 | "security-framework", 17 | "thiserror", 18 | "x509-parser", 19 | ] 20 | 21 | [[package]] 22 | name = "asn1-rs" 23 | version = "0.6.1" 24 | source = "registry+https://github.com/rust-lang/crates.io-index" 25 | checksum = "22ad1373757efa0f70ec53939aabc7152e1591cb485208052993070ac8d2429d" 26 | dependencies = [ 27 | "asn1-rs-derive", 28 | "asn1-rs-impl", 29 | "displaydoc", 30 | "nom", 31 | "num-traits", 32 | "rusticata-macros", 33 | "thiserror", 34 | "time", 35 | ] 36 | 37 | [[package]] 38 | name = "asn1-rs-derive" 39 | version = "0.5.0" 40 | source = "registry+https://github.com/rust-lang/crates.io-index" 41 | checksum = "7378575ff571966e99a744addeff0bff98b8ada0dedf1956d59e634db95eaac1" 42 | dependencies = [ 43 | "proc-macro2", 44 | "quote", 45 | "syn", 46 | "synstructure", 47 | ] 48 | 49 | [[package]] 50 | name = "asn1-rs-impl" 51 | version = "0.2.0" 52 | source = "registry+https://github.com/rust-lang/crates.io-index" 53 | checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" 54 | dependencies = [ 55 | "proc-macro2", 56 | "quote", 57 | "syn", 58 | ] 59 | 60 | [[package]] 61 | name = "autocfg" 62 | version = "1.3.0" 63 | source = "registry+https://github.com/rust-lang/crates.io-index" 64 | checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" 65 | 66 | [[package]] 67 | name = "base16ct" 68 | version = "0.2.0" 69 | source = "registry+https://github.com/rust-lang/crates.io-index" 70 | checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" 71 | 72 | [[package]] 73 | name = "base64ct" 74 | version = "1.6.0" 75 | source = "registry+https://github.com/rust-lang/crates.io-index" 76 | checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" 77 | 78 | [[package]] 79 | name = "bitflags" 80 | version = "2.6.0" 81 | source = "registry+https://github.com/rust-lang/crates.io-index" 82 | checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" 83 | 84 | [[package]] 85 | name = "block-buffer" 86 | version = "0.10.4" 87 | source = "registry+https://github.com/rust-lang/crates.io-index" 88 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 89 | dependencies = [ 90 | "generic-array", 91 | ] 92 | 93 | [[package]] 94 | name = "bytes" 95 | version = "1.6.0" 96 | source = "registry+https://github.com/rust-lang/crates.io-index" 97 | checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" 98 | 99 | [[package]] 100 | name = "cesu8" 101 | version = "1.1.0" 102 | source = "registry+https://github.com/rust-lang/crates.io-index" 103 | checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" 104 | 105 | [[package]] 106 | name = "cfg-if" 107 | version = "1.0.0" 108 | source = "registry+https://github.com/rust-lang/crates.io-index" 109 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 110 | 111 | [[package]] 112 | name = "combine" 113 | version = "4.6.7" 114 | source = "registry+https://github.com/rust-lang/crates.io-index" 115 | checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" 116 | dependencies = [ 117 | "bytes", 118 | "memchr", 119 | ] 120 | 121 | [[package]] 122 | name = "const-oid" 123 | version = "0.9.6" 124 | source = "registry+https://github.com/rust-lang/crates.io-index" 125 | checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" 126 | 127 | [[package]] 128 | name = "core-foundation" 129 | version = "0.9.4" 130 | source = "registry+https://github.com/rust-lang/crates.io-index" 131 | checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" 132 | dependencies = [ 133 | "core-foundation-sys", 134 | "libc", 135 | ] 136 | 137 | [[package]] 138 | name = "core-foundation-sys" 139 | version = "0.8.6" 140 | source = "registry+https://github.com/rust-lang/crates.io-index" 141 | checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" 142 | 143 | [[package]] 144 | name = "cpufeatures" 145 | version = "0.2.12" 146 | source = "registry+https://github.com/rust-lang/crates.io-index" 147 | checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" 148 | dependencies = [ 149 | "libc", 150 | ] 151 | 152 | [[package]] 153 | name = "crypto-bigint" 154 | version = "0.5.5" 155 | source = "registry+https://github.com/rust-lang/crates.io-index" 156 | checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" 157 | dependencies = [ 158 | "generic-array", 159 | "rand_core", 160 | "subtle", 161 | "zeroize", 162 | ] 163 | 164 | [[package]] 165 | name = "crypto-common" 166 | version = "0.1.6" 167 | source = "registry+https://github.com/rust-lang/crates.io-index" 168 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 169 | dependencies = [ 170 | "generic-array", 171 | "typenum", 172 | ] 173 | 174 | [[package]] 175 | name = "data-encoding" 176 | version = "2.6.0" 177 | source = "registry+https://github.com/rust-lang/crates.io-index" 178 | checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" 179 | 180 | [[package]] 181 | name = "der" 182 | version = "0.7.9" 183 | source = "registry+https://github.com/rust-lang/crates.io-index" 184 | checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" 185 | dependencies = [ 186 | "const-oid", 187 | "pem-rfc7468", 188 | "zeroize", 189 | ] 190 | 191 | [[package]] 192 | name = "der-parser" 193 | version = "9.0.0" 194 | source = "registry+https://github.com/rust-lang/crates.io-index" 195 | checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" 196 | dependencies = [ 197 | "asn1-rs", 198 | "displaydoc", 199 | "nom", 200 | "num-bigint", 201 | "num-traits", 202 | "rusticata-macros", 203 | ] 204 | 205 | [[package]] 206 | name = "deranged" 207 | version = "0.3.11" 208 | source = "registry+https://github.com/rust-lang/crates.io-index" 209 | checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" 210 | dependencies = [ 211 | "powerfmt", 212 | ] 213 | 214 | [[package]] 215 | name = "digest" 216 | version = "0.10.7" 217 | source = "registry+https://github.com/rust-lang/crates.io-index" 218 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 219 | dependencies = [ 220 | "block-buffer", 221 | "const-oid", 222 | "crypto-common", 223 | "subtle", 224 | ] 225 | 226 | [[package]] 227 | name = "displaydoc" 228 | version = "0.2.4" 229 | source = "registry+https://github.com/rust-lang/crates.io-index" 230 | checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" 231 | dependencies = [ 232 | "proc-macro2", 233 | "quote", 234 | "syn", 235 | ] 236 | 237 | [[package]] 238 | name = "ecdsa" 239 | version = "0.16.9" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" 242 | dependencies = [ 243 | "der", 244 | "digest", 245 | "elliptic-curve", 246 | "rfc6979", 247 | "signature", 248 | "spki", 249 | ] 250 | 251 | [[package]] 252 | name = "elliptic-curve" 253 | version = "0.13.8" 254 | source = "registry+https://github.com/rust-lang/crates.io-index" 255 | checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" 256 | dependencies = [ 257 | "base16ct", 258 | "crypto-bigint", 259 | "digest", 260 | "ff", 261 | "generic-array", 262 | "group", 263 | "pem-rfc7468", 264 | "pkcs8", 265 | "rand_core", 266 | "sec1", 267 | "subtle", 268 | "zeroize", 269 | ] 270 | 271 | [[package]] 272 | name = "ff" 273 | version = "0.13.0" 274 | source = "registry+https://github.com/rust-lang/crates.io-index" 275 | checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" 276 | dependencies = [ 277 | "rand_core", 278 | "subtle", 279 | ] 280 | 281 | [[package]] 282 | name = "generic-array" 283 | version = "0.14.7" 284 | source = "registry+https://github.com/rust-lang/crates.io-index" 285 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 286 | dependencies = [ 287 | "typenum", 288 | "version_check", 289 | "zeroize", 290 | ] 291 | 292 | [[package]] 293 | name = "getrandom" 294 | version = "0.2.15" 295 | source = "registry+https://github.com/rust-lang/crates.io-index" 296 | checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" 297 | dependencies = [ 298 | "cfg-if", 299 | "libc", 300 | "wasi", 301 | ] 302 | 303 | [[package]] 304 | name = "glob" 305 | version = "0.3.1" 306 | source = "registry+https://github.com/rust-lang/crates.io-index" 307 | checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" 308 | 309 | [[package]] 310 | name = "group" 311 | version = "0.13.0" 312 | source = "registry+https://github.com/rust-lang/crates.io-index" 313 | checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" 314 | dependencies = [ 315 | "ff", 316 | "rand_core", 317 | "subtle", 318 | ] 319 | 320 | [[package]] 321 | name = "hmac" 322 | version = "0.12.1" 323 | source = "registry+https://github.com/rust-lang/crates.io-index" 324 | checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 325 | dependencies = [ 326 | "digest", 327 | ] 328 | 329 | [[package]] 330 | name = "itoa" 331 | version = "1.0.11" 332 | source = "registry+https://github.com/rust-lang/crates.io-index" 333 | checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" 334 | 335 | [[package]] 336 | name = "java-locator" 337 | version = "0.1.5" 338 | source = "registry+https://github.com/rust-lang/crates.io-index" 339 | checksum = "90003f2fd9c52f212c21d8520f1128da0080bad6fff16b68fe6e7f2f0c3780c2" 340 | dependencies = [ 341 | "glob", 342 | "lazy_static", 343 | ] 344 | 345 | [[package]] 346 | name = "jni" 347 | version = "0.21.1" 348 | source = "registry+https://github.com/rust-lang/crates.io-index" 349 | checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" 350 | dependencies = [ 351 | "cesu8", 352 | "cfg-if", 353 | "combine", 354 | "java-locator", 355 | "jni-sys", 356 | "libloading", 357 | "log", 358 | "thiserror", 359 | "walkdir", 360 | "windows-sys 0.45.0", 361 | ] 362 | 363 | [[package]] 364 | name = "jni-sys" 365 | version = "0.3.0" 366 | source = "registry+https://github.com/rust-lang/crates.io-index" 367 | checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" 368 | 369 | [[package]] 370 | name = "lazy_static" 371 | version = "1.4.0" 372 | source = "registry+https://github.com/rust-lang/crates.io-index" 373 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 374 | 375 | [[package]] 376 | name = "libc" 377 | version = "0.2.155" 378 | source = "registry+https://github.com/rust-lang/crates.io-index" 379 | checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" 380 | 381 | [[package]] 382 | name = "libloading" 383 | version = "0.7.4" 384 | source = "registry+https://github.com/rust-lang/crates.io-index" 385 | checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" 386 | dependencies = [ 387 | "cfg-if", 388 | "winapi", 389 | ] 390 | 391 | [[package]] 392 | name = "log" 393 | version = "0.4.21" 394 | source = "registry+https://github.com/rust-lang/crates.io-index" 395 | checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" 396 | 397 | [[package]] 398 | name = "memchr" 399 | version = "2.7.2" 400 | source = "registry+https://github.com/rust-lang/crates.io-index" 401 | checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" 402 | 403 | [[package]] 404 | name = "minimal-lexical" 405 | version = "0.2.1" 406 | source = "registry+https://github.com/rust-lang/crates.io-index" 407 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 408 | 409 | [[package]] 410 | name = "ndk-context" 411 | version = "0.1.1" 412 | source = "registry+https://github.com/rust-lang/crates.io-index" 413 | checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" 414 | 415 | [[package]] 416 | name = "ndk-sys" 417 | version = "0.6.0+11769913" 418 | source = "registry+https://github.com/rust-lang/crates.io-index" 419 | checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" 420 | dependencies = [ 421 | "jni-sys", 422 | ] 423 | 424 | [[package]] 425 | name = "nom" 426 | version = "7.1.3" 427 | source = "registry+https://github.com/rust-lang/crates.io-index" 428 | checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 429 | dependencies = [ 430 | "memchr", 431 | "minimal-lexical", 432 | ] 433 | 434 | [[package]] 435 | name = "num-bigint" 436 | version = "0.4.6" 437 | source = "registry+https://github.com/rust-lang/crates.io-index" 438 | checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" 439 | dependencies = [ 440 | "num-integer", 441 | "num-traits", 442 | ] 443 | 444 | [[package]] 445 | name = "num-conv" 446 | version = "0.1.0" 447 | source = "registry+https://github.com/rust-lang/crates.io-index" 448 | checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" 449 | 450 | [[package]] 451 | name = "num-integer" 452 | version = "0.1.46" 453 | source = "registry+https://github.com/rust-lang/crates.io-index" 454 | checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 455 | dependencies = [ 456 | "num-traits", 457 | ] 458 | 459 | [[package]] 460 | name = "num-traits" 461 | version = "0.2.19" 462 | source = "registry+https://github.com/rust-lang/crates.io-index" 463 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 464 | dependencies = [ 465 | "autocfg", 466 | ] 467 | 468 | [[package]] 469 | name = "oid-registry" 470 | version = "0.7.0" 471 | source = "registry+https://github.com/rust-lang/crates.io-index" 472 | checksum = "1c958dd45046245b9c3c2547369bb634eb461670b2e7e0de552905801a648d1d" 473 | dependencies = [ 474 | "asn1-rs", 475 | ] 476 | 477 | [[package]] 478 | name = "p256" 479 | version = "0.13.2" 480 | source = "registry+https://github.com/rust-lang/crates.io-index" 481 | checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" 482 | dependencies = [ 483 | "ecdsa", 484 | "elliptic-curve", 485 | "primeorder", 486 | "sha2", 487 | ] 488 | 489 | [[package]] 490 | name = "paste" 491 | version = "1.0.15" 492 | source = "registry+https://github.com/rust-lang/crates.io-index" 493 | checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" 494 | 495 | [[package]] 496 | name = "pem-rfc7468" 497 | version = "0.7.0" 498 | source = "registry+https://github.com/rust-lang/crates.io-index" 499 | checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" 500 | dependencies = [ 501 | "base64ct", 502 | ] 503 | 504 | [[package]] 505 | name = "pkcs8" 506 | version = "0.10.2" 507 | source = "registry+https://github.com/rust-lang/crates.io-index" 508 | checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" 509 | dependencies = [ 510 | "der", 511 | "spki", 512 | ] 513 | 514 | [[package]] 515 | name = "powerfmt" 516 | version = "0.2.0" 517 | source = "registry+https://github.com/rust-lang/crates.io-index" 518 | checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" 519 | 520 | [[package]] 521 | name = "primeorder" 522 | version = "0.13.6" 523 | source = "registry+https://github.com/rust-lang/crates.io-index" 524 | checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" 525 | dependencies = [ 526 | "elliptic-curve", 527 | ] 528 | 529 | [[package]] 530 | name = "proc-macro2" 531 | version = "1.0.83" 532 | source = "registry+https://github.com/rust-lang/crates.io-index" 533 | checksum = "0b33eb56c327dec362a9e55b3ad14f9d2f0904fb5a5b03b513ab5465399e9f43" 534 | dependencies = [ 535 | "unicode-ident", 536 | ] 537 | 538 | [[package]] 539 | name = "quote" 540 | version = "1.0.36" 541 | source = "registry+https://github.com/rust-lang/crates.io-index" 542 | checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" 543 | dependencies = [ 544 | "proc-macro2", 545 | ] 546 | 547 | [[package]] 548 | name = "rand_core" 549 | version = "0.6.4" 550 | source = "registry+https://github.com/rust-lang/crates.io-index" 551 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 552 | dependencies = [ 553 | "getrandom", 554 | ] 555 | 556 | [[package]] 557 | name = "rfc6979" 558 | version = "0.4.0" 559 | source = "registry+https://github.com/rust-lang/crates.io-index" 560 | checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" 561 | dependencies = [ 562 | "hmac", 563 | "subtle", 564 | ] 565 | 566 | [[package]] 567 | name = "rusticata-macros" 568 | version = "4.1.0" 569 | source = "registry+https://github.com/rust-lang/crates.io-index" 570 | checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" 571 | dependencies = [ 572 | "nom", 573 | ] 574 | 575 | [[package]] 576 | name = "same-file" 577 | version = "1.0.6" 578 | source = "registry+https://github.com/rust-lang/crates.io-index" 579 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 580 | dependencies = [ 581 | "winapi-util", 582 | ] 583 | 584 | [[package]] 585 | name = "sec1" 586 | version = "0.7.3" 587 | source = "registry+https://github.com/rust-lang/crates.io-index" 588 | checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" 589 | dependencies = [ 590 | "base16ct", 591 | "der", 592 | "generic-array", 593 | "pkcs8", 594 | "subtle", 595 | "zeroize", 596 | ] 597 | 598 | [[package]] 599 | name = "security-framework" 600 | version = "2.11.1" 601 | source = "registry+https://github.com/rust-lang/crates.io-index" 602 | checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" 603 | dependencies = [ 604 | "bitflags", 605 | "core-foundation", 606 | "core-foundation-sys", 607 | "libc", 608 | "num-bigint", 609 | "security-framework-sys", 610 | ] 611 | 612 | [[package]] 613 | name = "security-framework-sys" 614 | version = "2.11.1" 615 | source = "registry+https://github.com/rust-lang/crates.io-index" 616 | checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" 617 | dependencies = [ 618 | "core-foundation-sys", 619 | "libc", 620 | ] 621 | 622 | [[package]] 623 | name = "serde" 624 | version = "1.0.202" 625 | source = "registry+https://github.com/rust-lang/crates.io-index" 626 | checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" 627 | dependencies = [ 628 | "serde_derive", 629 | ] 630 | 631 | [[package]] 632 | name = "serde_derive" 633 | version = "1.0.202" 634 | source = "registry+https://github.com/rust-lang/crates.io-index" 635 | checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" 636 | dependencies = [ 637 | "proc-macro2", 638 | "quote", 639 | "syn", 640 | ] 641 | 642 | [[package]] 643 | name = "sha2" 644 | version = "0.10.8" 645 | source = "registry+https://github.com/rust-lang/crates.io-index" 646 | checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" 647 | dependencies = [ 648 | "cfg-if", 649 | "cpufeatures", 650 | "digest", 651 | ] 652 | 653 | [[package]] 654 | name = "signature" 655 | version = "2.2.0" 656 | source = "registry+https://github.com/rust-lang/crates.io-index" 657 | checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" 658 | dependencies = [ 659 | "digest", 660 | "rand_core", 661 | ] 662 | 663 | [[package]] 664 | name = "spki" 665 | version = "0.7.3" 666 | source = "registry+https://github.com/rust-lang/crates.io-index" 667 | checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" 668 | dependencies = [ 669 | "base64ct", 670 | "der", 671 | ] 672 | 673 | [[package]] 674 | name = "subtle" 675 | version = "2.5.0" 676 | source = "registry+https://github.com/rust-lang/crates.io-index" 677 | checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" 678 | 679 | [[package]] 680 | name = "syn" 681 | version = "2.0.65" 682 | source = "registry+https://github.com/rust-lang/crates.io-index" 683 | checksum = "d2863d96a84c6439701d7a38f9de935ec562c8832cc55d1dde0f513b52fad106" 684 | dependencies = [ 685 | "proc-macro2", 686 | "quote", 687 | "unicode-ident", 688 | ] 689 | 690 | [[package]] 691 | name = "synstructure" 692 | version = "0.13.1" 693 | source = "registry+https://github.com/rust-lang/crates.io-index" 694 | checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" 695 | dependencies = [ 696 | "proc-macro2", 697 | "quote", 698 | "syn", 699 | ] 700 | 701 | [[package]] 702 | name = "thiserror" 703 | version = "1.0.61" 704 | source = "registry+https://github.com/rust-lang/crates.io-index" 705 | checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" 706 | dependencies = [ 707 | "thiserror-impl", 708 | ] 709 | 710 | [[package]] 711 | name = "thiserror-impl" 712 | version = "1.0.61" 713 | source = "registry+https://github.com/rust-lang/crates.io-index" 714 | checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" 715 | dependencies = [ 716 | "proc-macro2", 717 | "quote", 718 | "syn", 719 | ] 720 | 721 | [[package]] 722 | name = "time" 723 | version = "0.3.36" 724 | source = "registry+https://github.com/rust-lang/crates.io-index" 725 | checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" 726 | dependencies = [ 727 | "deranged", 728 | "itoa", 729 | "num-conv", 730 | "powerfmt", 731 | "serde", 732 | "time-core", 733 | "time-macros", 734 | ] 735 | 736 | [[package]] 737 | name = "time-core" 738 | version = "0.1.2" 739 | source = "registry+https://github.com/rust-lang/crates.io-index" 740 | checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" 741 | 742 | [[package]] 743 | name = "time-macros" 744 | version = "0.2.18" 745 | source = "registry+https://github.com/rust-lang/crates.io-index" 746 | checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" 747 | dependencies = [ 748 | "num-conv", 749 | "time-core", 750 | ] 751 | 752 | [[package]] 753 | name = "typenum" 754 | version = "1.17.0" 755 | source = "registry+https://github.com/rust-lang/crates.io-index" 756 | checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 757 | 758 | [[package]] 759 | name = "unicode-ident" 760 | version = "1.0.12" 761 | source = "registry+https://github.com/rust-lang/crates.io-index" 762 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 763 | 764 | [[package]] 765 | name = "version_check" 766 | version = "0.9.4" 767 | source = "registry+https://github.com/rust-lang/crates.io-index" 768 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 769 | 770 | [[package]] 771 | name = "walkdir" 772 | version = "2.5.0" 773 | source = "registry+https://github.com/rust-lang/crates.io-index" 774 | checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" 775 | dependencies = [ 776 | "same-file", 777 | "winapi-util", 778 | ] 779 | 780 | [[package]] 781 | name = "wasi" 782 | version = "0.11.0+wasi-snapshot-preview1" 783 | source = "registry+https://github.com/rust-lang/crates.io-index" 784 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 785 | 786 | [[package]] 787 | name = "winapi" 788 | version = "0.3.9" 789 | source = "registry+https://github.com/rust-lang/crates.io-index" 790 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 791 | dependencies = [ 792 | "winapi-i686-pc-windows-gnu", 793 | "winapi-x86_64-pc-windows-gnu", 794 | ] 795 | 796 | [[package]] 797 | name = "winapi-i686-pc-windows-gnu" 798 | version = "0.4.0" 799 | source = "registry+https://github.com/rust-lang/crates.io-index" 800 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 801 | 802 | [[package]] 803 | name = "winapi-util" 804 | version = "0.1.8" 805 | source = "registry+https://github.com/rust-lang/crates.io-index" 806 | checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" 807 | dependencies = [ 808 | "windows-sys 0.52.0", 809 | ] 810 | 811 | [[package]] 812 | name = "winapi-x86_64-pc-windows-gnu" 813 | version = "0.4.0" 814 | source = "registry+https://github.com/rust-lang/crates.io-index" 815 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 816 | 817 | [[package]] 818 | name = "windows-sys" 819 | version = "0.45.0" 820 | source = "registry+https://github.com/rust-lang/crates.io-index" 821 | checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" 822 | dependencies = [ 823 | "windows-targets 0.42.2", 824 | ] 825 | 826 | [[package]] 827 | name = "windows-sys" 828 | version = "0.52.0" 829 | source = "registry+https://github.com/rust-lang/crates.io-index" 830 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 831 | dependencies = [ 832 | "windows-targets 0.52.5", 833 | ] 834 | 835 | [[package]] 836 | name = "windows-targets" 837 | version = "0.42.2" 838 | source = "registry+https://github.com/rust-lang/crates.io-index" 839 | checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" 840 | dependencies = [ 841 | "windows_aarch64_gnullvm 0.42.2", 842 | "windows_aarch64_msvc 0.42.2", 843 | "windows_i686_gnu 0.42.2", 844 | "windows_i686_msvc 0.42.2", 845 | "windows_x86_64_gnu 0.42.2", 846 | "windows_x86_64_gnullvm 0.42.2", 847 | "windows_x86_64_msvc 0.42.2", 848 | ] 849 | 850 | [[package]] 851 | name = "windows-targets" 852 | version = "0.52.5" 853 | source = "registry+https://github.com/rust-lang/crates.io-index" 854 | checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" 855 | dependencies = [ 856 | "windows_aarch64_gnullvm 0.52.5", 857 | "windows_aarch64_msvc 0.52.5", 858 | "windows_i686_gnu 0.52.5", 859 | "windows_i686_gnullvm", 860 | "windows_i686_msvc 0.52.5", 861 | "windows_x86_64_gnu 0.52.5", 862 | "windows_x86_64_gnullvm 0.52.5", 863 | "windows_x86_64_msvc 0.52.5", 864 | ] 865 | 866 | [[package]] 867 | name = "windows_aarch64_gnullvm" 868 | version = "0.42.2" 869 | source = "registry+https://github.com/rust-lang/crates.io-index" 870 | checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" 871 | 872 | [[package]] 873 | name = "windows_aarch64_gnullvm" 874 | version = "0.52.5" 875 | source = "registry+https://github.com/rust-lang/crates.io-index" 876 | checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" 877 | 878 | [[package]] 879 | name = "windows_aarch64_msvc" 880 | version = "0.42.2" 881 | source = "registry+https://github.com/rust-lang/crates.io-index" 882 | checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" 883 | 884 | [[package]] 885 | name = "windows_aarch64_msvc" 886 | version = "0.52.5" 887 | source = "registry+https://github.com/rust-lang/crates.io-index" 888 | checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" 889 | 890 | [[package]] 891 | name = "windows_i686_gnu" 892 | version = "0.42.2" 893 | source = "registry+https://github.com/rust-lang/crates.io-index" 894 | checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" 895 | 896 | [[package]] 897 | name = "windows_i686_gnu" 898 | version = "0.52.5" 899 | source = "registry+https://github.com/rust-lang/crates.io-index" 900 | checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" 901 | 902 | [[package]] 903 | name = "windows_i686_gnullvm" 904 | version = "0.52.5" 905 | source = "registry+https://github.com/rust-lang/crates.io-index" 906 | checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" 907 | 908 | [[package]] 909 | name = "windows_i686_msvc" 910 | version = "0.42.2" 911 | source = "registry+https://github.com/rust-lang/crates.io-index" 912 | checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" 913 | 914 | [[package]] 915 | name = "windows_i686_msvc" 916 | version = "0.52.5" 917 | source = "registry+https://github.com/rust-lang/crates.io-index" 918 | checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" 919 | 920 | [[package]] 921 | name = "windows_x86_64_gnu" 922 | version = "0.42.2" 923 | source = "registry+https://github.com/rust-lang/crates.io-index" 924 | checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" 925 | 926 | [[package]] 927 | name = "windows_x86_64_gnu" 928 | version = "0.52.5" 929 | source = "registry+https://github.com/rust-lang/crates.io-index" 930 | checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" 931 | 932 | [[package]] 933 | name = "windows_x86_64_gnullvm" 934 | version = "0.42.2" 935 | source = "registry+https://github.com/rust-lang/crates.io-index" 936 | checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" 937 | 938 | [[package]] 939 | name = "windows_x86_64_gnullvm" 940 | version = "0.52.5" 941 | source = "registry+https://github.com/rust-lang/crates.io-index" 942 | checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" 943 | 944 | [[package]] 945 | name = "windows_x86_64_msvc" 946 | version = "0.42.2" 947 | source = "registry+https://github.com/rust-lang/crates.io-index" 948 | checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" 949 | 950 | [[package]] 951 | name = "windows_x86_64_msvc" 952 | version = "0.52.5" 953 | source = "registry+https://github.com/rust-lang/crates.io-index" 954 | checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" 955 | 956 | [[package]] 957 | name = "x509-parser" 958 | version = "0.16.0" 959 | source = "registry+https://github.com/rust-lang/crates.io-index" 960 | checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69" 961 | dependencies = [ 962 | "asn1-rs", 963 | "data-encoding", 964 | "der-parser", 965 | "lazy_static", 966 | "nom", 967 | "oid-registry", 968 | "rusticata-macros", 969 | "thiserror", 970 | "time", 971 | ] 972 | 973 | [[package]] 974 | name = "zeroize" 975 | version = "1.7.0" 976 | source = "registry+https://github.com/rust-lang/crates.io-index" 977 | checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" 978 | -------------------------------------------------------------------------------- /examples/mobile_tests/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "aead" 7 | version = "0.5.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" 10 | dependencies = [ 11 | "crypto-common", 12 | "generic-array", 13 | ] 14 | 15 | [[package]] 16 | name = "aes" 17 | version = "0.8.4" 18 | source = "registry+https://github.com/rust-lang/crates.io-index" 19 | checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" 20 | dependencies = [ 21 | "cfg-if", 22 | "cipher", 23 | "cpufeatures", 24 | ] 25 | 26 | [[package]] 27 | name = "aes-gcm" 28 | version = "0.10.3" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" 31 | dependencies = [ 32 | "aead", 33 | "aes", 34 | "cipher", 35 | "ctr", 36 | "ghash", 37 | "subtle", 38 | ] 39 | 40 | [[package]] 41 | name = "animo-secure-env" 42 | version = "0.4.0" 43 | dependencies = [ 44 | "jni", 45 | "lazy_static", 46 | "libc", 47 | "ndk-context", 48 | "ndk-sys", 49 | "p256", 50 | "paste", 51 | "security-framework", 52 | "thiserror", 53 | "x509-parser", 54 | ] 55 | 56 | [[package]] 57 | name = "askar-crypto" 58 | version = "0.3.1" 59 | source = "registry+https://github.com/rust-lang/crates.io-index" 60 | checksum = "39746932b19e345196a089e61a0f0175fc4d673db4b624424d8babf505e48a3d" 61 | dependencies = [ 62 | "aead", 63 | "aes", 64 | "aes-gcm", 65 | "base64", 66 | "blake2", 67 | "block-modes", 68 | "bls12_381", 69 | "cbc", 70 | "chacha20", 71 | "chacha20poly1305", 72 | "cipher", 73 | "crypto_box", 74 | "curve25519-dalek", 75 | "digest", 76 | "ed25519-dalek", 77 | "elliptic-curve", 78 | "group", 79 | "hkdf", 80 | "hmac", 81 | "k256", 82 | "p256", 83 | "p384", 84 | "rand", 85 | "serde", 86 | "serde-json-core", 87 | "sha2", 88 | "subtle", 89 | "x25519-dalek", 90 | "zeroize", 91 | ] 92 | 93 | [[package]] 94 | name = "asn1-rs" 95 | version = "0.6.1" 96 | source = "registry+https://github.com/rust-lang/crates.io-index" 97 | checksum = "22ad1373757efa0f70ec53939aabc7152e1591cb485208052993070ac8d2429d" 98 | dependencies = [ 99 | "asn1-rs-derive", 100 | "asn1-rs-impl", 101 | "displaydoc", 102 | "nom", 103 | "num-traits", 104 | "rusticata-macros", 105 | "thiserror", 106 | "time", 107 | ] 108 | 109 | [[package]] 110 | name = "asn1-rs-derive" 111 | version = "0.5.0" 112 | source = "registry+https://github.com/rust-lang/crates.io-index" 113 | checksum = "7378575ff571966e99a744addeff0bff98b8ada0dedf1956d59e634db95eaac1" 114 | dependencies = [ 115 | "proc-macro2", 116 | "quote", 117 | "syn", 118 | "synstructure", 119 | ] 120 | 121 | [[package]] 122 | name = "asn1-rs-impl" 123 | version = "0.2.0" 124 | source = "registry+https://github.com/rust-lang/crates.io-index" 125 | checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" 126 | dependencies = [ 127 | "proc-macro2", 128 | "quote", 129 | "syn", 130 | ] 131 | 132 | [[package]] 133 | name = "autocfg" 134 | version = "1.1.0" 135 | source = "registry+https://github.com/rust-lang/crates.io-index" 136 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 137 | 138 | [[package]] 139 | name = "base16ct" 140 | version = "0.2.0" 141 | source = "registry+https://github.com/rust-lang/crates.io-index" 142 | checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" 143 | 144 | [[package]] 145 | name = "base64" 146 | version = "0.21.7" 147 | source = "registry+https://github.com/rust-lang/crates.io-index" 148 | checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" 149 | 150 | [[package]] 151 | name = "base64ct" 152 | version = "1.6.0" 153 | source = "registry+https://github.com/rust-lang/crates.io-index" 154 | checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" 155 | 156 | [[package]] 157 | name = "bitflags" 158 | version = "2.6.0" 159 | source = "registry+https://github.com/rust-lang/crates.io-index" 160 | checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" 161 | 162 | [[package]] 163 | name = "blake2" 164 | version = "0.10.6" 165 | source = "registry+https://github.com/rust-lang/crates.io-index" 166 | checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" 167 | dependencies = [ 168 | "digest", 169 | ] 170 | 171 | [[package]] 172 | name = "block-buffer" 173 | version = "0.10.4" 174 | source = "registry+https://github.com/rust-lang/crates.io-index" 175 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 176 | dependencies = [ 177 | "generic-array", 178 | ] 179 | 180 | [[package]] 181 | name = "block-modes" 182 | version = "0.9.1" 183 | source = "registry+https://github.com/rust-lang/crates.io-index" 184 | checksum = "9e2211b0817f061502a8dd9f11a37e879e79763e3c698d2418cf824d8cb2f21e" 185 | 186 | [[package]] 187 | name = "block-padding" 188 | version = "0.3.3" 189 | source = "registry+https://github.com/rust-lang/crates.io-index" 190 | checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" 191 | dependencies = [ 192 | "generic-array", 193 | ] 194 | 195 | [[package]] 196 | name = "bls12_381" 197 | version = "0.8.0" 198 | source = "registry+https://github.com/rust-lang/crates.io-index" 199 | checksum = "d7bc6d6292be3a19e6379786dac800f551e5865a5bb51ebbe3064ab80433f403" 200 | dependencies = [ 201 | "ff", 202 | "group", 203 | "rand_core", 204 | "subtle", 205 | "zeroize", 206 | ] 207 | 208 | [[package]] 209 | name = "bytes" 210 | version = "1.5.0" 211 | source = "registry+https://github.com/rust-lang/crates.io-index" 212 | checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" 213 | 214 | [[package]] 215 | name = "cbc" 216 | version = "0.1.2" 217 | source = "registry+https://github.com/rust-lang/crates.io-index" 218 | checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" 219 | dependencies = [ 220 | "cipher", 221 | ] 222 | 223 | [[package]] 224 | name = "cesu8" 225 | version = "1.1.0" 226 | source = "registry+https://github.com/rust-lang/crates.io-index" 227 | checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" 228 | 229 | [[package]] 230 | name = "cfg-if" 231 | version = "1.0.0" 232 | source = "registry+https://github.com/rust-lang/crates.io-index" 233 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 234 | 235 | [[package]] 236 | name = "chacha20" 237 | version = "0.9.1" 238 | source = "registry+https://github.com/rust-lang/crates.io-index" 239 | checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" 240 | dependencies = [ 241 | "cfg-if", 242 | "cipher", 243 | "cpufeatures", 244 | ] 245 | 246 | [[package]] 247 | name = "chacha20poly1305" 248 | version = "0.10.1" 249 | source = "registry+https://github.com/rust-lang/crates.io-index" 250 | checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" 251 | dependencies = [ 252 | "aead", 253 | "chacha20", 254 | "cipher", 255 | "poly1305", 256 | "zeroize", 257 | ] 258 | 259 | [[package]] 260 | name = "cipher" 261 | version = "0.4.4" 262 | source = "registry+https://github.com/rust-lang/crates.io-index" 263 | checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" 264 | dependencies = [ 265 | "crypto-common", 266 | "inout", 267 | "zeroize", 268 | ] 269 | 270 | [[package]] 271 | name = "combine" 272 | version = "4.6.6" 273 | source = "registry+https://github.com/rust-lang/crates.io-index" 274 | checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" 275 | dependencies = [ 276 | "bytes", 277 | "memchr", 278 | ] 279 | 280 | [[package]] 281 | name = "const-oid" 282 | version = "0.9.6" 283 | source = "registry+https://github.com/rust-lang/crates.io-index" 284 | checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" 285 | 286 | [[package]] 287 | name = "core-foundation" 288 | version = "0.9.4" 289 | source = "registry+https://github.com/rust-lang/crates.io-index" 290 | checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" 291 | dependencies = [ 292 | "core-foundation-sys", 293 | "libc", 294 | ] 295 | 296 | [[package]] 297 | name = "core-foundation-sys" 298 | version = "0.8.6" 299 | source = "registry+https://github.com/rust-lang/crates.io-index" 300 | checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" 301 | 302 | [[package]] 303 | name = "cpufeatures" 304 | version = "0.2.12" 305 | source = "registry+https://github.com/rust-lang/crates.io-index" 306 | checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" 307 | dependencies = [ 308 | "libc", 309 | ] 310 | 311 | [[package]] 312 | name = "crypto-bigint" 313 | version = "0.5.5" 314 | source = "registry+https://github.com/rust-lang/crates.io-index" 315 | checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" 316 | dependencies = [ 317 | "generic-array", 318 | "rand_core", 319 | "subtle", 320 | "zeroize", 321 | ] 322 | 323 | [[package]] 324 | name = "crypto-common" 325 | version = "0.1.6" 326 | source = "registry+https://github.com/rust-lang/crates.io-index" 327 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 328 | dependencies = [ 329 | "generic-array", 330 | "rand_core", 331 | "typenum", 332 | ] 333 | 334 | [[package]] 335 | name = "crypto_box" 336 | version = "0.9.1" 337 | source = "registry+https://github.com/rust-lang/crates.io-index" 338 | checksum = "16182b4f39a82ec8a6851155cc4c0cda3065bb1db33651726a29e1951de0f009" 339 | dependencies = [ 340 | "aead", 341 | "crypto_secretbox", 342 | "curve25519-dalek", 343 | "salsa20", 344 | "subtle", 345 | "zeroize", 346 | ] 347 | 348 | [[package]] 349 | name = "crypto_secretbox" 350 | version = "0.1.1" 351 | source = "registry+https://github.com/rust-lang/crates.io-index" 352 | checksum = "b9d6cf87adf719ddf43a805e92c6870a531aedda35ff640442cbaf8674e141e1" 353 | dependencies = [ 354 | "aead", 355 | "cipher", 356 | "generic-array", 357 | "poly1305", 358 | "salsa20", 359 | "subtle", 360 | "zeroize", 361 | ] 362 | 363 | [[package]] 364 | name = "ctr" 365 | version = "0.9.2" 366 | source = "registry+https://github.com/rust-lang/crates.io-index" 367 | checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" 368 | dependencies = [ 369 | "cipher", 370 | ] 371 | 372 | [[package]] 373 | name = "curve25519-dalek" 374 | version = "4.1.2" 375 | source = "registry+https://github.com/rust-lang/crates.io-index" 376 | checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" 377 | dependencies = [ 378 | "cfg-if", 379 | "cpufeatures", 380 | "curve25519-dalek-derive", 381 | "digest", 382 | "fiat-crypto", 383 | "platforms", 384 | "rustc_version", 385 | "subtle", 386 | "zeroize", 387 | ] 388 | 389 | [[package]] 390 | name = "curve25519-dalek-derive" 391 | version = "0.1.1" 392 | source = "registry+https://github.com/rust-lang/crates.io-index" 393 | checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" 394 | dependencies = [ 395 | "proc-macro2", 396 | "quote", 397 | "syn", 398 | ] 399 | 400 | [[package]] 401 | name = "data-encoding" 402 | version = "2.5.0" 403 | source = "registry+https://github.com/rust-lang/crates.io-index" 404 | checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" 405 | 406 | [[package]] 407 | name = "der" 408 | version = "0.7.8" 409 | source = "registry+https://github.com/rust-lang/crates.io-index" 410 | checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" 411 | dependencies = [ 412 | "const-oid", 413 | "pem-rfc7468", 414 | "zeroize", 415 | ] 416 | 417 | [[package]] 418 | name = "der-parser" 419 | version = "9.0.0" 420 | source = "registry+https://github.com/rust-lang/crates.io-index" 421 | checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" 422 | dependencies = [ 423 | "asn1-rs", 424 | "displaydoc", 425 | "nom", 426 | "num-bigint", 427 | "num-traits", 428 | "rusticata-macros", 429 | ] 430 | 431 | [[package]] 432 | name = "deranged" 433 | version = "0.3.11" 434 | source = "registry+https://github.com/rust-lang/crates.io-index" 435 | checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" 436 | dependencies = [ 437 | "powerfmt", 438 | ] 439 | 440 | [[package]] 441 | name = "digest" 442 | version = "0.10.7" 443 | source = "registry+https://github.com/rust-lang/crates.io-index" 444 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 445 | dependencies = [ 446 | "block-buffer", 447 | "const-oid", 448 | "crypto-common", 449 | "subtle", 450 | ] 451 | 452 | [[package]] 453 | name = "displaydoc" 454 | version = "0.2.4" 455 | source = "registry+https://github.com/rust-lang/crates.io-index" 456 | checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" 457 | dependencies = [ 458 | "proc-macro2", 459 | "quote", 460 | "syn", 461 | ] 462 | 463 | [[package]] 464 | name = "ecdsa" 465 | version = "0.16.9" 466 | source = "registry+https://github.com/rust-lang/crates.io-index" 467 | checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" 468 | dependencies = [ 469 | "der", 470 | "digest", 471 | "elliptic-curve", 472 | "rfc6979", 473 | "signature", 474 | "spki", 475 | ] 476 | 477 | [[package]] 478 | name = "ed25519" 479 | version = "2.2.3" 480 | source = "registry+https://github.com/rust-lang/crates.io-index" 481 | checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" 482 | dependencies = [ 483 | "signature", 484 | ] 485 | 486 | [[package]] 487 | name = "ed25519-dalek" 488 | version = "2.1.1" 489 | source = "registry+https://github.com/rust-lang/crates.io-index" 490 | checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" 491 | dependencies = [ 492 | "curve25519-dalek", 493 | "ed25519", 494 | "sha2", 495 | "subtle", 496 | "zeroize", 497 | ] 498 | 499 | [[package]] 500 | name = "elliptic-curve" 501 | version = "0.13.8" 502 | source = "registry+https://github.com/rust-lang/crates.io-index" 503 | checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" 504 | dependencies = [ 505 | "base16ct", 506 | "crypto-bigint", 507 | "digest", 508 | "ff", 509 | "generic-array", 510 | "group", 511 | "hkdf", 512 | "pem-rfc7468", 513 | "pkcs8", 514 | "rand_core", 515 | "sec1", 516 | "subtle", 517 | "zeroize", 518 | ] 519 | 520 | [[package]] 521 | name = "ff" 522 | version = "0.13.0" 523 | source = "registry+https://github.com/rust-lang/crates.io-index" 524 | checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" 525 | dependencies = [ 526 | "rand_core", 527 | "subtle", 528 | ] 529 | 530 | [[package]] 531 | name = "fiat-crypto" 532 | version = "0.2.6" 533 | source = "registry+https://github.com/rust-lang/crates.io-index" 534 | checksum = "1676f435fc1dadde4d03e43f5d62b259e1ce5f40bd4ffb21db2b42ebe59c1382" 535 | 536 | [[package]] 537 | name = "generic-array" 538 | version = "0.14.7" 539 | source = "registry+https://github.com/rust-lang/crates.io-index" 540 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 541 | dependencies = [ 542 | "typenum", 543 | "version_check", 544 | "zeroize", 545 | ] 546 | 547 | [[package]] 548 | name = "getrandom" 549 | version = "0.2.12" 550 | source = "registry+https://github.com/rust-lang/crates.io-index" 551 | checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" 552 | dependencies = [ 553 | "cfg-if", 554 | "libc", 555 | "wasi", 556 | ] 557 | 558 | [[package]] 559 | name = "ghash" 560 | version = "0.5.0" 561 | source = "registry+https://github.com/rust-lang/crates.io-index" 562 | checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" 563 | dependencies = [ 564 | "opaque-debug", 565 | "polyval", 566 | ] 567 | 568 | [[package]] 569 | name = "glob" 570 | version = "0.3.1" 571 | source = "registry+https://github.com/rust-lang/crates.io-index" 572 | checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" 573 | 574 | [[package]] 575 | name = "group" 576 | version = "0.13.0" 577 | source = "registry+https://github.com/rust-lang/crates.io-index" 578 | checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" 579 | dependencies = [ 580 | "ff", 581 | "rand_core", 582 | "subtle", 583 | ] 584 | 585 | [[package]] 586 | name = "hkdf" 587 | version = "0.12.4" 588 | source = "registry+https://github.com/rust-lang/crates.io-index" 589 | checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" 590 | dependencies = [ 591 | "hmac", 592 | ] 593 | 594 | [[package]] 595 | name = "hmac" 596 | version = "0.12.1" 597 | source = "registry+https://github.com/rust-lang/crates.io-index" 598 | checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 599 | dependencies = [ 600 | "digest", 601 | ] 602 | 603 | [[package]] 604 | name = "inout" 605 | version = "0.1.3" 606 | source = "registry+https://github.com/rust-lang/crates.io-index" 607 | checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" 608 | dependencies = [ 609 | "block-padding", 610 | "generic-array", 611 | ] 612 | 613 | [[package]] 614 | name = "itoa" 615 | version = "1.0.10" 616 | source = "registry+https://github.com/rust-lang/crates.io-index" 617 | checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" 618 | 619 | [[package]] 620 | name = "java-locator" 621 | version = "0.1.5" 622 | source = "registry+https://github.com/rust-lang/crates.io-index" 623 | checksum = "90003f2fd9c52f212c21d8520f1128da0080bad6fff16b68fe6e7f2f0c3780c2" 624 | dependencies = [ 625 | "glob", 626 | "lazy_static", 627 | ] 628 | 629 | [[package]] 630 | name = "jni" 631 | version = "0.21.1" 632 | source = "registry+https://github.com/rust-lang/crates.io-index" 633 | checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" 634 | dependencies = [ 635 | "cesu8", 636 | "cfg-if", 637 | "combine", 638 | "java-locator", 639 | "jni-sys", 640 | "libloading", 641 | "log", 642 | "thiserror", 643 | "walkdir", 644 | "windows-sys", 645 | ] 646 | 647 | [[package]] 648 | name = "jni-sys" 649 | version = "0.3.0" 650 | source = "registry+https://github.com/rust-lang/crates.io-index" 651 | checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" 652 | 653 | [[package]] 654 | name = "k256" 655 | version = "0.13.3" 656 | source = "registry+https://github.com/rust-lang/crates.io-index" 657 | checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" 658 | dependencies = [ 659 | "cfg-if", 660 | "ecdsa", 661 | "elliptic-curve", 662 | "sha2", 663 | ] 664 | 665 | [[package]] 666 | name = "lazy_static" 667 | version = "1.4.0" 668 | source = "registry+https://github.com/rust-lang/crates.io-index" 669 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 670 | 671 | [[package]] 672 | name = "libc" 673 | version = "0.2.155" 674 | source = "registry+https://github.com/rust-lang/crates.io-index" 675 | checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" 676 | 677 | [[package]] 678 | name = "libloading" 679 | version = "0.7.4" 680 | source = "registry+https://github.com/rust-lang/crates.io-index" 681 | checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" 682 | dependencies = [ 683 | "cfg-if", 684 | "winapi", 685 | ] 686 | 687 | [[package]] 688 | name = "log" 689 | version = "0.4.20" 690 | source = "registry+https://github.com/rust-lang/crates.io-index" 691 | checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" 692 | 693 | [[package]] 694 | name = "memchr" 695 | version = "2.7.1" 696 | source = "registry+https://github.com/rust-lang/crates.io-index" 697 | checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" 698 | 699 | [[package]] 700 | name = "minimal-lexical" 701 | version = "0.2.1" 702 | source = "registry+https://github.com/rust-lang/crates.io-index" 703 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 704 | 705 | [[package]] 706 | name = "mobile_tests" 707 | version = "0.1.0" 708 | dependencies = [ 709 | "animo-secure-env", 710 | "askar-crypto", 711 | "p256", 712 | "uuid", 713 | ] 714 | 715 | [[package]] 716 | name = "ndk-context" 717 | version = "0.1.1" 718 | source = "registry+https://github.com/rust-lang/crates.io-index" 719 | checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" 720 | 721 | [[package]] 722 | name = "ndk-sys" 723 | version = "0.6.0+11769913" 724 | source = "registry+https://github.com/rust-lang/crates.io-index" 725 | checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" 726 | dependencies = [ 727 | "jni-sys", 728 | ] 729 | 730 | [[package]] 731 | name = "nom" 732 | version = "7.1.3" 733 | source = "registry+https://github.com/rust-lang/crates.io-index" 734 | checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 735 | dependencies = [ 736 | "memchr", 737 | "minimal-lexical", 738 | ] 739 | 740 | [[package]] 741 | name = "num-bigint" 742 | version = "0.4.6" 743 | source = "registry+https://github.com/rust-lang/crates.io-index" 744 | checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" 745 | dependencies = [ 746 | "num-integer", 747 | "num-traits", 748 | ] 749 | 750 | [[package]] 751 | name = "num-conv" 752 | version = "0.1.0" 753 | source = "registry+https://github.com/rust-lang/crates.io-index" 754 | checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" 755 | 756 | [[package]] 757 | name = "num-integer" 758 | version = "0.1.46" 759 | source = "registry+https://github.com/rust-lang/crates.io-index" 760 | checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 761 | dependencies = [ 762 | "num-traits", 763 | ] 764 | 765 | [[package]] 766 | name = "num-traits" 767 | version = "0.2.18" 768 | source = "registry+https://github.com/rust-lang/crates.io-index" 769 | checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" 770 | dependencies = [ 771 | "autocfg", 772 | ] 773 | 774 | [[package]] 775 | name = "oid-registry" 776 | version = "0.7.0" 777 | source = "registry+https://github.com/rust-lang/crates.io-index" 778 | checksum = "1c958dd45046245b9c3c2547369bb634eb461670b2e7e0de552905801a648d1d" 779 | dependencies = [ 780 | "asn1-rs", 781 | ] 782 | 783 | [[package]] 784 | name = "opaque-debug" 785 | version = "0.3.0" 786 | source = "registry+https://github.com/rust-lang/crates.io-index" 787 | checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" 788 | 789 | [[package]] 790 | name = "p256" 791 | version = "0.13.2" 792 | source = "registry+https://github.com/rust-lang/crates.io-index" 793 | checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" 794 | dependencies = [ 795 | "ecdsa", 796 | "elliptic-curve", 797 | "primeorder", 798 | "sha2", 799 | ] 800 | 801 | [[package]] 802 | name = "p384" 803 | version = "0.13.0" 804 | source = "registry+https://github.com/rust-lang/crates.io-index" 805 | checksum = "70786f51bcc69f6a4c0360e063a4cac5419ef7c5cd5b3c99ad70f3be5ba79209" 806 | dependencies = [ 807 | "ecdsa", 808 | "elliptic-curve", 809 | "primeorder", 810 | "sha2", 811 | ] 812 | 813 | [[package]] 814 | name = "paste" 815 | version = "1.0.15" 816 | source = "registry+https://github.com/rust-lang/crates.io-index" 817 | checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" 818 | 819 | [[package]] 820 | name = "pem-rfc7468" 821 | version = "0.7.0" 822 | source = "registry+https://github.com/rust-lang/crates.io-index" 823 | checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" 824 | dependencies = [ 825 | "base64ct", 826 | ] 827 | 828 | [[package]] 829 | name = "pkcs8" 830 | version = "0.10.2" 831 | source = "registry+https://github.com/rust-lang/crates.io-index" 832 | checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" 833 | dependencies = [ 834 | "der", 835 | "spki", 836 | ] 837 | 838 | [[package]] 839 | name = "platforms" 840 | version = "3.3.0" 841 | source = "registry+https://github.com/rust-lang/crates.io-index" 842 | checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" 843 | 844 | [[package]] 845 | name = "poly1305" 846 | version = "0.8.0" 847 | source = "registry+https://github.com/rust-lang/crates.io-index" 848 | checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" 849 | dependencies = [ 850 | "cpufeatures", 851 | "opaque-debug", 852 | "universal-hash", 853 | ] 854 | 855 | [[package]] 856 | name = "polyval" 857 | version = "0.6.1" 858 | source = "registry+https://github.com/rust-lang/crates.io-index" 859 | checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" 860 | dependencies = [ 861 | "cfg-if", 862 | "cpufeatures", 863 | "opaque-debug", 864 | "universal-hash", 865 | ] 866 | 867 | [[package]] 868 | name = "powerfmt" 869 | version = "0.2.0" 870 | source = "registry+https://github.com/rust-lang/crates.io-index" 871 | checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" 872 | 873 | [[package]] 874 | name = "ppv-lite86" 875 | version = "0.2.17" 876 | source = "registry+https://github.com/rust-lang/crates.io-index" 877 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 878 | 879 | [[package]] 880 | name = "primeorder" 881 | version = "0.13.6" 882 | source = "registry+https://github.com/rust-lang/crates.io-index" 883 | checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" 884 | dependencies = [ 885 | "elliptic-curve", 886 | ] 887 | 888 | [[package]] 889 | name = "proc-macro2" 890 | version = "1.0.78" 891 | source = "registry+https://github.com/rust-lang/crates.io-index" 892 | checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" 893 | dependencies = [ 894 | "unicode-ident", 895 | ] 896 | 897 | [[package]] 898 | name = "quote" 899 | version = "1.0.35" 900 | source = "registry+https://github.com/rust-lang/crates.io-index" 901 | checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" 902 | dependencies = [ 903 | "proc-macro2", 904 | ] 905 | 906 | [[package]] 907 | name = "rand" 908 | version = "0.8.5" 909 | source = "registry+https://github.com/rust-lang/crates.io-index" 910 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 911 | dependencies = [ 912 | "libc", 913 | "rand_chacha", 914 | "rand_core", 915 | ] 916 | 917 | [[package]] 918 | name = "rand_chacha" 919 | version = "0.3.1" 920 | source = "registry+https://github.com/rust-lang/crates.io-index" 921 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 922 | dependencies = [ 923 | "ppv-lite86", 924 | "rand_core", 925 | ] 926 | 927 | [[package]] 928 | name = "rand_core" 929 | version = "0.6.4" 930 | source = "registry+https://github.com/rust-lang/crates.io-index" 931 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 932 | dependencies = [ 933 | "getrandom", 934 | ] 935 | 936 | [[package]] 937 | name = "rfc6979" 938 | version = "0.4.0" 939 | source = "registry+https://github.com/rust-lang/crates.io-index" 940 | checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" 941 | dependencies = [ 942 | "hmac", 943 | "subtle", 944 | ] 945 | 946 | [[package]] 947 | name = "rustc_version" 948 | version = "0.4.0" 949 | source = "registry+https://github.com/rust-lang/crates.io-index" 950 | checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" 951 | dependencies = [ 952 | "semver", 953 | ] 954 | 955 | [[package]] 956 | name = "rusticata-macros" 957 | version = "4.1.0" 958 | source = "registry+https://github.com/rust-lang/crates.io-index" 959 | checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" 960 | dependencies = [ 961 | "nom", 962 | ] 963 | 964 | [[package]] 965 | name = "ryu" 966 | version = "1.0.17" 967 | source = "registry+https://github.com/rust-lang/crates.io-index" 968 | checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" 969 | 970 | [[package]] 971 | name = "salsa20" 972 | version = "0.10.2" 973 | source = "registry+https://github.com/rust-lang/crates.io-index" 974 | checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" 975 | dependencies = [ 976 | "cipher", 977 | ] 978 | 979 | [[package]] 980 | name = "same-file" 981 | version = "1.0.6" 982 | source = "registry+https://github.com/rust-lang/crates.io-index" 983 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 984 | dependencies = [ 985 | "winapi-util", 986 | ] 987 | 988 | [[package]] 989 | name = "sec1" 990 | version = "0.7.3" 991 | source = "registry+https://github.com/rust-lang/crates.io-index" 992 | checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" 993 | dependencies = [ 994 | "base16ct", 995 | "der", 996 | "generic-array", 997 | "pkcs8", 998 | "subtle", 999 | "zeroize", 1000 | ] 1001 | 1002 | [[package]] 1003 | name = "security-framework" 1004 | version = "2.11.1" 1005 | source = "registry+https://github.com/rust-lang/crates.io-index" 1006 | checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" 1007 | dependencies = [ 1008 | "bitflags", 1009 | "core-foundation", 1010 | "core-foundation-sys", 1011 | "libc", 1012 | "num-bigint", 1013 | "security-framework-sys", 1014 | ] 1015 | 1016 | [[package]] 1017 | name = "security-framework-sys" 1018 | version = "2.11.1" 1019 | source = "registry+https://github.com/rust-lang/crates.io-index" 1020 | checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" 1021 | dependencies = [ 1022 | "core-foundation-sys", 1023 | "libc", 1024 | ] 1025 | 1026 | [[package]] 1027 | name = "semver" 1028 | version = "1.0.22" 1029 | source = "registry+https://github.com/rust-lang/crates.io-index" 1030 | checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" 1031 | 1032 | [[package]] 1033 | name = "serde" 1034 | version = "1.0.197" 1035 | source = "registry+https://github.com/rust-lang/crates.io-index" 1036 | checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" 1037 | dependencies = [ 1038 | "serde_derive", 1039 | ] 1040 | 1041 | [[package]] 1042 | name = "serde-json-core" 1043 | version = "0.5.1" 1044 | source = "registry+https://github.com/rust-lang/crates.io-index" 1045 | checksum = "3c9e1ab533c0bc414c34920ec7e5f097101d126ed5eac1a1aac711222e0bbb33" 1046 | dependencies = [ 1047 | "ryu", 1048 | "serde", 1049 | ] 1050 | 1051 | [[package]] 1052 | name = "serde_derive" 1053 | version = "1.0.197" 1054 | source = "registry+https://github.com/rust-lang/crates.io-index" 1055 | checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" 1056 | dependencies = [ 1057 | "proc-macro2", 1058 | "quote", 1059 | "syn", 1060 | ] 1061 | 1062 | [[package]] 1063 | name = "sha2" 1064 | version = "0.10.8" 1065 | source = "registry+https://github.com/rust-lang/crates.io-index" 1066 | checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" 1067 | dependencies = [ 1068 | "cfg-if", 1069 | "cpufeatures", 1070 | "digest", 1071 | ] 1072 | 1073 | [[package]] 1074 | name = "signature" 1075 | version = "2.2.0" 1076 | source = "registry+https://github.com/rust-lang/crates.io-index" 1077 | checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" 1078 | dependencies = [ 1079 | "digest", 1080 | "rand_core", 1081 | ] 1082 | 1083 | [[package]] 1084 | name = "spki" 1085 | version = "0.7.3" 1086 | source = "registry+https://github.com/rust-lang/crates.io-index" 1087 | checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" 1088 | dependencies = [ 1089 | "base64ct", 1090 | "der", 1091 | ] 1092 | 1093 | [[package]] 1094 | name = "subtle" 1095 | version = "2.5.0" 1096 | source = "registry+https://github.com/rust-lang/crates.io-index" 1097 | checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" 1098 | 1099 | [[package]] 1100 | name = "syn" 1101 | version = "2.0.50" 1102 | source = "registry+https://github.com/rust-lang/crates.io-index" 1103 | checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" 1104 | dependencies = [ 1105 | "proc-macro2", 1106 | "quote", 1107 | "unicode-ident", 1108 | ] 1109 | 1110 | [[package]] 1111 | name = "synstructure" 1112 | version = "0.13.1" 1113 | source = "registry+https://github.com/rust-lang/crates.io-index" 1114 | checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" 1115 | dependencies = [ 1116 | "proc-macro2", 1117 | "quote", 1118 | "syn", 1119 | ] 1120 | 1121 | [[package]] 1122 | name = "thiserror" 1123 | version = "1.0.60" 1124 | source = "registry+https://github.com/rust-lang/crates.io-index" 1125 | checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" 1126 | dependencies = [ 1127 | "thiserror-impl", 1128 | ] 1129 | 1130 | [[package]] 1131 | name = "thiserror-impl" 1132 | version = "1.0.60" 1133 | source = "registry+https://github.com/rust-lang/crates.io-index" 1134 | checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" 1135 | dependencies = [ 1136 | "proc-macro2", 1137 | "quote", 1138 | "syn", 1139 | ] 1140 | 1141 | [[package]] 1142 | name = "time" 1143 | version = "0.3.34" 1144 | source = "registry+https://github.com/rust-lang/crates.io-index" 1145 | checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" 1146 | dependencies = [ 1147 | "deranged", 1148 | "itoa", 1149 | "num-conv", 1150 | "powerfmt", 1151 | "serde", 1152 | "time-core", 1153 | "time-macros", 1154 | ] 1155 | 1156 | [[package]] 1157 | name = "time-core" 1158 | version = "0.1.2" 1159 | source = "registry+https://github.com/rust-lang/crates.io-index" 1160 | checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" 1161 | 1162 | [[package]] 1163 | name = "time-macros" 1164 | version = "0.2.17" 1165 | source = "registry+https://github.com/rust-lang/crates.io-index" 1166 | checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" 1167 | dependencies = [ 1168 | "num-conv", 1169 | "time-core", 1170 | ] 1171 | 1172 | [[package]] 1173 | name = "typenum" 1174 | version = "1.17.0" 1175 | source = "registry+https://github.com/rust-lang/crates.io-index" 1176 | checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 1177 | 1178 | [[package]] 1179 | name = "unicode-ident" 1180 | version = "1.0.12" 1181 | source = "registry+https://github.com/rust-lang/crates.io-index" 1182 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 1183 | 1184 | [[package]] 1185 | name = "universal-hash" 1186 | version = "0.5.1" 1187 | source = "registry+https://github.com/rust-lang/crates.io-index" 1188 | checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" 1189 | dependencies = [ 1190 | "crypto-common", 1191 | "subtle", 1192 | ] 1193 | 1194 | [[package]] 1195 | name = "uuid" 1196 | version = "1.7.0" 1197 | source = "registry+https://github.com/rust-lang/crates.io-index" 1198 | checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" 1199 | dependencies = [ 1200 | "getrandom", 1201 | "rand", 1202 | ] 1203 | 1204 | [[package]] 1205 | name = "version_check" 1206 | version = "0.9.4" 1207 | source = "registry+https://github.com/rust-lang/crates.io-index" 1208 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1209 | 1210 | [[package]] 1211 | name = "walkdir" 1212 | version = "2.4.0" 1213 | source = "registry+https://github.com/rust-lang/crates.io-index" 1214 | checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" 1215 | dependencies = [ 1216 | "same-file", 1217 | "winapi-util", 1218 | ] 1219 | 1220 | [[package]] 1221 | name = "wasi" 1222 | version = "0.11.0+wasi-snapshot-preview1" 1223 | source = "registry+https://github.com/rust-lang/crates.io-index" 1224 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1225 | 1226 | [[package]] 1227 | name = "winapi" 1228 | version = "0.3.9" 1229 | source = "registry+https://github.com/rust-lang/crates.io-index" 1230 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1231 | dependencies = [ 1232 | "winapi-i686-pc-windows-gnu", 1233 | "winapi-x86_64-pc-windows-gnu", 1234 | ] 1235 | 1236 | [[package]] 1237 | name = "winapi-i686-pc-windows-gnu" 1238 | version = "0.4.0" 1239 | source = "registry+https://github.com/rust-lang/crates.io-index" 1240 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1241 | 1242 | [[package]] 1243 | name = "winapi-util" 1244 | version = "0.1.6" 1245 | source = "registry+https://github.com/rust-lang/crates.io-index" 1246 | checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" 1247 | dependencies = [ 1248 | "winapi", 1249 | ] 1250 | 1251 | [[package]] 1252 | name = "winapi-x86_64-pc-windows-gnu" 1253 | version = "0.4.0" 1254 | source = "registry+https://github.com/rust-lang/crates.io-index" 1255 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1256 | 1257 | [[package]] 1258 | name = "windows-sys" 1259 | version = "0.45.0" 1260 | source = "registry+https://github.com/rust-lang/crates.io-index" 1261 | checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" 1262 | dependencies = [ 1263 | "windows-targets", 1264 | ] 1265 | 1266 | [[package]] 1267 | name = "windows-targets" 1268 | version = "0.42.2" 1269 | source = "registry+https://github.com/rust-lang/crates.io-index" 1270 | checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" 1271 | dependencies = [ 1272 | "windows_aarch64_gnullvm", 1273 | "windows_aarch64_msvc", 1274 | "windows_i686_gnu", 1275 | "windows_i686_msvc", 1276 | "windows_x86_64_gnu", 1277 | "windows_x86_64_gnullvm", 1278 | "windows_x86_64_msvc", 1279 | ] 1280 | 1281 | [[package]] 1282 | name = "windows_aarch64_gnullvm" 1283 | version = "0.42.2" 1284 | source = "registry+https://github.com/rust-lang/crates.io-index" 1285 | checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" 1286 | 1287 | [[package]] 1288 | name = "windows_aarch64_msvc" 1289 | version = "0.42.2" 1290 | source = "registry+https://github.com/rust-lang/crates.io-index" 1291 | checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" 1292 | 1293 | [[package]] 1294 | name = "windows_i686_gnu" 1295 | version = "0.42.2" 1296 | source = "registry+https://github.com/rust-lang/crates.io-index" 1297 | checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" 1298 | 1299 | [[package]] 1300 | name = "windows_i686_msvc" 1301 | version = "0.42.2" 1302 | source = "registry+https://github.com/rust-lang/crates.io-index" 1303 | checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" 1304 | 1305 | [[package]] 1306 | name = "windows_x86_64_gnu" 1307 | version = "0.42.2" 1308 | source = "registry+https://github.com/rust-lang/crates.io-index" 1309 | checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" 1310 | 1311 | [[package]] 1312 | name = "windows_x86_64_gnullvm" 1313 | version = "0.42.2" 1314 | source = "registry+https://github.com/rust-lang/crates.io-index" 1315 | checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" 1316 | 1317 | [[package]] 1318 | name = "windows_x86_64_msvc" 1319 | version = "0.42.2" 1320 | source = "registry+https://github.com/rust-lang/crates.io-index" 1321 | checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" 1322 | 1323 | [[package]] 1324 | name = "x25519-dalek" 1325 | version = "2.0.1" 1326 | source = "registry+https://github.com/rust-lang/crates.io-index" 1327 | checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" 1328 | dependencies = [ 1329 | "curve25519-dalek", 1330 | "rand_core", 1331 | "zeroize", 1332 | ] 1333 | 1334 | [[package]] 1335 | name = "x509-parser" 1336 | version = "0.16.0" 1337 | source = "registry+https://github.com/rust-lang/crates.io-index" 1338 | checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69" 1339 | dependencies = [ 1340 | "asn1-rs", 1341 | "data-encoding", 1342 | "der-parser", 1343 | "lazy_static", 1344 | "nom", 1345 | "oid-registry", 1346 | "rusticata-macros", 1347 | "thiserror", 1348 | "time", 1349 | ] 1350 | 1351 | [[package]] 1352 | name = "zeroize" 1353 | version = "1.7.0" 1354 | source = "registry+https://github.com/rust-lang/crates.io-index" 1355 | checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" 1356 | dependencies = [ 1357 | "zeroize_derive", 1358 | ] 1359 | 1360 | [[package]] 1361 | name = "zeroize_derive" 1362 | version = "1.4.2" 1363 | source = "registry+https://github.com/rust-lang/crates.io-index" 1364 | checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" 1365 | dependencies = [ 1366 | "proc-macro2", 1367 | "quote", 1368 | "syn", 1369 | ] 1370 | -------------------------------------------------------------------------------- /examples/ios/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "aead" 7 | version = "0.5.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" 10 | dependencies = [ 11 | "crypto-common", 12 | "generic-array", 13 | ] 14 | 15 | [[package]] 16 | name = "aes" 17 | version = "0.8.4" 18 | source = "registry+https://github.com/rust-lang/crates.io-index" 19 | checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" 20 | dependencies = [ 21 | "cfg-if", 22 | "cipher", 23 | "cpufeatures", 24 | ] 25 | 26 | [[package]] 27 | name = "aes-gcm" 28 | version = "0.10.3" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" 31 | dependencies = [ 32 | "aead", 33 | "aes", 34 | "cipher", 35 | "ctr", 36 | "ghash", 37 | "subtle", 38 | ] 39 | 40 | [[package]] 41 | name = "animo-secure-env" 42 | version = "0.4.0" 43 | dependencies = [ 44 | "jni", 45 | "lazy_static", 46 | "libc", 47 | "ndk-context", 48 | "ndk-sys", 49 | "p256", 50 | "paste", 51 | "security-framework", 52 | "thiserror", 53 | "x509-parser", 54 | ] 55 | 56 | [[package]] 57 | name = "askar-crypto" 58 | version = "0.3.1" 59 | source = "registry+https://github.com/rust-lang/crates.io-index" 60 | checksum = "39746932b19e345196a089e61a0f0175fc4d673db4b624424d8babf505e48a3d" 61 | dependencies = [ 62 | "aead", 63 | "aes", 64 | "aes-gcm", 65 | "base64", 66 | "blake2", 67 | "block-modes", 68 | "bls12_381", 69 | "cbc", 70 | "chacha20", 71 | "chacha20poly1305", 72 | "cipher", 73 | "crypto_box", 74 | "curve25519-dalek", 75 | "digest", 76 | "ed25519-dalek", 77 | "elliptic-curve", 78 | "group", 79 | "hkdf", 80 | "hmac", 81 | "k256", 82 | "p256", 83 | "p384", 84 | "rand", 85 | "serde", 86 | "serde-json-core", 87 | "sha2", 88 | "subtle", 89 | "x25519-dalek", 90 | "zeroize", 91 | ] 92 | 93 | [[package]] 94 | name = "asn1-rs" 95 | version = "0.6.1" 96 | source = "registry+https://github.com/rust-lang/crates.io-index" 97 | checksum = "22ad1373757efa0f70ec53939aabc7152e1591cb485208052993070ac8d2429d" 98 | dependencies = [ 99 | "asn1-rs-derive", 100 | "asn1-rs-impl", 101 | "displaydoc", 102 | "nom", 103 | "num-traits", 104 | "rusticata-macros", 105 | "thiserror", 106 | "time", 107 | ] 108 | 109 | [[package]] 110 | name = "asn1-rs-derive" 111 | version = "0.5.0" 112 | source = "registry+https://github.com/rust-lang/crates.io-index" 113 | checksum = "7378575ff571966e99a744addeff0bff98b8ada0dedf1956d59e634db95eaac1" 114 | dependencies = [ 115 | "proc-macro2", 116 | "quote", 117 | "syn", 118 | "synstructure", 119 | ] 120 | 121 | [[package]] 122 | name = "asn1-rs-impl" 123 | version = "0.2.0" 124 | source = "registry+https://github.com/rust-lang/crates.io-index" 125 | checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" 126 | dependencies = [ 127 | "proc-macro2", 128 | "quote", 129 | "syn", 130 | ] 131 | 132 | [[package]] 133 | name = "autocfg" 134 | version = "1.1.0" 135 | source = "registry+https://github.com/rust-lang/crates.io-index" 136 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 137 | 138 | [[package]] 139 | name = "base16ct" 140 | version = "0.2.0" 141 | source = "registry+https://github.com/rust-lang/crates.io-index" 142 | checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" 143 | 144 | [[package]] 145 | name = "base64" 146 | version = "0.21.7" 147 | source = "registry+https://github.com/rust-lang/crates.io-index" 148 | checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" 149 | 150 | [[package]] 151 | name = "base64ct" 152 | version = "1.6.0" 153 | source = "registry+https://github.com/rust-lang/crates.io-index" 154 | checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" 155 | 156 | [[package]] 157 | name = "bitflags" 158 | version = "2.6.0" 159 | source = "registry+https://github.com/rust-lang/crates.io-index" 160 | checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" 161 | 162 | [[package]] 163 | name = "blake2" 164 | version = "0.10.6" 165 | source = "registry+https://github.com/rust-lang/crates.io-index" 166 | checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" 167 | dependencies = [ 168 | "digest", 169 | ] 170 | 171 | [[package]] 172 | name = "block-buffer" 173 | version = "0.10.4" 174 | source = "registry+https://github.com/rust-lang/crates.io-index" 175 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 176 | dependencies = [ 177 | "generic-array", 178 | ] 179 | 180 | [[package]] 181 | name = "block-modes" 182 | version = "0.9.1" 183 | source = "registry+https://github.com/rust-lang/crates.io-index" 184 | checksum = "9e2211b0817f061502a8dd9f11a37e879e79763e3c698d2418cf824d8cb2f21e" 185 | 186 | [[package]] 187 | name = "block-padding" 188 | version = "0.3.3" 189 | source = "registry+https://github.com/rust-lang/crates.io-index" 190 | checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" 191 | dependencies = [ 192 | "generic-array", 193 | ] 194 | 195 | [[package]] 196 | name = "bls12_381" 197 | version = "0.8.0" 198 | source = "registry+https://github.com/rust-lang/crates.io-index" 199 | checksum = "d7bc6d6292be3a19e6379786dac800f551e5865a5bb51ebbe3064ab80433f403" 200 | dependencies = [ 201 | "ff", 202 | "group", 203 | "rand_core", 204 | "subtle", 205 | "zeroize", 206 | ] 207 | 208 | [[package]] 209 | name = "bytes" 210 | version = "1.5.0" 211 | source = "registry+https://github.com/rust-lang/crates.io-index" 212 | checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" 213 | 214 | [[package]] 215 | name = "cbc" 216 | version = "0.1.2" 217 | source = "registry+https://github.com/rust-lang/crates.io-index" 218 | checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" 219 | dependencies = [ 220 | "cipher", 221 | ] 222 | 223 | [[package]] 224 | name = "cesu8" 225 | version = "1.1.0" 226 | source = "registry+https://github.com/rust-lang/crates.io-index" 227 | checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" 228 | 229 | [[package]] 230 | name = "cfg-if" 231 | version = "1.0.0" 232 | source = "registry+https://github.com/rust-lang/crates.io-index" 233 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 234 | 235 | [[package]] 236 | name = "chacha20" 237 | version = "0.9.1" 238 | source = "registry+https://github.com/rust-lang/crates.io-index" 239 | checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" 240 | dependencies = [ 241 | "cfg-if", 242 | "cipher", 243 | "cpufeatures", 244 | ] 245 | 246 | [[package]] 247 | name = "chacha20poly1305" 248 | version = "0.10.1" 249 | source = "registry+https://github.com/rust-lang/crates.io-index" 250 | checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" 251 | dependencies = [ 252 | "aead", 253 | "chacha20", 254 | "cipher", 255 | "poly1305", 256 | "zeroize", 257 | ] 258 | 259 | [[package]] 260 | name = "cipher" 261 | version = "0.4.4" 262 | source = "registry+https://github.com/rust-lang/crates.io-index" 263 | checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" 264 | dependencies = [ 265 | "crypto-common", 266 | "inout", 267 | "zeroize", 268 | ] 269 | 270 | [[package]] 271 | name = "combine" 272 | version = "4.6.6" 273 | source = "registry+https://github.com/rust-lang/crates.io-index" 274 | checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" 275 | dependencies = [ 276 | "bytes", 277 | "memchr", 278 | ] 279 | 280 | [[package]] 281 | name = "const-oid" 282 | version = "0.9.6" 283 | source = "registry+https://github.com/rust-lang/crates.io-index" 284 | checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" 285 | 286 | [[package]] 287 | name = "core-foundation" 288 | version = "0.9.4" 289 | source = "registry+https://github.com/rust-lang/crates.io-index" 290 | checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" 291 | dependencies = [ 292 | "core-foundation-sys", 293 | "libc", 294 | ] 295 | 296 | [[package]] 297 | name = "core-foundation-sys" 298 | version = "0.8.6" 299 | source = "registry+https://github.com/rust-lang/crates.io-index" 300 | checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" 301 | 302 | [[package]] 303 | name = "cpufeatures" 304 | version = "0.2.12" 305 | source = "registry+https://github.com/rust-lang/crates.io-index" 306 | checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" 307 | dependencies = [ 308 | "libc", 309 | ] 310 | 311 | [[package]] 312 | name = "crypto-bigint" 313 | version = "0.5.5" 314 | source = "registry+https://github.com/rust-lang/crates.io-index" 315 | checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" 316 | dependencies = [ 317 | "generic-array", 318 | "rand_core", 319 | "subtle", 320 | "zeroize", 321 | ] 322 | 323 | [[package]] 324 | name = "crypto-common" 325 | version = "0.1.6" 326 | source = "registry+https://github.com/rust-lang/crates.io-index" 327 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 328 | dependencies = [ 329 | "generic-array", 330 | "rand_core", 331 | "typenum", 332 | ] 333 | 334 | [[package]] 335 | name = "crypto_box" 336 | version = "0.9.1" 337 | source = "registry+https://github.com/rust-lang/crates.io-index" 338 | checksum = "16182b4f39a82ec8a6851155cc4c0cda3065bb1db33651726a29e1951de0f009" 339 | dependencies = [ 340 | "aead", 341 | "crypto_secretbox", 342 | "curve25519-dalek", 343 | "salsa20", 344 | "subtle", 345 | "zeroize", 346 | ] 347 | 348 | [[package]] 349 | name = "crypto_secretbox" 350 | version = "0.1.1" 351 | source = "registry+https://github.com/rust-lang/crates.io-index" 352 | checksum = "b9d6cf87adf719ddf43a805e92c6870a531aedda35ff640442cbaf8674e141e1" 353 | dependencies = [ 354 | "aead", 355 | "cipher", 356 | "generic-array", 357 | "poly1305", 358 | "salsa20", 359 | "subtle", 360 | "zeroize", 361 | ] 362 | 363 | [[package]] 364 | name = "ctr" 365 | version = "0.9.2" 366 | source = "registry+https://github.com/rust-lang/crates.io-index" 367 | checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" 368 | dependencies = [ 369 | "cipher", 370 | ] 371 | 372 | [[package]] 373 | name = "curve25519-dalek" 374 | version = "4.1.2" 375 | source = "registry+https://github.com/rust-lang/crates.io-index" 376 | checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" 377 | dependencies = [ 378 | "cfg-if", 379 | "cpufeatures", 380 | "curve25519-dalek-derive", 381 | "digest", 382 | "fiat-crypto", 383 | "platforms", 384 | "rustc_version", 385 | "subtle", 386 | "zeroize", 387 | ] 388 | 389 | [[package]] 390 | name = "curve25519-dalek-derive" 391 | version = "0.1.1" 392 | source = "registry+https://github.com/rust-lang/crates.io-index" 393 | checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" 394 | dependencies = [ 395 | "proc-macro2", 396 | "quote", 397 | "syn", 398 | ] 399 | 400 | [[package]] 401 | name = "data-encoding" 402 | version = "2.5.0" 403 | source = "registry+https://github.com/rust-lang/crates.io-index" 404 | checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" 405 | 406 | [[package]] 407 | name = "der" 408 | version = "0.7.8" 409 | source = "registry+https://github.com/rust-lang/crates.io-index" 410 | checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" 411 | dependencies = [ 412 | "const-oid", 413 | "pem-rfc7468", 414 | "zeroize", 415 | ] 416 | 417 | [[package]] 418 | name = "der-parser" 419 | version = "9.0.0" 420 | source = "registry+https://github.com/rust-lang/crates.io-index" 421 | checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" 422 | dependencies = [ 423 | "asn1-rs", 424 | "displaydoc", 425 | "nom", 426 | "num-bigint", 427 | "num-traits", 428 | "rusticata-macros", 429 | ] 430 | 431 | [[package]] 432 | name = "deranged" 433 | version = "0.3.11" 434 | source = "registry+https://github.com/rust-lang/crates.io-index" 435 | checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" 436 | dependencies = [ 437 | "powerfmt", 438 | ] 439 | 440 | [[package]] 441 | name = "digest" 442 | version = "0.10.7" 443 | source = "registry+https://github.com/rust-lang/crates.io-index" 444 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 445 | dependencies = [ 446 | "block-buffer", 447 | "const-oid", 448 | "crypto-common", 449 | "subtle", 450 | ] 451 | 452 | [[package]] 453 | name = "displaydoc" 454 | version = "0.2.4" 455 | source = "registry+https://github.com/rust-lang/crates.io-index" 456 | checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" 457 | dependencies = [ 458 | "proc-macro2", 459 | "quote", 460 | "syn", 461 | ] 462 | 463 | [[package]] 464 | name = "ecdsa" 465 | version = "0.16.9" 466 | source = "registry+https://github.com/rust-lang/crates.io-index" 467 | checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" 468 | dependencies = [ 469 | "der", 470 | "digest", 471 | "elliptic-curve", 472 | "rfc6979", 473 | "signature", 474 | "spki", 475 | ] 476 | 477 | [[package]] 478 | name = "ed25519" 479 | version = "2.2.3" 480 | source = "registry+https://github.com/rust-lang/crates.io-index" 481 | checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" 482 | dependencies = [ 483 | "signature", 484 | ] 485 | 486 | [[package]] 487 | name = "ed25519-dalek" 488 | version = "2.1.1" 489 | source = "registry+https://github.com/rust-lang/crates.io-index" 490 | checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" 491 | dependencies = [ 492 | "curve25519-dalek", 493 | "ed25519", 494 | "sha2", 495 | "subtle", 496 | "zeroize", 497 | ] 498 | 499 | [[package]] 500 | name = "elliptic-curve" 501 | version = "0.13.8" 502 | source = "registry+https://github.com/rust-lang/crates.io-index" 503 | checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" 504 | dependencies = [ 505 | "base16ct", 506 | "crypto-bigint", 507 | "digest", 508 | "ff", 509 | "generic-array", 510 | "group", 511 | "hkdf", 512 | "pem-rfc7468", 513 | "pkcs8", 514 | "rand_core", 515 | "sec1", 516 | "subtle", 517 | "zeroize", 518 | ] 519 | 520 | [[package]] 521 | name = "ff" 522 | version = "0.13.0" 523 | source = "registry+https://github.com/rust-lang/crates.io-index" 524 | checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" 525 | dependencies = [ 526 | "rand_core", 527 | "subtle", 528 | ] 529 | 530 | [[package]] 531 | name = "fiat-crypto" 532 | version = "0.2.6" 533 | source = "registry+https://github.com/rust-lang/crates.io-index" 534 | checksum = "1676f435fc1dadde4d03e43f5d62b259e1ce5f40bd4ffb21db2b42ebe59c1382" 535 | 536 | [[package]] 537 | name = "generic-array" 538 | version = "0.14.7" 539 | source = "registry+https://github.com/rust-lang/crates.io-index" 540 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 541 | dependencies = [ 542 | "typenum", 543 | "version_check", 544 | "zeroize", 545 | ] 546 | 547 | [[package]] 548 | name = "getrandom" 549 | version = "0.2.12" 550 | source = "registry+https://github.com/rust-lang/crates.io-index" 551 | checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" 552 | dependencies = [ 553 | "cfg-if", 554 | "libc", 555 | "wasi", 556 | ] 557 | 558 | [[package]] 559 | name = "ghash" 560 | version = "0.5.0" 561 | source = "registry+https://github.com/rust-lang/crates.io-index" 562 | checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" 563 | dependencies = [ 564 | "opaque-debug", 565 | "polyval", 566 | ] 567 | 568 | [[package]] 569 | name = "glob" 570 | version = "0.3.1" 571 | source = "registry+https://github.com/rust-lang/crates.io-index" 572 | checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" 573 | 574 | [[package]] 575 | name = "group" 576 | version = "0.13.0" 577 | source = "registry+https://github.com/rust-lang/crates.io-index" 578 | checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" 579 | dependencies = [ 580 | "ff", 581 | "rand_core", 582 | "subtle", 583 | ] 584 | 585 | [[package]] 586 | name = "hkdf" 587 | version = "0.12.4" 588 | source = "registry+https://github.com/rust-lang/crates.io-index" 589 | checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" 590 | dependencies = [ 591 | "hmac", 592 | ] 593 | 594 | [[package]] 595 | name = "hmac" 596 | version = "0.12.1" 597 | source = "registry+https://github.com/rust-lang/crates.io-index" 598 | checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 599 | dependencies = [ 600 | "digest", 601 | ] 602 | 603 | [[package]] 604 | name = "inout" 605 | version = "0.1.3" 606 | source = "registry+https://github.com/rust-lang/crates.io-index" 607 | checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" 608 | dependencies = [ 609 | "block-padding", 610 | "generic-array", 611 | ] 612 | 613 | [[package]] 614 | name = "ios" 615 | version = "0.1.0" 616 | dependencies = [ 617 | "mobile_tests", 618 | ] 619 | 620 | [[package]] 621 | name = "itoa" 622 | version = "1.0.10" 623 | source = "registry+https://github.com/rust-lang/crates.io-index" 624 | checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" 625 | 626 | [[package]] 627 | name = "java-locator" 628 | version = "0.1.5" 629 | source = "registry+https://github.com/rust-lang/crates.io-index" 630 | checksum = "90003f2fd9c52f212c21d8520f1128da0080bad6fff16b68fe6e7f2f0c3780c2" 631 | dependencies = [ 632 | "glob", 633 | "lazy_static", 634 | ] 635 | 636 | [[package]] 637 | name = "jni" 638 | version = "0.21.1" 639 | source = "registry+https://github.com/rust-lang/crates.io-index" 640 | checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" 641 | dependencies = [ 642 | "cesu8", 643 | "cfg-if", 644 | "combine", 645 | "java-locator", 646 | "jni-sys", 647 | "libloading", 648 | "log", 649 | "thiserror", 650 | "walkdir", 651 | "windows-sys", 652 | ] 653 | 654 | [[package]] 655 | name = "jni-sys" 656 | version = "0.3.0" 657 | source = "registry+https://github.com/rust-lang/crates.io-index" 658 | checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" 659 | 660 | [[package]] 661 | name = "k256" 662 | version = "0.13.3" 663 | source = "registry+https://github.com/rust-lang/crates.io-index" 664 | checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" 665 | dependencies = [ 666 | "cfg-if", 667 | "ecdsa", 668 | "elliptic-curve", 669 | "sha2", 670 | ] 671 | 672 | [[package]] 673 | name = "lazy_static" 674 | version = "1.4.0" 675 | source = "registry+https://github.com/rust-lang/crates.io-index" 676 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 677 | 678 | [[package]] 679 | name = "libc" 680 | version = "0.2.155" 681 | source = "registry+https://github.com/rust-lang/crates.io-index" 682 | checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" 683 | 684 | [[package]] 685 | name = "libloading" 686 | version = "0.7.4" 687 | source = "registry+https://github.com/rust-lang/crates.io-index" 688 | checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" 689 | dependencies = [ 690 | "cfg-if", 691 | "winapi", 692 | ] 693 | 694 | [[package]] 695 | name = "log" 696 | version = "0.4.20" 697 | source = "registry+https://github.com/rust-lang/crates.io-index" 698 | checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" 699 | 700 | [[package]] 701 | name = "memchr" 702 | version = "2.7.1" 703 | source = "registry+https://github.com/rust-lang/crates.io-index" 704 | checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" 705 | 706 | [[package]] 707 | name = "minimal-lexical" 708 | version = "0.2.1" 709 | source = "registry+https://github.com/rust-lang/crates.io-index" 710 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 711 | 712 | [[package]] 713 | name = "mobile_tests" 714 | version = "0.1.0" 715 | dependencies = [ 716 | "animo-secure-env", 717 | "askar-crypto", 718 | "p256", 719 | "uuid", 720 | ] 721 | 722 | [[package]] 723 | name = "ndk-context" 724 | version = "0.1.1" 725 | source = "registry+https://github.com/rust-lang/crates.io-index" 726 | checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" 727 | 728 | [[package]] 729 | name = "ndk-sys" 730 | version = "0.6.0+11769913" 731 | source = "registry+https://github.com/rust-lang/crates.io-index" 732 | checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" 733 | dependencies = [ 734 | "jni-sys", 735 | ] 736 | 737 | [[package]] 738 | name = "nom" 739 | version = "7.1.3" 740 | source = "registry+https://github.com/rust-lang/crates.io-index" 741 | checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 742 | dependencies = [ 743 | "memchr", 744 | "minimal-lexical", 745 | ] 746 | 747 | [[package]] 748 | name = "num-bigint" 749 | version = "0.4.6" 750 | source = "registry+https://github.com/rust-lang/crates.io-index" 751 | checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" 752 | dependencies = [ 753 | "num-integer", 754 | "num-traits", 755 | ] 756 | 757 | [[package]] 758 | name = "num-conv" 759 | version = "0.1.0" 760 | source = "registry+https://github.com/rust-lang/crates.io-index" 761 | checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" 762 | 763 | [[package]] 764 | name = "num-integer" 765 | version = "0.1.46" 766 | source = "registry+https://github.com/rust-lang/crates.io-index" 767 | checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 768 | dependencies = [ 769 | "num-traits", 770 | ] 771 | 772 | [[package]] 773 | name = "num-traits" 774 | version = "0.2.18" 775 | source = "registry+https://github.com/rust-lang/crates.io-index" 776 | checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" 777 | dependencies = [ 778 | "autocfg", 779 | ] 780 | 781 | [[package]] 782 | name = "oid-registry" 783 | version = "0.7.0" 784 | source = "registry+https://github.com/rust-lang/crates.io-index" 785 | checksum = "1c958dd45046245b9c3c2547369bb634eb461670b2e7e0de552905801a648d1d" 786 | dependencies = [ 787 | "asn1-rs", 788 | ] 789 | 790 | [[package]] 791 | name = "opaque-debug" 792 | version = "0.3.0" 793 | source = "registry+https://github.com/rust-lang/crates.io-index" 794 | checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" 795 | 796 | [[package]] 797 | name = "p256" 798 | version = "0.13.2" 799 | source = "registry+https://github.com/rust-lang/crates.io-index" 800 | checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" 801 | dependencies = [ 802 | "ecdsa", 803 | "elliptic-curve", 804 | "primeorder", 805 | "sha2", 806 | ] 807 | 808 | [[package]] 809 | name = "p384" 810 | version = "0.13.0" 811 | source = "registry+https://github.com/rust-lang/crates.io-index" 812 | checksum = "70786f51bcc69f6a4c0360e063a4cac5419ef7c5cd5b3c99ad70f3be5ba79209" 813 | dependencies = [ 814 | "ecdsa", 815 | "elliptic-curve", 816 | "primeorder", 817 | "sha2", 818 | ] 819 | 820 | [[package]] 821 | name = "paste" 822 | version = "1.0.15" 823 | source = "registry+https://github.com/rust-lang/crates.io-index" 824 | checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" 825 | 826 | [[package]] 827 | name = "pem-rfc7468" 828 | version = "0.7.0" 829 | source = "registry+https://github.com/rust-lang/crates.io-index" 830 | checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" 831 | dependencies = [ 832 | "base64ct", 833 | ] 834 | 835 | [[package]] 836 | name = "pkcs8" 837 | version = "0.10.2" 838 | source = "registry+https://github.com/rust-lang/crates.io-index" 839 | checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" 840 | dependencies = [ 841 | "der", 842 | "spki", 843 | ] 844 | 845 | [[package]] 846 | name = "platforms" 847 | version = "3.3.0" 848 | source = "registry+https://github.com/rust-lang/crates.io-index" 849 | checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" 850 | 851 | [[package]] 852 | name = "poly1305" 853 | version = "0.8.0" 854 | source = "registry+https://github.com/rust-lang/crates.io-index" 855 | checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" 856 | dependencies = [ 857 | "cpufeatures", 858 | "opaque-debug", 859 | "universal-hash", 860 | ] 861 | 862 | [[package]] 863 | name = "polyval" 864 | version = "0.6.1" 865 | source = "registry+https://github.com/rust-lang/crates.io-index" 866 | checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" 867 | dependencies = [ 868 | "cfg-if", 869 | "cpufeatures", 870 | "opaque-debug", 871 | "universal-hash", 872 | ] 873 | 874 | [[package]] 875 | name = "powerfmt" 876 | version = "0.2.0" 877 | source = "registry+https://github.com/rust-lang/crates.io-index" 878 | checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" 879 | 880 | [[package]] 881 | name = "ppv-lite86" 882 | version = "0.2.17" 883 | source = "registry+https://github.com/rust-lang/crates.io-index" 884 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 885 | 886 | [[package]] 887 | name = "primeorder" 888 | version = "0.13.6" 889 | source = "registry+https://github.com/rust-lang/crates.io-index" 890 | checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" 891 | dependencies = [ 892 | "elliptic-curve", 893 | ] 894 | 895 | [[package]] 896 | name = "proc-macro2" 897 | version = "1.0.78" 898 | source = "registry+https://github.com/rust-lang/crates.io-index" 899 | checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" 900 | dependencies = [ 901 | "unicode-ident", 902 | ] 903 | 904 | [[package]] 905 | name = "quote" 906 | version = "1.0.35" 907 | source = "registry+https://github.com/rust-lang/crates.io-index" 908 | checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" 909 | dependencies = [ 910 | "proc-macro2", 911 | ] 912 | 913 | [[package]] 914 | name = "rand" 915 | version = "0.8.5" 916 | source = "registry+https://github.com/rust-lang/crates.io-index" 917 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 918 | dependencies = [ 919 | "libc", 920 | "rand_chacha", 921 | "rand_core", 922 | ] 923 | 924 | [[package]] 925 | name = "rand_chacha" 926 | version = "0.3.1" 927 | source = "registry+https://github.com/rust-lang/crates.io-index" 928 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 929 | dependencies = [ 930 | "ppv-lite86", 931 | "rand_core", 932 | ] 933 | 934 | [[package]] 935 | name = "rand_core" 936 | version = "0.6.4" 937 | source = "registry+https://github.com/rust-lang/crates.io-index" 938 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 939 | dependencies = [ 940 | "getrandom", 941 | ] 942 | 943 | [[package]] 944 | name = "rfc6979" 945 | version = "0.4.0" 946 | source = "registry+https://github.com/rust-lang/crates.io-index" 947 | checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" 948 | dependencies = [ 949 | "hmac", 950 | "subtle", 951 | ] 952 | 953 | [[package]] 954 | name = "rustc_version" 955 | version = "0.4.0" 956 | source = "registry+https://github.com/rust-lang/crates.io-index" 957 | checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" 958 | dependencies = [ 959 | "semver", 960 | ] 961 | 962 | [[package]] 963 | name = "rusticata-macros" 964 | version = "4.1.0" 965 | source = "registry+https://github.com/rust-lang/crates.io-index" 966 | checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" 967 | dependencies = [ 968 | "nom", 969 | ] 970 | 971 | [[package]] 972 | name = "ryu" 973 | version = "1.0.17" 974 | source = "registry+https://github.com/rust-lang/crates.io-index" 975 | checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" 976 | 977 | [[package]] 978 | name = "salsa20" 979 | version = "0.10.2" 980 | source = "registry+https://github.com/rust-lang/crates.io-index" 981 | checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" 982 | dependencies = [ 983 | "cipher", 984 | ] 985 | 986 | [[package]] 987 | name = "same-file" 988 | version = "1.0.6" 989 | source = "registry+https://github.com/rust-lang/crates.io-index" 990 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 991 | dependencies = [ 992 | "winapi-util", 993 | ] 994 | 995 | [[package]] 996 | name = "sec1" 997 | version = "0.7.3" 998 | source = "registry+https://github.com/rust-lang/crates.io-index" 999 | checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" 1000 | dependencies = [ 1001 | "base16ct", 1002 | "der", 1003 | "generic-array", 1004 | "pkcs8", 1005 | "subtle", 1006 | "zeroize", 1007 | ] 1008 | 1009 | [[package]] 1010 | name = "security-framework" 1011 | version = "2.11.1" 1012 | source = "registry+https://github.com/rust-lang/crates.io-index" 1013 | checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" 1014 | dependencies = [ 1015 | "bitflags", 1016 | "core-foundation", 1017 | "core-foundation-sys", 1018 | "libc", 1019 | "num-bigint", 1020 | "security-framework-sys", 1021 | ] 1022 | 1023 | [[package]] 1024 | name = "security-framework-sys" 1025 | version = "2.11.1" 1026 | source = "registry+https://github.com/rust-lang/crates.io-index" 1027 | checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" 1028 | dependencies = [ 1029 | "core-foundation-sys", 1030 | "libc", 1031 | ] 1032 | 1033 | [[package]] 1034 | name = "semver" 1035 | version = "1.0.22" 1036 | source = "registry+https://github.com/rust-lang/crates.io-index" 1037 | checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" 1038 | 1039 | [[package]] 1040 | name = "serde" 1041 | version = "1.0.197" 1042 | source = "registry+https://github.com/rust-lang/crates.io-index" 1043 | checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" 1044 | dependencies = [ 1045 | "serde_derive", 1046 | ] 1047 | 1048 | [[package]] 1049 | name = "serde-json-core" 1050 | version = "0.5.1" 1051 | source = "registry+https://github.com/rust-lang/crates.io-index" 1052 | checksum = "3c9e1ab533c0bc414c34920ec7e5f097101d126ed5eac1a1aac711222e0bbb33" 1053 | dependencies = [ 1054 | "ryu", 1055 | "serde", 1056 | ] 1057 | 1058 | [[package]] 1059 | name = "serde_derive" 1060 | version = "1.0.197" 1061 | source = "registry+https://github.com/rust-lang/crates.io-index" 1062 | checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" 1063 | dependencies = [ 1064 | "proc-macro2", 1065 | "quote", 1066 | "syn", 1067 | ] 1068 | 1069 | [[package]] 1070 | name = "sha2" 1071 | version = "0.10.8" 1072 | source = "registry+https://github.com/rust-lang/crates.io-index" 1073 | checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" 1074 | dependencies = [ 1075 | "cfg-if", 1076 | "cpufeatures", 1077 | "digest", 1078 | ] 1079 | 1080 | [[package]] 1081 | name = "signature" 1082 | version = "2.2.0" 1083 | source = "registry+https://github.com/rust-lang/crates.io-index" 1084 | checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" 1085 | dependencies = [ 1086 | "digest", 1087 | "rand_core", 1088 | ] 1089 | 1090 | [[package]] 1091 | name = "spki" 1092 | version = "0.7.3" 1093 | source = "registry+https://github.com/rust-lang/crates.io-index" 1094 | checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" 1095 | dependencies = [ 1096 | "base64ct", 1097 | "der", 1098 | ] 1099 | 1100 | [[package]] 1101 | name = "subtle" 1102 | version = "2.5.0" 1103 | source = "registry+https://github.com/rust-lang/crates.io-index" 1104 | checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" 1105 | 1106 | [[package]] 1107 | name = "syn" 1108 | version = "2.0.50" 1109 | source = "registry+https://github.com/rust-lang/crates.io-index" 1110 | checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" 1111 | dependencies = [ 1112 | "proc-macro2", 1113 | "quote", 1114 | "unicode-ident", 1115 | ] 1116 | 1117 | [[package]] 1118 | name = "synstructure" 1119 | version = "0.13.1" 1120 | source = "registry+https://github.com/rust-lang/crates.io-index" 1121 | checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" 1122 | dependencies = [ 1123 | "proc-macro2", 1124 | "quote", 1125 | "syn", 1126 | ] 1127 | 1128 | [[package]] 1129 | name = "thiserror" 1130 | version = "1.0.63" 1131 | source = "registry+https://github.com/rust-lang/crates.io-index" 1132 | checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" 1133 | dependencies = [ 1134 | "thiserror-impl", 1135 | ] 1136 | 1137 | [[package]] 1138 | name = "thiserror-impl" 1139 | version = "1.0.63" 1140 | source = "registry+https://github.com/rust-lang/crates.io-index" 1141 | checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" 1142 | dependencies = [ 1143 | "proc-macro2", 1144 | "quote", 1145 | "syn", 1146 | ] 1147 | 1148 | [[package]] 1149 | name = "time" 1150 | version = "0.3.34" 1151 | source = "registry+https://github.com/rust-lang/crates.io-index" 1152 | checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" 1153 | dependencies = [ 1154 | "deranged", 1155 | "itoa", 1156 | "num-conv", 1157 | "powerfmt", 1158 | "serde", 1159 | "time-core", 1160 | "time-macros", 1161 | ] 1162 | 1163 | [[package]] 1164 | name = "time-core" 1165 | version = "0.1.2" 1166 | source = "registry+https://github.com/rust-lang/crates.io-index" 1167 | checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" 1168 | 1169 | [[package]] 1170 | name = "time-macros" 1171 | version = "0.2.17" 1172 | source = "registry+https://github.com/rust-lang/crates.io-index" 1173 | checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" 1174 | dependencies = [ 1175 | "num-conv", 1176 | "time-core", 1177 | ] 1178 | 1179 | [[package]] 1180 | name = "typenum" 1181 | version = "1.17.0" 1182 | source = "registry+https://github.com/rust-lang/crates.io-index" 1183 | checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 1184 | 1185 | [[package]] 1186 | name = "unicode-ident" 1187 | version = "1.0.12" 1188 | source = "registry+https://github.com/rust-lang/crates.io-index" 1189 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 1190 | 1191 | [[package]] 1192 | name = "universal-hash" 1193 | version = "0.5.1" 1194 | source = "registry+https://github.com/rust-lang/crates.io-index" 1195 | checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" 1196 | dependencies = [ 1197 | "crypto-common", 1198 | "subtle", 1199 | ] 1200 | 1201 | [[package]] 1202 | name = "uuid" 1203 | version = "1.7.0" 1204 | source = "registry+https://github.com/rust-lang/crates.io-index" 1205 | checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" 1206 | dependencies = [ 1207 | "getrandom", 1208 | "rand", 1209 | ] 1210 | 1211 | [[package]] 1212 | name = "version_check" 1213 | version = "0.9.4" 1214 | source = "registry+https://github.com/rust-lang/crates.io-index" 1215 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1216 | 1217 | [[package]] 1218 | name = "walkdir" 1219 | version = "2.4.0" 1220 | source = "registry+https://github.com/rust-lang/crates.io-index" 1221 | checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" 1222 | dependencies = [ 1223 | "same-file", 1224 | "winapi-util", 1225 | ] 1226 | 1227 | [[package]] 1228 | name = "wasi" 1229 | version = "0.11.0+wasi-snapshot-preview1" 1230 | source = "registry+https://github.com/rust-lang/crates.io-index" 1231 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1232 | 1233 | [[package]] 1234 | name = "winapi" 1235 | version = "0.3.9" 1236 | source = "registry+https://github.com/rust-lang/crates.io-index" 1237 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1238 | dependencies = [ 1239 | "winapi-i686-pc-windows-gnu", 1240 | "winapi-x86_64-pc-windows-gnu", 1241 | ] 1242 | 1243 | [[package]] 1244 | name = "winapi-i686-pc-windows-gnu" 1245 | version = "0.4.0" 1246 | source = "registry+https://github.com/rust-lang/crates.io-index" 1247 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1248 | 1249 | [[package]] 1250 | name = "winapi-util" 1251 | version = "0.1.6" 1252 | source = "registry+https://github.com/rust-lang/crates.io-index" 1253 | checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" 1254 | dependencies = [ 1255 | "winapi", 1256 | ] 1257 | 1258 | [[package]] 1259 | name = "winapi-x86_64-pc-windows-gnu" 1260 | version = "0.4.0" 1261 | source = "registry+https://github.com/rust-lang/crates.io-index" 1262 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1263 | 1264 | [[package]] 1265 | name = "windows-sys" 1266 | version = "0.45.0" 1267 | source = "registry+https://github.com/rust-lang/crates.io-index" 1268 | checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" 1269 | dependencies = [ 1270 | "windows-targets", 1271 | ] 1272 | 1273 | [[package]] 1274 | name = "windows-targets" 1275 | version = "0.42.2" 1276 | source = "registry+https://github.com/rust-lang/crates.io-index" 1277 | checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" 1278 | dependencies = [ 1279 | "windows_aarch64_gnullvm", 1280 | "windows_aarch64_msvc", 1281 | "windows_i686_gnu", 1282 | "windows_i686_msvc", 1283 | "windows_x86_64_gnu", 1284 | "windows_x86_64_gnullvm", 1285 | "windows_x86_64_msvc", 1286 | ] 1287 | 1288 | [[package]] 1289 | name = "windows_aarch64_gnullvm" 1290 | version = "0.42.2" 1291 | source = "registry+https://github.com/rust-lang/crates.io-index" 1292 | checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" 1293 | 1294 | [[package]] 1295 | name = "windows_aarch64_msvc" 1296 | version = "0.42.2" 1297 | source = "registry+https://github.com/rust-lang/crates.io-index" 1298 | checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" 1299 | 1300 | [[package]] 1301 | name = "windows_i686_gnu" 1302 | version = "0.42.2" 1303 | source = "registry+https://github.com/rust-lang/crates.io-index" 1304 | checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" 1305 | 1306 | [[package]] 1307 | name = "windows_i686_msvc" 1308 | version = "0.42.2" 1309 | source = "registry+https://github.com/rust-lang/crates.io-index" 1310 | checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" 1311 | 1312 | [[package]] 1313 | name = "windows_x86_64_gnu" 1314 | version = "0.42.2" 1315 | source = "registry+https://github.com/rust-lang/crates.io-index" 1316 | checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" 1317 | 1318 | [[package]] 1319 | name = "windows_x86_64_gnullvm" 1320 | version = "0.42.2" 1321 | source = "registry+https://github.com/rust-lang/crates.io-index" 1322 | checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" 1323 | 1324 | [[package]] 1325 | name = "windows_x86_64_msvc" 1326 | version = "0.42.2" 1327 | source = "registry+https://github.com/rust-lang/crates.io-index" 1328 | checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" 1329 | 1330 | [[package]] 1331 | name = "x25519-dalek" 1332 | version = "2.0.1" 1333 | source = "registry+https://github.com/rust-lang/crates.io-index" 1334 | checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" 1335 | dependencies = [ 1336 | "curve25519-dalek", 1337 | "rand_core", 1338 | "zeroize", 1339 | ] 1340 | 1341 | [[package]] 1342 | name = "x509-parser" 1343 | version = "0.16.0" 1344 | source = "registry+https://github.com/rust-lang/crates.io-index" 1345 | checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69" 1346 | dependencies = [ 1347 | "asn1-rs", 1348 | "data-encoding", 1349 | "der-parser", 1350 | "lazy_static", 1351 | "nom", 1352 | "oid-registry", 1353 | "rusticata-macros", 1354 | "thiserror", 1355 | "time", 1356 | ] 1357 | 1358 | [[package]] 1359 | name = "zeroize" 1360 | version = "1.7.0" 1361 | source = "registry+https://github.com/rust-lang/crates.io-index" 1362 | checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" 1363 | dependencies = [ 1364 | "zeroize_derive", 1365 | ] 1366 | 1367 | [[package]] 1368 | name = "zeroize_derive" 1369 | version = "1.4.2" 1370 | source = "registry+https://github.com/rust-lang/crates.io-index" 1371 | checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" 1372 | dependencies = [ 1373 | "proc-macro2", 1374 | "quote", 1375 | "syn", 1376 | ] 1377 | --------------------------------------------------------------------------------