Skip to content

Commit e3244ae

Browse files
committed
publish solution 1.4.0
1 parent 24784fd commit e3244ae

File tree

24 files changed

+477
-536
lines changed

24 files changed

+477
-536
lines changed

bounty/src/scd.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,7 @@ fn generate_predicate_proof(
297297
template_private_key: TemplatePrivateKey,
298298
value: u64,
299299
rule_set: &mut VerificationRuleSet,
300-
) -> Result<VerifyRequest, WedprError>
301-
{
300+
) -> Result<VerifyRequest, WedprError> {
302301
user_fill_certificate_attribute(certificate_attribute_dict, value);
303302
let (
304303
sign_certificate_request,
@@ -353,8 +352,7 @@ fn issuer_make_certificate_template(
353352
fn user_fill_certificate_attribute(
354353
certificate_attribute_dict: &mut AttributeDict,
355354
attribute: u64,
356-
)
357-
{
355+
) {
358356
let mut attribute_kv = StringToStringPair::new();
359357
attribute_kv.set_key(TARGET_ATTRIBUTE.to_string());
360358
attribute_kv.set_value(attribute.to_string());
@@ -367,8 +365,7 @@ fn user_prove_rule_set(
367365
certificate_template: &CertificateTemplate,
368366
user_private_key_str: &str,
369367
rule_set: &mut VerificationRuleSet,
370-
) -> Result<VerifyRequest, WedprError>
371-
{
368+
) -> Result<VerifyRequest, WedprError> {
372369
// In most cases, this nonce should be provided by the verifier to prevent
373370
// replaying attacks.
374371
let verification_nonce_str = verifier::get_verification_nonce().unwrap();
@@ -385,7 +382,6 @@ fn user_prove_rule_set(
385382
fn verifier_verify_rule_set(
386383
rule_set: &mut VerificationRuleSet,
387384
request: &VerifyRequest,
388-
) -> bool
389-
{
385+
) -> bool {
390386
verifier::verify_selective_disclosure(&rule_set, &request).unwrap()
391387
}

bounty/src/utils.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ pub fn print_alert5(
3434
message3: &str,
3535
message4: &str,
3636
message5: &str,
37-
)
38-
{
37+
) {
3938
println!(
4039
"{}\n{}\n{}\n{}\n{}\n",
4140
message1.yellow(),

bounty/src/vcl_data.rs

Lines changed: 400 additions & 400 deletions
Large diffs are not rendered by default.

ffi/ffi_c/ffi_c_ktb/src/hdk.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ pub extern "C" fn wedpr_ktb_hdk_create_mnemonic_en(
4242
pub extern "C" fn wedpr_ktb_hdk_create_master_key_en(
4343
password_cstring: *mut c_char,
4444
mnemonic_cstring: *mut c_char,
45-
) -> *mut c_char
46-
{
45+
) -> *mut c_char {
4746
let result = panic::catch_unwind(|| {
4847
let passwd = c_safe_c_char_pointer_to_string!(password_cstring);
4948
let mnemonic = c_safe_c_char_pointer_to_string!(mnemonic_cstring);
@@ -71,8 +70,7 @@ pub extern "C" fn wedpr_ktb_hdk_derive_extended_key(
7170
account: c_int,
7271
change: c_int,
7372
address_index: c_int,
74-
) -> *mut c_char
75-
{
73+
) -> *mut c_char {
7674
let result = panic::catch_unwind(|| {
7775
let master_key = c_safe_c_char_pointer_to_bytes!(master_key_cstring);
7876

ffi/ffi_c/ffi_c_scd/src/issuer.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ pub extern "C" fn wedpr_scd_sign_certificate(
4949
sign_request_cstring: *mut c_char,
5050
user_id_cstring: *mut c_char,
5151
user_nonce_cstring: *mut c_char,
52-
) -> *mut c_char
53-
{
52+
) -> *mut c_char {
5453
let result = panic::catch_unwind(|| {
5554
let certificate_template_pb = c_safe_c_char_pointer_to_proto!(
5655
certificate_template_cstring,

ffi/ffi_c/ffi_c_scd/src/user.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ use wedpr_ffi_common::utils::{
2222
pub extern "C" fn wedpr_scd_fill_certificate(
2323
attribute_dict_cstring: *mut c_char,
2424
certificate_template_cstring: *mut c_char,
25-
) -> *mut c_char
26-
{
25+
) -> *mut c_char {
2726
let result = panic::catch_unwind(|| {
2827
let attribute_dict_pb = c_safe_c_char_pointer_to_proto!(
2928
attribute_dict_cstring,
@@ -67,8 +66,7 @@ pub extern "C" fn wedpr_scd_blind_certificate_signature(
6766
user_private_key_cstring: *mut c_char,
6867
certificate_secrets_blinding_factors_cstring: *mut c_char,
6968
issuer_nonce_cstring: *mut c_char,
70-
) -> *mut c_char
71-
{
69+
) -> *mut c_char {
7270
let result = panic::catch_unwind(|| {
7371
let certificate_signature_pb = c_safe_c_char_pointer_to_proto!(
7472
certificate_signature_cstring,
@@ -118,8 +116,7 @@ pub extern "C" fn wedpr_scd_prove_selective_disclosure(
118116
certificate_template_cstring: *mut c_char,
119117
user_private_key_cstring: *mut c_char,
120118
verification_nonce_cstring: *mut c_char,
121-
) -> *mut c_char
122-
{
119+
) -> *mut c_char {
123120
let result = panic::catch_unwind(|| {
124121
let certificate_signature_pb = c_safe_c_char_pointer_to_proto!(
125122
certificate_signature_cstring,

ffi/ffi_c/ffi_c_scd/src/verifier.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ pub extern "C" fn wedpr_scd_get_revealed_attributes(
4646
pub extern "C" fn wedpr_scd_verify_selective_disclosure(
4747
rule_set_cstring: *mut c_char,
4848
verify_request_cstring: *mut c_char,
49-
) -> *mut c_char
50-
{
49+
) -> *mut c_char {
5150
let result = panic::catch_unwind(|| {
5251
let verify_request_pb = c_safe_c_char_pointer_to_proto!(
5352
verify_request_cstring,

ffi/ffi_c/ffi_c_vcl/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "wedpr_ffi_c_vcl"
3-
version = "1.3.0"
3+
version = "1.4.0"
44
authors = [ "WeDPR <wedpr@webank.com>" ]
55
edition = "2018"
66

@@ -15,9 +15,9 @@ libc = "0.2.60"
1515
protobuf = "2.22.1"
1616
wedpr_s_verifiable_confidential_ledger = { path = "../../../solution/verifiable_confidential_ledger"}
1717
wedpr_ffi_common = "1.0.0"
18-
wedpr_ffi_macros = { git = "https://gitee.com/WeBankBlockchain/WeDPR-Lab-Crypto.git", branch = "v1.1.0" }
18+
wedpr_ffi_macros = "1.1.0"
1919
wedpr_s_protos = { path = "../../../protos"}
20-
wedpr_l_protos = { git = "https://gitee.com/WeBankBlockchain/WeDPR-Lab-Crypto.git", branch = "v1.1.0" }
20+
wedpr_l_protos = "1.1.0"
2121
wedpr_l_macros = "1.0.0"
2222

2323
# This is required to generate C/C++ header files.

ffi/ffi_c/ffi_c_vcl/src/lib.rs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ pub extern "C" fn wedpr_vcl_prove_sum_balance(
7575
c1_secret_cstring: *mut c_char,
7676
c2_secret_cstring: *mut c_char,
7777
c3_secret_cstring: *mut c_char,
78-
) -> *mut c_char
79-
{
78+
) -> *mut c_char {
8079
let result = panic::catch_unwind(|| {
8180
let c1_secret = decode_secret!(c_safe_c_char_pointer_to_proto!(
8281
c1_secret_cstring,
@@ -107,8 +106,7 @@ pub extern "C" fn wedpr_vcl_verify_sum_balance(
107106
c2_credit_cstring: *mut c_char,
108107
c3_credit_cstring: *mut c_char,
109108
proof_cstring: *mut c_char,
110-
) -> i8
111-
{
109+
) -> i8 {
112110
let result = panic::catch_unwind(|| {
113111
let proof = c_safe_c_char_pointer_to_proto_with_error_value!(
114112
proof_cstring,
@@ -224,8 +222,7 @@ pub extern "C" fn wedpr_vcl_prove_product_balance(
224222
c1_secret_cstring: *mut c_char,
225223
c2_secret_cstring: *mut c_char,
226224
c3_secret_cstring: *mut c_char,
227-
) -> *mut c_char
228-
{
225+
) -> *mut c_char {
229226
let result = panic::catch_unwind(|| {
230227
let c1_secret = decode_secret!(c_safe_c_char_pointer_to_proto!(
231228
c1_secret_cstring,
@@ -256,8 +253,7 @@ pub extern "C" fn wedpr_vcl_verify_product_balance(
256253
c2_credit_cstring: *mut c_char,
257254
c3_credit_cstring: *mut c_char,
258255
proof_cstring: *mut c_char,
259-
) -> i8
260-
{
256+
) -> i8 {
261257
let result = panic::catch_unwind(|| {
262258
let proof = c_safe_c_char_pointer_to_proto_with_error_value!(
263259
proof_cstring,
@@ -390,8 +386,7 @@ pub extern "C" fn wedpr_vcl_prove_range(
390386
pub extern "C" fn wedpr_vcl_verify_range(
391387
credit_cstring: *mut c_char,
392388
proof_cstring: *mut c_char,
393-
) -> i8
394-
{
389+
) -> i8 {
395390
let result = panic::catch_unwind(|| {
396391
let proof_str = c_safe_c_char_pointer_to_string_with_error_value!(
397392
proof_cstring,

ffi/ffi_java/ffi_java_ktb/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ffi_java_ktb"
3-
version = "1.3.0"
3+
version = "1.4.0"
44
authors = [ "WeDPR <wedpr@webank.com>" ]
55
edition = "2018"
66

@@ -14,8 +14,8 @@ crate-type = [ "cdylib", "staticlib" ]
1414
jni = "0.13.0"
1515
protobuf = "2.22.1"
1616
wedpr_s_hierarchical_deterministic_key = "1.3.0"
17-
wedpr_ffi_common = "1.0.0"
18-
wedpr_ffi_macros = "1.0.0"
17+
wedpr_ffi_common = "1.1.0"
18+
wedpr_ffi_macros = "1.1.0"
1919
wedpr_s_protos = "1.3.0"
2020

2121
[build-dependencies]

0 commit comments

Comments
 (0)