Skip to content

Commit

Permalink
updater version to 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoXuan40404 committed Feb 2, 2021
1 parent 42854eb commit d43b406
Show file tree
Hide file tree
Showing 12 changed files with 80 additions and 62 deletions.
20 changes: 10 additions & 10 deletions bounty/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ curve25519-dalek = { version = "1", features = [ "serde" ] }
protobuf = "2.20.0"
sha3 = "0.8"
rand = "0.3.17"
wedpr_l_crypto_zkp_discrete_logarithm_proof = "0.0.1"
wedpr_l_crypto_zkp_range_proof = "0.0.1"
wedpr_l_macros = "0.0.1"
wedpr_s_protos = { path = "../protos", version = "1.3.0"}
wedpr_l_protos = "0.0.1"
wedpr_l_utils = "0.0.1"
wedpr_l_crypto_zkp_utils = "0.0.1"
wedpr_s_verifiable_confidential_ledger = { path = "../solution/verifiable_confidential_ledger" }
wedpr_s_selective_certificate_disclosure = { path = "../solution/selective_certificate_disclosure" }
wedpr_l_crypto_zkp_discrete_logarithm_proof = "1.0.0"
wedpr_l_crypto_zkp_range_proof = "1.0.0"
wedpr_l_macros = "1.0.0"
wedpr_s_protos = "1.3.0"
wedpr_l_protos = "1.0.0"
wedpr_l_utils = "1.0.0"
wedpr_l_crypto_zkp_utils = "1.0.0"
wedpr_s_verifiable_confidential_ledger = "1.3.0"
wedpr_s_selective_certificate_disclosure = "1.3.0"

[dev-dependencies]
wedpr_l_common_coder_base64 = "0.0.1"
wedpr_l_common_coder_base64 = "1.0.0"
10 changes: 5 additions & 5 deletions ffi/ffi_c/ffi_c_ktb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ crate-type = [ "cdylib", "staticlib" ]
[dependencies]
libc = "0.2.60"
protobuf = "2.20.0"
wedpr_s_hierarchical_deterministic_key = { path = "../../../solution/key_tool_box/hierarchical_deterministic_key" }
wedpr_ffi_common = "0.0.1"
wedpr_ffi_macros = "0.0.1"
wedpr_s_protos = { path = "../../../protos/" }
wedpr_l_macros = "0.0.1"
wedpr_s_hierarchical_deterministic_key = "1.3.0"
wedpr_ffi_common = "1.0.0"
wedpr_ffi_macros = "1.0.0"
wedpr_s_protos = "1.3.0"
wedpr_l_macros = "1.0.0"


# This is required to generate C/C++ header files.
Expand Down
10 changes: 5 additions & 5 deletions ffi/ffi_c/ffi_c_scd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ crate-type = [ "cdylib", "staticlib" ]
[dependencies]
libc = "0.2.60"
protobuf = "2.20.0"
wedpr_s_selective_certificate_disclosure = { path = "../../../solution/selective_certificate_disclosure" }
wedpr_ffi_common = "0.0.1"
wedpr_ffi_macros = "0.0.1"
wedpr_s_protos = { path = "../../../protos/" }
wedpr_l_macros = "0.0.1"
wedpr_s_selective_certificate_disclosure = "1.3.0"
wedpr_ffi_common = "1.0.0"
wedpr_ffi_macros = "1.0.0"
wedpr_s_protos = "1.3.0"
wedpr_l_macros = "1.0.0"

# This is required to generate C/C++ header files.
[build-dependencies]
Expand Down
12 changes: 6 additions & 6 deletions ffi/ffi_c/ffi_c_vcl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ crate-type = [ "cdylib", "staticlib" ]
[dependencies]
libc = "0.2.60"
protobuf = "2.20.0"
wedpr_s_verifiable_confidential_ledger = { path = "../../../solution/verifiable_confidential_ledger" }
wedpr_ffi_common = "0.0.1"
wedpr_ffi_macros = "0.0.1"
wedpr_s_protos = { path = "../../../protos/" }
wedpr_l_protos = "0.0.1"
wedpr_l_macros = "0.0.1"
wedpr_s_verifiable_confidential_ledger = "1.3.0"
wedpr_ffi_common = "1.0.0"
wedpr_ffi_macros = "1.0.0"
wedpr_s_protos = "1.3.0"
wedpr_l_protos = "1.0.0"
wedpr_l_macros = "1.0.0"

# This is required to generate C/C++ header files.
[build-dependencies]
Expand Down
8 changes: 4 additions & 4 deletions ffi/ffi_java/ffi_java_ktb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ crate-type = [ "cdylib", "staticlib" ]
[dependencies]
jni = "0.13.0"
protobuf = "2.20.0"
wedpr_s_hierarchical_deterministic_key = { path = "../../../solution/key_tool_box/hierarchical_deterministic_key" }
wedpr_ffi_common = "0.0.1"
wedpr_ffi_macros = "0.0.1"
wedpr_s_protos = { path = "../../../protos/" }
wedpr_s_hierarchical_deterministic_key = "1.3.0"
wedpr_ffi_common = "1.0.0"
wedpr_ffi_macros = "1.0.0"
wedpr_s_protos = "1.3.0"

[build-dependencies]
cbindgen = "0.9.0"
Expand Down
8 changes: 8 additions & 0 deletions ffi/ffi_java/ffi_java_ktb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,12 @@ public class HdkResult extends WedprResult {
public String extendedPrivateKey;
public String extendedPublicKey;
}
```

```java
public class NativeInterface {
public static native HdkResult createMnemonicEn(String word_count);
public static native HdkResult createMasterKeyEn(String password, String mnemonic);
public static native HdkResult deriveExtendedKey(String master_key, int purpose_type, int asset_type, int account, int change, int address_index);
}
```
10 changes: 5 additions & 5 deletions ffi/ffi_java/ffi_java_scd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ crate-type = [ "cdylib" ]
[dependencies]
jni = "0.13.0"
protobuf = "2.20.0"
wedpr_s_selective_certificate_disclosure = { path = "../../../solution/selective_certificate_disclosure" }
wedpr_ffi_common = "0.0.1"
wedpr_ffi_macros = "0.0.1"
wedpr_s_protos = { path = "../../../protos/" }
wedpr_l_protos = "0.0.1"
wedpr_s_selective_certificate_disclosure = "1.3.0"
wedpr_ffi_common = "1.0.0"
wedpr_ffi_macros = "1.0.0"
wedpr_s_protos = "1.3.0"
wedpr_l_protos = "1.0.0"

[build-dependencies]
cbindgen = "0.9.0"
Expand Down
10 changes: 5 additions & 5 deletions ffi/ffi_java/ffi_java_vcl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ crate-type = [ "cdylib", "staticlib" ]
[dependencies]
jni = "0.13.0"
protobuf = "2.20.0"
wedpr_s_verifiable_confidential_ledger = { path = "../../../solution/verifiable_confidential_ledger" }
wedpr_ffi_common = "0.0.1"
wedpr_ffi_macros = "0.0.1"
wedpr_s_protos = { path = "../../../protos/" }
wedpr_l_protos = "0.0.1"
wedpr_s_verifiable_confidential_ledger = "1.3.0"
wedpr_ffi_common = "1.0.0"
wedpr_ffi_macros = "1.0.0"
wedpr_s_protos = "1.3.0"
wedpr_l_protos = "1.0.0"

[build-dependencies]
cbindgen = "0.9.0"
Expand Down
13 changes: 7 additions & 6 deletions solution/key_tool_box/hierarchical_deterministic_key/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ hex = "0.3"
rand = "0.7"
wagyu_lib = { package = "wagyu-bitcoin", version = "0.6.3" }
wagyu-model = "0.6.3"
wedpr_l_macros = "0.0.1"
wedpr_s_protos = { path = "../../../protos", version = "1.3.0"}
wedpr_l_utils = "0.0.1"
wedpr_l_macros = "1.0.0"
wedpr_s_protos = "1.3.0"
wedpr_l_utils = "1.0.0"

[dev-dependencies]
wedpr_l_crypto_ecies_secp256k1 = "0.0.1"
wedpr_l_crypto_signature_secp256k1 = "0.0.1"
wedpr_l_crypto_hash_keccak256 = "0.0.1"
wedpr_l_crypto_ecies_secp256k1 = "1.0.0"
wedpr_l_crypto_signature_secp256k1 = "1.0.0"
wedpr_l_crypto_hash_keccak256 = "1.0.0"
wedpr_l_common_coder_base64 = "1.0.0"
17 changes: 13 additions & 4 deletions solution/key_tool_box/hierarchical_deterministic_key/src/hdk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,22 +182,31 @@ mod tests {
use wedpr_l_crypto_ecies_secp256k1::WedprSecp256k1Ecies;
use wedpr_l_crypto_hash_keccak256::WedprKeccak256;
use wedpr_l_crypto_signature_secp256k1::WedprSecp256k1Recover;
use wedpr_l_utils::traits::{Ecies, Hash, Signature};
use wedpr_l_utils::traits::{Ecies, Hash, Signature, Coder};
use wedpr_l_common_coder_base64::WedprBase64;

#[test]
fn test_hdk_usage() {
// Create a master key.
let mnemonic = create_mnemonic_en(24).unwrap();
let password = "DO NOT USE REAL PASSWORD HERE";
// let mnemonic = create_mnemonic_en(24).unwrap();
let mnemonic = "engage wagon riot toe odor metal palm donor trumpet slight exercise taste burst sense smile curtain cheese sketch unable token suggest lab rain dolphin";
// let password = "DO NOT USE REAL PASSWORD HERE";
let password = "wi_wallet";

let master_key = create_master_key_en(password, &mnemonic).unwrap();
let coder = WedprBase64::default();
println!("master_key = {:?}", coder.encode(&master_key));

// Derive an extended key.
let key_derivation_path = create_key_derivation_path(44, 1, 1, 1, 0);
let key_derivation_path = create_key_derivation_path(44, 513866, 1, 0, 1000);
let extended_key =
derive_extended_key(&master_key, &key_derivation_path).unwrap();
let private_key = extended_key.get_extended_private_key();
let public_key = extended_key.get_extended_public_key();

println!("private_key = {:?}", hex::encode(private_key));
println!("public_key = {:?}", hex::encode(public_key));

// Test the derived key pair for signature functions.
let message = "WeDPR TEST";
let hash = WedprKeccak256::default();
Expand Down
8 changes: 4 additions & 4 deletions solution/selective_certificate_disclosure/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ wedpr-indy-crypto = "0.4.5"
protobuf = "2.20.0"
serde = "1.0.102"
serde_json = "1.0.41"
wedpr_l_macros = "0.0.1"
wedpr_s_protos = { path = "../../protos", version = "1.3.0"}
wedpr_l_utils = "0.0.1"
#wedpr_l_common_coder_base64 = {version = "0.0.1", optional = true}
wedpr_l_macros = "1.0.0"
wedpr_s_protos = "1.3.0"
wedpr_l_utils = "1.0.0"
#wedpr_l_common_coder_base64 = {version = "1.0.0", optional = true}

[dev-dependencies]
criterion = "0.2"
16 changes: 8 additions & 8 deletions solution/verifiable_confidential_ledger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ description = "Library of verifiable confidential ledger (VCL) solution."
[dependencies]
colored = "1.8"
curve25519-dalek = { version = "1", features = [ "serde" ] }
wedpr_l_macros = "0.0.1"
wedpr_s_protos = { path = "../../protos", version = "1.3.0"}
wedpr_l_protos = "0.0.1"
wedpr_l_utils = "0.0.1"
wedpr_l_crypto_zkp_discrete_logarithm_proof = "0.0.1"
wedpr_l_crypto_zkp_range_proof = "0.0.1"
wedpr_l_crypto_zkp_utils = "0.0.1"
wedpr_l_macros = "1.0.0"
wedpr_s_protos = "1.3.0"
wedpr_l_protos = "1.0.0"
wedpr_l_utils = "1.0.0"
wedpr_l_crypto_zkp_discrete_logarithm_proof = "1.0.0"
wedpr_l_crypto_zkp_range_proof = "1.0.0"
wedpr_l_crypto_zkp_utils = "1.0.0"

protobuf = "2.20.0"
#protoc-rust = "2.20.0"

[dev-dependencies]
criterion = "0.2"
wedpr_l_common_coder_base64 = "0.0.1"
wedpr_l_common_coder_base64 = "1.0.0"

[[bench]]
name = "vcl"
Expand Down

0 comments on commit d43b406

Please sign in to comment.