diff --git a/protos/crypto/ot.proto b/protos/crypto/ot.proto deleted file mode 100644 index a1cbd2b..0000000 --- a/protos/crypto/ot.proto +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2021 WeDPR Lab Project Authors. Licensed under Apache-2.0. - -syntax = "proto3"; - -package com.webank.wedpr.crypto.proto; -option java_package = "com.webank.wedpr.crypto.proto"; -option java_multiple_files = true; - -// Receiver's secret to decrypt the chosen messages during k-out-of-n OT. -message ReceiverSecretKOutOfN { - bytes scalar_b = 2; -} - -// Receiver's commitment for the chosen messages during k-out-of-n OT. -message ReceiverCommitmentKOutOfN { - bytes point_x = 1; - bytes point_y = 2; - repeated bytes point_z = 3; -} - -// Sender's ciphertext item for a single encrypted message of k-out-of-n OT. -message OtCiphertextItemKOutOfN { - bytes fingerprint = 1; - bytes key_basepoint = 2; - repeated bytes encrypted_message = 3; -} - -// Sender's ciphertext collection of k-out-of-n OT. -message OtCiphertextsKOutOfN { - repeated OtCiphertextItemKOutOfN ciphertext = 1; -} - -// Pair of id and message bytes. -message BytesToBytesPair { - bytes id = 1; - bytes message = 2; -} - -// Dict of id and message bytes. -message DataDict { - repeated BytesToBytesPair pair = 1; -} - -// List of ids. -message IdList { - repeated bytes id = 1; -} \ No newline at end of file diff --git a/protos/crypto/zkp.proto b/protos/crypto/zkp.proto deleted file mode 100644 index 7072cee..0000000 --- a/protos/crypto/zkp.proto +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2020 WeDPR Lab Project Authors. Licensed under Apache-2.0. - -syntax = "proto3"; - -package com.webank.wedpr.crypto.proto; -option java_package = "com.webank.wedpr.crypto.proto"; -option java_multiple_files = true; - -// ZKP data to verify the balance relationship among value commitments. -// For example, given C(x), C(y), C(z), this proof data can be used to -// verify whether x * y =? z. -message BalanceProof { - bytes t1 = 1; - bytes t2 = 2; - bytes t3 = 3; - bytes m1 = 4; - bytes m2 = 5; - bytes m3 = 6; - bytes m4 = 7; - bytes m5 = 8; - bytes m6 = 9; - bytes check1 = 10; - bytes check2 = 11; -} - -// ZKP data to verify the equality relationship among value commitments. -// For example, given C(x), C(y), this proof data can be used to -// verify whether x =? y. -message EqualityProof { - bytes m1 = 1; - bytes t1 = 2; - bytes t2 = 3; -} \ No newline at end of file diff --git a/protos/src/generated/mod.rs b/protos/src/generated/mod.rs index 6094c5b..a700ddc 100644 --- a/protos/src/generated/mod.rs +++ b/protos/src/generated/mod.rs @@ -1,5 +1,3 @@ // Copyright 2020 WeDPR Lab Project Authors. Licensed under Apache-2.0. pub mod common; -pub mod ot; -pub mod zkp; \ No newline at end of file diff --git a/protos/src/generated/ot.rs b/protos/src/generated/ot.rs deleted file mode 100644 index 47cba76..0000000 --- a/protos/src/generated/ot.rs +++ /dev/null @@ -1,1390 +0,0 @@ -// Copyright 2021 WeDPR Lab Project Authors. Licensed under Apache-2.0. - -// This file is generated by rust-protobuf 2.22.1. Do not edit -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_imports)] -#![allow(unused_results)] -//! Generated file from `crypto/ot.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1; - -#[derive(PartialEq,Clone,Default)] -pub struct ReceiverSecretKOutOfN { - // message fields - pub scalar_b: ::std::vec::Vec, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ReceiverSecretKOutOfN { - fn default() -> &'a ReceiverSecretKOutOfN { - ::default_instance() - } -} - -impl ReceiverSecretKOutOfN { - pub fn new() -> ReceiverSecretKOutOfN { - ::std::default::Default::default() - } - - // bytes scalar_b = 2; - - - pub fn get_scalar_b(&self) -> &[u8] { - &self.scalar_b - } - pub fn clear_scalar_b(&mut self) { - self.scalar_b.clear(); - } - - // Param is passed by value, moved - pub fn set_scalar_b(&mut self, v: ::std::vec::Vec) { - self.scalar_b = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_scalar_b(&mut self) -> &mut ::std::vec::Vec { - &mut self.scalar_b - } - - // Take field - pub fn take_scalar_b(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.scalar_b, ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for ReceiverSecretKOutOfN { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 2 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.scalar_b)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.scalar_b.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.scalar_b); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.scalar_b.is_empty() { - os.write_bytes(2, &self.scalar_b)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ReceiverSecretKOutOfN { - ReceiverSecretKOutOfN::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "scalar_b", - |m: &ReceiverSecretKOutOfN| { &m.scalar_b }, - |m: &mut ReceiverSecretKOutOfN| { &mut m.scalar_b }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ReceiverSecretKOutOfN", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static ReceiverSecretKOutOfN { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ReceiverSecretKOutOfN::new) - } -} - -impl ::protobuf::Clear for ReceiverSecretKOutOfN { - fn clear(&mut self) { - self.scalar_b.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for ReceiverSecretKOutOfN { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ReceiverSecretKOutOfN { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct ReceiverCommitmentKOutOfN { - // message fields - pub point_x: ::std::vec::Vec, - pub point_y: ::std::vec::Vec, - pub point_z: ::protobuf::RepeatedField<::std::vec::Vec>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ReceiverCommitmentKOutOfN { - fn default() -> &'a ReceiverCommitmentKOutOfN { - ::default_instance() - } -} - -impl ReceiverCommitmentKOutOfN { - pub fn new() -> ReceiverCommitmentKOutOfN { - ::std::default::Default::default() - } - - // bytes point_x = 1; - - - pub fn get_point_x(&self) -> &[u8] { - &self.point_x - } - pub fn clear_point_x(&mut self) { - self.point_x.clear(); - } - - // Param is passed by value, moved - pub fn set_point_x(&mut self, v: ::std::vec::Vec) { - self.point_x = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_point_x(&mut self) -> &mut ::std::vec::Vec { - &mut self.point_x - } - - // Take field - pub fn take_point_x(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.point_x, ::std::vec::Vec::new()) - } - - // bytes point_y = 2; - - - pub fn get_point_y(&self) -> &[u8] { - &self.point_y - } - pub fn clear_point_y(&mut self) { - self.point_y.clear(); - } - - // Param is passed by value, moved - pub fn set_point_y(&mut self, v: ::std::vec::Vec) { - self.point_y = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_point_y(&mut self) -> &mut ::std::vec::Vec { - &mut self.point_y - } - - // Take field - pub fn take_point_y(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.point_y, ::std::vec::Vec::new()) - } - - // repeated bytes point_z = 3; - - - pub fn get_point_z(&self) -> &[::std::vec::Vec] { - &self.point_z - } - pub fn clear_point_z(&mut self) { - self.point_z.clear(); - } - - // Param is passed by value, moved - pub fn set_point_z(&mut self, v: ::protobuf::RepeatedField<::std::vec::Vec>) { - self.point_z = v; - } - - // Mutable pointer to the field. - pub fn mut_point_z(&mut self) -> &mut ::protobuf::RepeatedField<::std::vec::Vec> { - &mut self.point_z - } - - // Take field - pub fn take_point_z(&mut self) -> ::protobuf::RepeatedField<::std::vec::Vec> { - ::std::mem::replace(&mut self.point_z, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for ReceiverCommitmentKOutOfN { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.point_x)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.point_y)?; - }, - 3 => { - ::protobuf::rt::read_repeated_bytes_into(wire_type, is, &mut self.point_z)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.point_x.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.point_x); - } - if !self.point_y.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.point_y); - } - for value in &self.point_z { - my_size += ::protobuf::rt::bytes_size(3, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.point_x.is_empty() { - os.write_bytes(1, &self.point_x)?; - } - if !self.point_y.is_empty() { - os.write_bytes(2, &self.point_y)?; - } - for v in &self.point_z { - os.write_bytes(3, &v)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ReceiverCommitmentKOutOfN { - ReceiverCommitmentKOutOfN::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "point_x", - |m: &ReceiverCommitmentKOutOfN| { &m.point_x }, - |m: &mut ReceiverCommitmentKOutOfN| { &mut m.point_x }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "point_y", - |m: &ReceiverCommitmentKOutOfN| { &m.point_y }, - |m: &mut ReceiverCommitmentKOutOfN| { &mut m.point_y }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "point_z", - |m: &ReceiverCommitmentKOutOfN| { &m.point_z }, - |m: &mut ReceiverCommitmentKOutOfN| { &mut m.point_z }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ReceiverCommitmentKOutOfN", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static ReceiverCommitmentKOutOfN { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ReceiverCommitmentKOutOfN::new) - } -} - -impl ::protobuf::Clear for ReceiverCommitmentKOutOfN { - fn clear(&mut self) { - self.point_x.clear(); - self.point_y.clear(); - self.point_z.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for ReceiverCommitmentKOutOfN { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ReceiverCommitmentKOutOfN { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct OtCiphertextItemKOutOfN { - // message fields - pub fingerprint: ::std::vec::Vec, - pub key_basepoint: ::std::vec::Vec, - pub encrypted_message: ::protobuf::RepeatedField<::std::vec::Vec>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a OtCiphertextItemKOutOfN { - fn default() -> &'a OtCiphertextItemKOutOfN { - ::default_instance() - } -} - -impl OtCiphertextItemKOutOfN { - pub fn new() -> OtCiphertextItemKOutOfN { - ::std::default::Default::default() - } - - // bytes fingerprint = 1; - - - pub fn get_fingerprint(&self) -> &[u8] { - &self.fingerprint - } - pub fn clear_fingerprint(&mut self) { - self.fingerprint.clear(); - } - - // Param is passed by value, moved - pub fn set_fingerprint(&mut self, v: ::std::vec::Vec) { - self.fingerprint = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_fingerprint(&mut self) -> &mut ::std::vec::Vec { - &mut self.fingerprint - } - - // Take field - pub fn take_fingerprint(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.fingerprint, ::std::vec::Vec::new()) - } - - // bytes key_basepoint = 2; - - - pub fn get_key_basepoint(&self) -> &[u8] { - &self.key_basepoint - } - pub fn clear_key_basepoint(&mut self) { - self.key_basepoint.clear(); - } - - // Param is passed by value, moved - pub fn set_key_basepoint(&mut self, v: ::std::vec::Vec) { - self.key_basepoint = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_key_basepoint(&mut self) -> &mut ::std::vec::Vec { - &mut self.key_basepoint - } - - // Take field - pub fn take_key_basepoint(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.key_basepoint, ::std::vec::Vec::new()) - } - - // repeated bytes encrypted_message = 3; - - - pub fn get_encrypted_message(&self) -> &[::std::vec::Vec] { - &self.encrypted_message - } - pub fn clear_encrypted_message(&mut self) { - self.encrypted_message.clear(); - } - - // Param is passed by value, moved - pub fn set_encrypted_message(&mut self, v: ::protobuf::RepeatedField<::std::vec::Vec>) { - self.encrypted_message = v; - } - - // Mutable pointer to the field. - pub fn mut_encrypted_message(&mut self) -> &mut ::protobuf::RepeatedField<::std::vec::Vec> { - &mut self.encrypted_message - } - - // Take field - pub fn take_encrypted_message(&mut self) -> ::protobuf::RepeatedField<::std::vec::Vec> { - ::std::mem::replace(&mut self.encrypted_message, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for OtCiphertextItemKOutOfN { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.fingerprint)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.key_basepoint)?; - }, - 3 => { - ::protobuf::rt::read_repeated_bytes_into(wire_type, is, &mut self.encrypted_message)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.fingerprint.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.fingerprint); - } - if !self.key_basepoint.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.key_basepoint); - } - for value in &self.encrypted_message { - my_size += ::protobuf::rt::bytes_size(3, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.fingerprint.is_empty() { - os.write_bytes(1, &self.fingerprint)?; - } - if !self.key_basepoint.is_empty() { - os.write_bytes(2, &self.key_basepoint)?; - } - for v in &self.encrypted_message { - os.write_bytes(3, &v)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> OtCiphertextItemKOutOfN { - OtCiphertextItemKOutOfN::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "fingerprint", - |m: &OtCiphertextItemKOutOfN| { &m.fingerprint }, - |m: &mut OtCiphertextItemKOutOfN| { &mut m.fingerprint }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "key_basepoint", - |m: &OtCiphertextItemKOutOfN| { &m.key_basepoint }, - |m: &mut OtCiphertextItemKOutOfN| { &mut m.key_basepoint }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "encrypted_message", - |m: &OtCiphertextItemKOutOfN| { &m.encrypted_message }, - |m: &mut OtCiphertextItemKOutOfN| { &mut m.encrypted_message }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "OtCiphertextItemKOutOfN", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static OtCiphertextItemKOutOfN { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(OtCiphertextItemKOutOfN::new) - } -} - -impl ::protobuf::Clear for OtCiphertextItemKOutOfN { - fn clear(&mut self) { - self.fingerprint.clear(); - self.key_basepoint.clear(); - self.encrypted_message.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for OtCiphertextItemKOutOfN { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for OtCiphertextItemKOutOfN { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct OtCiphertextsKOutOfN { - // message fields - pub ciphertext: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a OtCiphertextsKOutOfN { - fn default() -> &'a OtCiphertextsKOutOfN { - ::default_instance() - } -} - -impl OtCiphertextsKOutOfN { - pub fn new() -> OtCiphertextsKOutOfN { - ::std::default::Default::default() - } - - // repeated .com.webank.wedpr.crypto.proto.OtCiphertextItemKOutOfN ciphertext = 1; - - - pub fn get_ciphertext(&self) -> &[OtCiphertextItemKOutOfN] { - &self.ciphertext - } - pub fn clear_ciphertext(&mut self) { - self.ciphertext.clear(); - } - - // Param is passed by value, moved - pub fn set_ciphertext(&mut self, v: ::protobuf::RepeatedField) { - self.ciphertext = v; - } - - // Mutable pointer to the field. - pub fn mut_ciphertext(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.ciphertext - } - - // Take field - pub fn take_ciphertext(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.ciphertext, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for OtCiphertextsKOutOfN { - fn is_initialized(&self) -> bool { - for v in &self.ciphertext { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.ciphertext)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - for value in &self.ciphertext { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - for v in &self.ciphertext { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> OtCiphertextsKOutOfN { - OtCiphertextsKOutOfN::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "ciphertext", - |m: &OtCiphertextsKOutOfN| { &m.ciphertext }, - |m: &mut OtCiphertextsKOutOfN| { &mut m.ciphertext }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "OtCiphertextsKOutOfN", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static OtCiphertextsKOutOfN { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(OtCiphertextsKOutOfN::new) - } -} - -impl ::protobuf::Clear for OtCiphertextsKOutOfN { - fn clear(&mut self) { - self.ciphertext.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for OtCiphertextsKOutOfN { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for OtCiphertextsKOutOfN { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct BytesToBytesPair { - // message fields - pub id: ::std::vec::Vec, - pub message: ::std::vec::Vec, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a BytesToBytesPair { - fn default() -> &'a BytesToBytesPair { - ::default_instance() - } -} - -impl BytesToBytesPair { - pub fn new() -> BytesToBytesPair { - ::std::default::Default::default() - } - - // bytes id = 1; - - - pub fn get_id(&self) -> &[u8] { - &self.id - } - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::vec::Vec) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::vec::Vec { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.id, ::std::vec::Vec::new()) - } - - // bytes message = 2; - - - pub fn get_message(&self) -> &[u8] { - &self.message - } - pub fn clear_message(&mut self) { - self.message.clear(); - } - - // Param is passed by value, moved - pub fn set_message(&mut self, v: ::std::vec::Vec) { - self.message = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_message(&mut self) -> &mut ::std::vec::Vec { - &mut self.message - } - - // Take field - pub fn take_message(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.message, ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for BytesToBytesPair { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.id)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.message)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.id); - } - if !self.message.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.message); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.id.is_empty() { - os.write_bytes(1, &self.id)?; - } - if !self.message.is_empty() { - os.write_bytes(2, &self.message)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> BytesToBytesPair { - BytesToBytesPair::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "id", - |m: &BytesToBytesPair| { &m.id }, - |m: &mut BytesToBytesPair| { &mut m.id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "message", - |m: &BytesToBytesPair| { &m.message }, - |m: &mut BytesToBytesPair| { &mut m.message }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "BytesToBytesPair", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static BytesToBytesPair { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(BytesToBytesPair::new) - } -} - -impl ::protobuf::Clear for BytesToBytesPair { - fn clear(&mut self) { - self.id.clear(); - self.message.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for BytesToBytesPair { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BytesToBytesPair { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct DataDict { - // message fields - pub pair: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a DataDict { - fn default() -> &'a DataDict { - ::default_instance() - } -} - -impl DataDict { - pub fn new() -> DataDict { - ::std::default::Default::default() - } - - // repeated .com.webank.wedpr.crypto.proto.BytesToBytesPair pair = 1; - - - pub fn get_pair(&self) -> &[BytesToBytesPair] { - &self.pair - } - pub fn clear_pair(&mut self) { - self.pair.clear(); - } - - // Param is passed by value, moved - pub fn set_pair(&mut self, v: ::protobuf::RepeatedField) { - self.pair = v; - } - - // Mutable pointer to the field. - pub fn mut_pair(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.pair - } - - // Take field - pub fn take_pair(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.pair, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for DataDict { - fn is_initialized(&self) -> bool { - for v in &self.pair { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.pair)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - for value in &self.pair { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - for v in &self.pair { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> DataDict { - DataDict::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "pair", - |m: &DataDict| { &m.pair }, - |m: &mut DataDict| { &mut m.pair }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "DataDict", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static DataDict { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(DataDict::new) - } -} - -impl ::protobuf::Clear for DataDict { - fn clear(&mut self) { - self.pair.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for DataDict { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for DataDict { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct IdList { - // message fields - pub id: ::protobuf::RepeatedField<::std::vec::Vec>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a IdList { - fn default() -> &'a IdList { - ::default_instance() - } -} - -impl IdList { - pub fn new() -> IdList { - ::std::default::Default::default() - } - - // repeated bytes id = 1; - - - pub fn get_id(&self) -> &[::std::vec::Vec] { - &self.id - } - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::protobuf::RepeatedField<::std::vec::Vec>) { - self.id = v; - } - - // Mutable pointer to the field. - pub fn mut_id(&mut self) -> &mut ::protobuf::RepeatedField<::std::vec::Vec> { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::protobuf::RepeatedField<::std::vec::Vec> { - ::std::mem::replace(&mut self.id, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for IdList { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_repeated_bytes_into(wire_type, is, &mut self.id)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - for value in &self.id { - my_size += ::protobuf::rt::bytes_size(1, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - for v in &self.id { - os.write_bytes(1, &v)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> IdList { - IdList::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "id", - |m: &IdList| { &m.id }, - |m: &mut IdList| { &mut m.id }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "IdList", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static IdList { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(IdList::new) - } -} - -impl ::protobuf::Clear for IdList { - fn clear(&mut self) { - self.id.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for IdList { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for IdList { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x0fcrypto/ot.proto\x12\x1dcom.webank.wedpr.crypto.proto\"2\n\x15Recei\ - verSecretKOutOfN\x12\x19\n\x08scalar_b\x18\x02\x20\x01(\x0cR\x07scalarB\ - \"f\n\x19ReceiverCommitmentKOutOfN\x12\x17\n\x07point_x\x18\x01\x20\x01(\ - \x0cR\x06pointX\x12\x17\n\x07point_y\x18\x02\x20\x01(\x0cR\x06pointY\x12\ - \x17\n\x07point_z\x18\x03\x20\x03(\x0cR\x06pointZ\"\x8d\x01\n\x17OtCiphe\ - rtextItemKOutOfN\x12\x20\n\x0bfingerprint\x18\x01\x20\x01(\x0cR\x0bfinge\ - rprint\x12#\n\rkey_basepoint\x18\x02\x20\x01(\x0cR\x0ckeyBasepoint\x12+\ - \n\x11encrypted_message\x18\x03\x20\x03(\x0cR\x10encryptedMessage\"n\n\ - \x14OtCiphertextsKOutOfN\x12V\n\nciphertext\x18\x01\x20\x03(\x0b26.com.w\ - ebank.wedpr.crypto.proto.OtCiphertextItemKOutOfNR\nciphertext\"<\n\x10By\ - tesToBytesPair\x12\x0e\n\x02id\x18\x01\x20\x01(\x0cR\x02id\x12\x18\n\x07\ - message\x18\x02\x20\x01(\x0cR\x07message\"O\n\x08DataDict\x12C\n\x04pair\ - \x18\x01\x20\x03(\x0b2/.com.webank.wedpr.crypto.proto.BytesToBytesPairR\ - \x04pair\"\x18\n\x06IdList\x12\x0e\n\x02id\x18\x01\x20\x03(\x0cR\x02idB!\ - \n\x1dcom.webank.wedpr.crypto.protoP\x01b\x06proto3\ -"; - -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() -} - -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() - }) -} \ No newline at end of file diff --git a/protos/src/generated/zkp.rs b/protos/src/generated/zkp.rs deleted file mode 100644 index 7a706d7..0000000 --- a/protos/src/generated/zkp.rs +++ /dev/null @@ -1,875 +0,0 @@ -// Copyright 2021 WeDPR Lab Project Authors. Licensed under Apache-2.0. - -// This file is generated by rust-protobuf 2.22.1. Do not edit -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_imports)] -#![allow(unused_results)] -//! Generated file from `crypto/zkp.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1; - -#[derive(PartialEq,Clone,Default)] -pub struct BalanceProof { - // message fields - pub t1: ::std::vec::Vec, - pub t2: ::std::vec::Vec, - pub t3: ::std::vec::Vec, - pub m1: ::std::vec::Vec, - pub m2: ::std::vec::Vec, - pub m3: ::std::vec::Vec, - pub m4: ::std::vec::Vec, - pub m5: ::std::vec::Vec, - pub m6: ::std::vec::Vec, - pub check1: ::std::vec::Vec, - pub check2: ::std::vec::Vec, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a BalanceProof { - fn default() -> &'a BalanceProof { - ::default_instance() - } -} - -impl BalanceProof { - pub fn new() -> BalanceProof { - ::std::default::Default::default() - } - - // bytes t1 = 1; - - - pub fn get_t1(&self) -> &[u8] { - &self.t1 - } - pub fn clear_t1(&mut self) { - self.t1.clear(); - } - - // Param is passed by value, moved - pub fn set_t1(&mut self, v: ::std::vec::Vec) { - self.t1 = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_t1(&mut self) -> &mut ::std::vec::Vec { - &mut self.t1 - } - - // Take field - pub fn take_t1(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.t1, ::std::vec::Vec::new()) - } - - // bytes t2 = 2; - - - pub fn get_t2(&self) -> &[u8] { - &self.t2 - } - pub fn clear_t2(&mut self) { - self.t2.clear(); - } - - // Param is passed by value, moved - pub fn set_t2(&mut self, v: ::std::vec::Vec) { - self.t2 = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_t2(&mut self) -> &mut ::std::vec::Vec { - &mut self.t2 - } - - // Take field - pub fn take_t2(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.t2, ::std::vec::Vec::new()) - } - - // bytes t3 = 3; - - - pub fn get_t3(&self) -> &[u8] { - &self.t3 - } - pub fn clear_t3(&mut self) { - self.t3.clear(); - } - - // Param is passed by value, moved - pub fn set_t3(&mut self, v: ::std::vec::Vec) { - self.t3 = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_t3(&mut self) -> &mut ::std::vec::Vec { - &mut self.t3 - } - - // Take field - pub fn take_t3(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.t3, ::std::vec::Vec::new()) - } - - // bytes m1 = 4; - - - pub fn get_m1(&self) -> &[u8] { - &self.m1 - } - pub fn clear_m1(&mut self) { - self.m1.clear(); - } - - // Param is passed by value, moved - pub fn set_m1(&mut self, v: ::std::vec::Vec) { - self.m1 = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_m1(&mut self) -> &mut ::std::vec::Vec { - &mut self.m1 - } - - // Take field - pub fn take_m1(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.m1, ::std::vec::Vec::new()) - } - - // bytes m2 = 5; - - - pub fn get_m2(&self) -> &[u8] { - &self.m2 - } - pub fn clear_m2(&mut self) { - self.m2.clear(); - } - - // Param is passed by value, moved - pub fn set_m2(&mut self, v: ::std::vec::Vec) { - self.m2 = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_m2(&mut self) -> &mut ::std::vec::Vec { - &mut self.m2 - } - - // Take field - pub fn take_m2(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.m2, ::std::vec::Vec::new()) - } - - // bytes m3 = 6; - - - pub fn get_m3(&self) -> &[u8] { - &self.m3 - } - pub fn clear_m3(&mut self) { - self.m3.clear(); - } - - // Param is passed by value, moved - pub fn set_m3(&mut self, v: ::std::vec::Vec) { - self.m3 = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_m3(&mut self) -> &mut ::std::vec::Vec { - &mut self.m3 - } - - // Take field - pub fn take_m3(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.m3, ::std::vec::Vec::new()) - } - - // bytes m4 = 7; - - - pub fn get_m4(&self) -> &[u8] { - &self.m4 - } - pub fn clear_m4(&mut self) { - self.m4.clear(); - } - - // Param is passed by value, moved - pub fn set_m4(&mut self, v: ::std::vec::Vec) { - self.m4 = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_m4(&mut self) -> &mut ::std::vec::Vec { - &mut self.m4 - } - - // Take field - pub fn take_m4(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.m4, ::std::vec::Vec::new()) - } - - // bytes m5 = 8; - - - pub fn get_m5(&self) -> &[u8] { - &self.m5 - } - pub fn clear_m5(&mut self) { - self.m5.clear(); - } - - // Param is passed by value, moved - pub fn set_m5(&mut self, v: ::std::vec::Vec) { - self.m5 = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_m5(&mut self) -> &mut ::std::vec::Vec { - &mut self.m5 - } - - // Take field - pub fn take_m5(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.m5, ::std::vec::Vec::new()) - } - - // bytes m6 = 9; - - - pub fn get_m6(&self) -> &[u8] { - &self.m6 - } - pub fn clear_m6(&mut self) { - self.m6.clear(); - } - - // Param is passed by value, moved - pub fn set_m6(&mut self, v: ::std::vec::Vec) { - self.m6 = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_m6(&mut self) -> &mut ::std::vec::Vec { - &mut self.m6 - } - - // Take field - pub fn take_m6(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.m6, ::std::vec::Vec::new()) - } - - // bytes check1 = 10; - - - pub fn get_check1(&self) -> &[u8] { - &self.check1 - } - pub fn clear_check1(&mut self) { - self.check1.clear(); - } - - // Param is passed by value, moved - pub fn set_check1(&mut self, v: ::std::vec::Vec) { - self.check1 = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_check1(&mut self) -> &mut ::std::vec::Vec { - &mut self.check1 - } - - // Take field - pub fn take_check1(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.check1, ::std::vec::Vec::new()) - } - - // bytes check2 = 11; - - - pub fn get_check2(&self) -> &[u8] { - &self.check2 - } - pub fn clear_check2(&mut self) { - self.check2.clear(); - } - - // Param is passed by value, moved - pub fn set_check2(&mut self, v: ::std::vec::Vec) { - self.check2 = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_check2(&mut self) -> &mut ::std::vec::Vec { - &mut self.check2 - } - - // Take field - pub fn take_check2(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.check2, ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for BalanceProof { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.t1)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.t2)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.t3)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.m1)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.m2)?; - }, - 6 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.m3)?; - }, - 7 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.m4)?; - }, - 8 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.m5)?; - }, - 9 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.m6)?; - }, - 10 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.check1)?; - }, - 11 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.check2)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.t1.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.t1); - } - if !self.t2.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.t2); - } - if !self.t3.is_empty() { - my_size += ::protobuf::rt::bytes_size(3, &self.t3); - } - if !self.m1.is_empty() { - my_size += ::protobuf::rt::bytes_size(4, &self.m1); - } - if !self.m2.is_empty() { - my_size += ::protobuf::rt::bytes_size(5, &self.m2); - } - if !self.m3.is_empty() { - my_size += ::protobuf::rt::bytes_size(6, &self.m3); - } - if !self.m4.is_empty() { - my_size += ::protobuf::rt::bytes_size(7, &self.m4); - } - if !self.m5.is_empty() { - my_size += ::protobuf::rt::bytes_size(8, &self.m5); - } - if !self.m6.is_empty() { - my_size += ::protobuf::rt::bytes_size(9, &self.m6); - } - if !self.check1.is_empty() { - my_size += ::protobuf::rt::bytes_size(10, &self.check1); - } - if !self.check2.is_empty() { - my_size += ::protobuf::rt::bytes_size(11, &self.check2); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.t1.is_empty() { - os.write_bytes(1, &self.t1)?; - } - if !self.t2.is_empty() { - os.write_bytes(2, &self.t2)?; - } - if !self.t3.is_empty() { - os.write_bytes(3, &self.t3)?; - } - if !self.m1.is_empty() { - os.write_bytes(4, &self.m1)?; - } - if !self.m2.is_empty() { - os.write_bytes(5, &self.m2)?; - } - if !self.m3.is_empty() { - os.write_bytes(6, &self.m3)?; - } - if !self.m4.is_empty() { - os.write_bytes(7, &self.m4)?; - } - if !self.m5.is_empty() { - os.write_bytes(8, &self.m5)?; - } - if !self.m6.is_empty() { - os.write_bytes(9, &self.m6)?; - } - if !self.check1.is_empty() { - os.write_bytes(10, &self.check1)?; - } - if !self.check2.is_empty() { - os.write_bytes(11, &self.check2)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> BalanceProof { - BalanceProof::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "t1", - |m: &BalanceProof| { &m.t1 }, - |m: &mut BalanceProof| { &mut m.t1 }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "t2", - |m: &BalanceProof| { &m.t2 }, - |m: &mut BalanceProof| { &mut m.t2 }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "t3", - |m: &BalanceProof| { &m.t3 }, - |m: &mut BalanceProof| { &mut m.t3 }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "m1", - |m: &BalanceProof| { &m.m1 }, - |m: &mut BalanceProof| { &mut m.m1 }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "m2", - |m: &BalanceProof| { &m.m2 }, - |m: &mut BalanceProof| { &mut m.m2 }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "m3", - |m: &BalanceProof| { &m.m3 }, - |m: &mut BalanceProof| { &mut m.m3 }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "m4", - |m: &BalanceProof| { &m.m4 }, - |m: &mut BalanceProof| { &mut m.m4 }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "m5", - |m: &BalanceProof| { &m.m5 }, - |m: &mut BalanceProof| { &mut m.m5 }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "m6", - |m: &BalanceProof| { &m.m6 }, - |m: &mut BalanceProof| { &mut m.m6 }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "check1", - |m: &BalanceProof| { &m.check1 }, - |m: &mut BalanceProof| { &mut m.check1 }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "check2", - |m: &BalanceProof| { &m.check2 }, - |m: &mut BalanceProof| { &mut m.check2 }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "BalanceProof", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static BalanceProof { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(BalanceProof::new) - } -} - -impl ::protobuf::Clear for BalanceProof { - fn clear(&mut self) { - self.t1.clear(); - self.t2.clear(); - self.t3.clear(); - self.m1.clear(); - self.m2.clear(); - self.m3.clear(); - self.m4.clear(); - self.m5.clear(); - self.m6.clear(); - self.check1.clear(); - self.check2.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for BalanceProof { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BalanceProof { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct EqualityProof { - // message fields - pub m1: ::std::vec::Vec, - pub t1: ::std::vec::Vec, - pub t2: ::std::vec::Vec, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a EqualityProof { - fn default() -> &'a EqualityProof { - ::default_instance() - } -} - -impl EqualityProof { - pub fn new() -> EqualityProof { - ::std::default::Default::default() - } - - // bytes m1 = 1; - - - pub fn get_m1(&self) -> &[u8] { - &self.m1 - } - pub fn clear_m1(&mut self) { - self.m1.clear(); - } - - // Param is passed by value, moved - pub fn set_m1(&mut self, v: ::std::vec::Vec) { - self.m1 = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_m1(&mut self) -> &mut ::std::vec::Vec { - &mut self.m1 - } - - // Take field - pub fn take_m1(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.m1, ::std::vec::Vec::new()) - } - - // bytes t1 = 2; - - - pub fn get_t1(&self) -> &[u8] { - &self.t1 - } - pub fn clear_t1(&mut self) { - self.t1.clear(); - } - - // Param is passed by value, moved - pub fn set_t1(&mut self, v: ::std::vec::Vec) { - self.t1 = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_t1(&mut self) -> &mut ::std::vec::Vec { - &mut self.t1 - } - - // Take field - pub fn take_t1(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.t1, ::std::vec::Vec::new()) - } - - // bytes t2 = 3; - - - pub fn get_t2(&self) -> &[u8] { - &self.t2 - } - pub fn clear_t2(&mut self) { - self.t2.clear(); - } - - // Param is passed by value, moved - pub fn set_t2(&mut self, v: ::std::vec::Vec) { - self.t2 = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_t2(&mut self) -> &mut ::std::vec::Vec { - &mut self.t2 - } - - // Take field - pub fn take_t2(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.t2, ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for EqualityProof { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.m1)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.t1)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.t2)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.m1.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.m1); - } - if !self.t1.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.t1); - } - if !self.t2.is_empty() { - my_size += ::protobuf::rt::bytes_size(3, &self.t2); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.m1.is_empty() { - os.write_bytes(1, &self.m1)?; - } - if !self.t1.is_empty() { - os.write_bytes(2, &self.t1)?; - } - if !self.t2.is_empty() { - os.write_bytes(3, &self.t2)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> EqualityProof { - EqualityProof::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "m1", - |m: &EqualityProof| { &m.m1 }, - |m: &mut EqualityProof| { &mut m.m1 }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "t1", - |m: &EqualityProof| { &m.t1 }, - |m: &mut EqualityProof| { &mut m.t1 }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "t2", - |m: &EqualityProof| { &m.t2 }, - |m: &mut EqualityProof| { &mut m.t2 }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "EqualityProof", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static EqualityProof { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(EqualityProof::new) - } -} - -impl ::protobuf::Clear for EqualityProof { - fn clear(&mut self) { - self.m1.clear(); - self.t1.clear(); - self.t2.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for EqualityProof { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for EqualityProof { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x10crypto/zkp.proto\x12\x1dcom.webank.wedpr.crypto.proto\"\xce\x01\n\ - \x0cBalanceProof\x12\x0e\n\x02t1\x18\x01\x20\x01(\x0cR\x02t1\x12\x0e\n\ - \x02t2\x18\x02\x20\x01(\x0cR\x02t2\x12\x0e\n\x02t3\x18\x03\x20\x01(\x0cR\ - \x02t3\x12\x0e\n\x02m1\x18\x04\x20\x01(\x0cR\x02m1\x12\x0e\n\x02m2\x18\ - \x05\x20\x01(\x0cR\x02m2\x12\x0e\n\x02m3\x18\x06\x20\x01(\x0cR\x02m3\x12\ - \x0e\n\x02m4\x18\x07\x20\x01(\x0cR\x02m4\x12\x0e\n\x02m5\x18\x08\x20\x01\ - (\x0cR\x02m5\x12\x0e\n\x02m6\x18\t\x20\x01(\x0cR\x02m6\x12\x16\n\x06chec\ - k1\x18\n\x20\x01(\x0cR\x06check1\x12\x16\n\x06check2\x18\x0b\x20\x01(\ - \x0cR\x06check2\"?\n\rEqualityProof\x12\x0e\n\x02m1\x18\x01\x20\x01(\x0c\ - R\x02m1\x12\x0e\n\x02t1\x18\x02\x20\x01(\x0cR\x02t1\x12\x0e\n\x02t2\x18\ - \x03\x20\x01(\x0cR\x02t2B!\n\x1dcom.webank.wedpr.crypto.protoP\x01b\x06p\ - roto3\ -"; - -static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() -} - -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() - }) -} \ No newline at end of file