Electroneum
Loading...
Searching...
No Matches
protocol.hpp
Go to the documentation of this file.
1// Copyright (c) 2017-Present, Electroneum
2//
3// All rights reserved.
4//
5// Redistribution and use in source and binary forms, with or without modification, are
6// permitted provided that the following conditions are met:
7//
8// 1. Redistributions of source code must retain the above copyright notice, this list of
9// conditions and the following disclaimer.
10//
11// 2. Redistributions in binary form must reproduce the above copyright notice, this list
12// of conditions and the following disclaimer in the documentation and/or other
13// materials provided with the distribution.
14//
15// 3. Neither the name of the copyright holder nor the names of its contributors may be
16// used to endorse or promote products derived from this software without specific
17// prior written permission.
18//
19// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
20// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
22// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
27// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28//
29
30#ifndef ELECTRONEUM_PROTOCOL_H
31#define ELECTRONEUM_PROTOCOL_H
32
33#include "trezor_defs.hpp"
35#include "messages_map.hpp"
36#include "transport.hpp"
37#include "wallet/wallet2.h"
38
39namespace hw{
40namespace trezor{
41namespace protocol{
42
43 std::string key_to_string(const ::crypto::ec_point & key);
44 std::string key_to_string(const ::crypto::ec_scalar & key);
45 std::string key_to_string(const ::crypto::hash & key);
46 std::string key_to_string(const ::rct::key & key);
47
48 void string_to_key(::crypto::ec_scalar & key, const std::string & str);
49 void string_to_key(::crypto::ec_point & key, const std::string & str);
50 void string_to_key(::rct::key & key, const std::string & str);
51
52 template<class sub_t, class InputIterator>
53 void assign_to_repeatable(::google::protobuf::RepeatedField<sub_t> * dst, const InputIterator begin, const InputIterator end){
54 for (InputIterator it = begin; it != end; it++) {
55 auto s = dst->Add();
56 *s = *it;
57 }
58 }
59
60 template<class sub_t, class InputIterator>
61 void assign_from_repeatable(std::vector<sub_t> * dst, const InputIterator begin, const InputIterator end){
62 for (InputIterator it = begin; it != end; it++) {
63 dst->push_back(*it);
64 }
65 };
66
67 template<typename T>
68 bool cn_deserialize(const void * buff, size_t len, T & dst){
69 std::stringstream ss;
70 ss.write(static_cast<const char *>(buff), len); //ss << tx_blob;
72 bool r = ::serialization::serialize(ba, dst);
73 return r;
74 }
75
76 template<typename T>
77 bool cn_deserialize(const std::string & str, T & dst){
78 return cn_deserialize(str.data(), str.size(), dst);
79 }
80
81 template<typename T>
82 std::string cn_serialize(T & obj){
83 std::ostringstream oss;
84 binary_archive<true> oar(oss);
85 bool success = ::serialization::serialize(oar, obj);
86 if (!success){
87 throw exc::EncodingException("Could not CN serialize given object");
88 }
89 return oss.str();
90 }
91
92// Crypto / encryption
93namespace crypto {
94namespace chacha {
95 // Constants as defined in RFC 7539.
96 const unsigned IV_SIZE = 12;
97 const unsigned TAG_SIZE = 16; // crypto_aead_chacha20poly1305_IETF_ABYTES;
98
102 void decrypt(const void* ciphertext, size_t length, const uint8_t* key, const uint8_t* iv, char* plaintext, size_t *plaintext_len=nullptr);
103
104}
105}
106
107
108// Cold Key image sync
109namespace ki {
110
111 using ElectroneumTransferDetails = messages::electroneum::ElectroneumKeyImageSyncStepRequest_ElectroneumTransferDetails;
112 using ElectroneumSubAddressIndicesList = messages::electroneum::ElectroneumKeyImageExportInitRequest_ElectroneumSubAddressIndicesList;
113 using ElectroneumExportedKeyImage = messages::electroneum::ElectroneumKeyImageSyncStepAck_ElectroneumExportedKeyImage;
115
119 bool key_image_data(wallet_shim * wallet,
120 const std::vector<tools::wallet2::transfer_details> & transfers,
121 std::vector<ElectroneumTransferDetails> & res);
122
126 std::string compute_hash(const ElectroneumTransferDetails & rr);
127
131 void generate_commitment(std::vector<ElectroneumTransferDetails> & mtds,
132 const std::vector<tools::wallet2::transfer_details> & transfers,
133 std::shared_ptr<messages::electroneum::ElectroneumKeyImageExportInitRequest> & req);
134
138 void live_refresh_ack(const ::crypto::secret_key & view_key_priv,
139 const ::crypto::public_key& out_key,
140 const std::shared_ptr<messages::electroneum::ElectroneumLiveRefreshStepAck> & ack,
141 ::cryptonote::keypair& in_ephemeral,
143}
144
145// Cold transaction signing
146namespace tx {
147 using TsxData = messages::electroneum::ElectroneumTransactionInitRequest_ElectroneumTransactionData;
148 using ElectroneumTransactionDestinationEntry = messages::electroneum::ElectroneumTransactionDestinationEntry;
149 using ElectroneumAccountPublicAddress = messages::electroneum::ElectroneumTransactionDestinationEntry_ElectroneumAccountPublicAddress;
150 using ElectroneumTransactionSourceEntry = messages::electroneum::ElectroneumTransactionSourceEntry;
151 using ElectroneumMultisigKLRki = messages::electroneum::ElectroneumTransactionSourceEntry_ElectroneumMultisigKLRki;
152 using ElectroneumOutputEntry = messages::electroneum::ElectroneumTransactionSourceEntry_ElectroneumOutputEntry;
153 using ElectroneumRctKey = messages::electroneum::ElectroneumTransactionSourceEntry_ElectroneumOutputEntry_ElectroneumRctKeyPublic;
154 using ElectroneumRsigData = messages::electroneum::ElectroneumTransactionRsigData;
155
158
163 void translate_rct_key(ElectroneumRctKey * dst, const rct::ctkey * src);
164 std::string hash_addr(const ElectroneumAccountPublicAddress * addr, boost::optional<uint64_t> amount = boost::none, boost::optional<bool> is_subaddr = boost::none);
165 std::string hash_addr(const std::string & spend_key, const std::string & view_key, boost::optional<uint64_t> amount = boost::none, boost::optional<bool> is_subaddr = boost::none);
166 std::string hash_addr(const ::crypto::public_key * spend_key, const ::crypto::public_key * view_key, boost::optional<uint64_t> amount = boost::none, boost::optional<bool> is_subaddr = boost::none);
167 ::crypto::secret_key compute_enc_key(const ::crypto::secret_key & private_view_key, const std::string & aux, const std::string & salt);
168
169 typedef boost::variant<rct::rangeSig, rct::Bulletproof> rsig_v;
170
174 class TData {
175 public:
179 unsigned rsig_type;
181 std::vector<uint64_t> grouping_vct;
182 std::shared_ptr<ElectroneumRsigData> rsig_param;
187
188 std::vector<std::string> tx_in_hmacs;
189 std::vector<std::string> tx_out_entr_hmacs;
190 std::vector<std::string> tx_out_hmacs;
191 std::vector<rsig_v> tx_out_rsigs;
192 std::vector<rct::ctkey> tx_out_pk;
193 std::vector<rct::ecdhTuple> tx_out_ecdh;
194 std::vector<size_t> source_permutation;
195 std::vector<std::string> alphas;
196 std::vector<std::string> spend_encs;
197 std::vector<std::string> pseudo_outs;
198 std::vector<std::string> pseudo_outs_hmac;
199 std::vector<std::string> couts;
200 std::vector<std::string> couts_dec;
201 std::vector<rct::key> rsig_gamma;
202 std::string tx_prefix_hash;
203 std::string enc_salt1;
204 std::string enc_salt2;
205 std::string enc_keys;
206
207 std::shared_ptr<rct::rctSig> rv;
208
209 TData();
210 };
211
212 class Signer {
213 private:
214 TData m_ct;
215 wallet_shim * m_wallet2;
216
217 size_t m_tx_idx;
218 const unsigned_tx_set * m_unsigned_tx;
219 hw::tx_aux_data * m_aux_data;
220
221 unsigned m_client_version;
222 bool m_multisig;
223
224 const tx_construction_data & cur_tx(){
225 CHECK_AND_ASSERT_THROW_MES(m_tx_idx < m_unsigned_tx->txes.size(), "Invalid transaction index");
226 return m_unsigned_tx->txes[m_tx_idx];
227 }
228
229 void extract_payment_id();
230 void compute_integrated_indices(TsxData * tsx_data);
231 bool should_compute_bp_now() const;
232 void compute_bproof(messages::electroneum::ElectroneumTransactionRsigData & rsig_data);
233 void process_bproof(rct::Bulletproof & bproof);
234
235 public:
236 Signer(wallet_shim * wallet2, const unsigned_tx_set * unsigned_tx, size_t tx_idx = 0, hw::tx_aux_data * aux_data = nullptr);
237
238 std::shared_ptr<messages::electroneum::ElectroneumTransactionInitRequest> step_init();
239 void step_init_ack(std::shared_ptr<const messages::electroneum::ElectroneumTransactionInitAck> ack);
240
241 std::shared_ptr<messages::electroneum::ElectroneumTransactionSetInputRequest> step_set_input(size_t idx);
242 void step_set_input_ack(std::shared_ptr<const messages::electroneum::ElectroneumTransactionSetInputAck> ack);
243
244 void sort_ki();
245 std::shared_ptr<messages::electroneum::ElectroneumTransactionInputsPermutationRequest> step_permutation();
246 void step_permutation_ack(std::shared_ptr<const messages::electroneum::ElectroneumTransactionInputsPermutationAck> ack);
247
248 std::shared_ptr<messages::electroneum::ElectroneumTransactionInputViniRequest> step_set_vini_input(size_t idx);
249 void step_set_vini_input_ack(std::shared_ptr<const messages::electroneum::ElectroneumTransactionInputViniAck> ack);
250
251 std::shared_ptr<messages::electroneum::ElectroneumTransactionAllInputsSetRequest> step_all_inputs_set();
252 void step_all_inputs_set_ack(std::shared_ptr<const messages::electroneum::ElectroneumTransactionAllInputsSetAck> ack);
253
254 std::shared_ptr<messages::electroneum::ElectroneumTransactionSetOutputRequest> step_set_output(size_t idx);
255 void step_set_output_ack(std::shared_ptr<const messages::electroneum::ElectroneumTransactionSetOutputAck> ack);
256
257 std::shared_ptr<messages::electroneum::ElectroneumTransactionSetOutputRequest> step_rsig(size_t idx);
258 void step_set_rsig_ack(std::shared_ptr<const messages::electroneum::ElectroneumTransactionSetOutputAck> ack);
259
260 std::shared_ptr<messages::electroneum::ElectroneumTransactionAllOutSetRequest> step_all_outs_set();
261 void step_all_outs_set_ack(std::shared_ptr<const messages::electroneum::ElectroneumTransactionAllOutSetAck> ack, hw::device &hwdev);
262
263 std::shared_ptr<messages::electroneum::ElectroneumTransactionSignInputRequest> step_sign_input(size_t idx);
264 void step_sign_input_ack(std::shared_ptr<const messages::electroneum::ElectroneumTransactionSignInputAck> ack);
265
266 std::shared_ptr<messages::electroneum::ElectroneumTransactionFinalRequest> step_final();
267 void step_final_ack(std::shared_ptr<const messages::electroneum::ElectroneumTransactionFinalAck> ack);
268
269 std::string store_tx_aux_info();
270
271 unsigned client_version() const {
272 return m_client_version;
273 }
274
275 bool is_simple() const {
276 if (!m_ct.rv){
277 throw std::invalid_argument("RV not initialized");
278 }
279 auto tp = m_ct.rv->type;
280 return tp == rct::RCTTypeSimple;
281 }
282
283 bool is_req_bulletproof() const {
284 return m_ct.tx_data.rct_config.range_proof_type != rct::RangeProofBorromean;
285 }
286
287 bool is_bulletproof() const {
288 if (!m_ct.rv){
289 throw std::invalid_argument("RV not initialized");
290 }
291 auto tp = m_ct.rv->type;
293 }
294
295 bool is_offloading() const {
296 return m_ct.rsig_param && m_ct.rsig_param->offload_type() != 0;
297 }
298
299 size_t num_outputs() const {
300 return m_ct.tx_data.splitted_dsts.size();
301 }
302
303 size_t num_inputs() const {
304 return m_ct.tx_data.sources.size();
305 }
306
307 const TData & tdata() const {
308 return m_ct;
309 }
310 };
311
312 // TX Key decryption
313 void load_tx_key_data(hw::device_cold::tx_key_data_t & res, const std::string & data);
314
315 std::shared_ptr<messages::electroneum::ElectroneumGetTxKeyRequest> get_tx_key(
316 const hw::device_cold::tx_key_data_t & tx_data);
317
319 std::vector<::crypto::secret_key> & tx_keys,
320 const std::string & tx_prefix_hash,
321 const ::crypto::secret_key & view_key_priv,
322 std::shared_ptr<const messages::electroneum::ElectroneumGetTxKeyAck> ack
323 );
324}
325
326}
327}
328}
329
330
331#endif //ELECTRONEUM_PROTOCOL_H
std::vector< std::pair< crypto::key_image, crypto::signature > > exported_key_image
std::shared_ptr< messages::electroneum::ElectroneumTransactionSignInputRequest > step_sign_input(size_t idx)
Definition protocol.cpp:907
void step_set_vini_input_ack(std::shared_ptr< const messages::electroneum::ElectroneumTransactionInputViniAck > ack)
Definition protocol.cpp:648
void step_all_outs_set_ack(std::shared_ptr< const messages::electroneum::ElectroneumTransactionAllOutSetAck > ack, hw::device &hwdev)
Definition protocol.cpp:837
std::shared_ptr< messages::electroneum::ElectroneumTransactionFinalRequest > step_final()
Definition protocol.cpp:952
std::shared_ptr< messages::electroneum::ElectroneumTransactionInitRequest > step_init()
Definition protocol.cpp:490
Signer(wallet_shim *wallet2, const unsigned_tx_set *unsigned_tx, size_t tx_idx=0, hw::tx_aux_data *aux_data=nullptr)
Definition protocol.cpp:380
void step_set_input_ack(std::shared_ptr< const messages::electroneum::ElectroneumTransactionSetInputAck > ack)
Definition protocol.cpp:563
void step_set_rsig_ack(std::shared_ptr< const messages::electroneum::ElectroneumTransactionSetOutputAck > ack)
Definition protocol.cpp:828
void step_init_ack(std::shared_ptr< const messages::electroneum::ElectroneumTransactionInitAck > ack)
Definition protocol.cpp:547
const TData & tdata() const
Definition protocol.hpp:307
void step_sign_input_ack(std::shared_ptr< const messages::electroneum::ElectroneumTransactionSignInputAck > ack)
Definition protocol.cpp:930
std::shared_ptr< messages::electroneum::ElectroneumTransactionSetOutputRequest > step_set_output(size_t idx)
Definition protocol.cpp:684
std::shared_ptr< messages::electroneum::ElectroneumTransactionSetOutputRequest > step_rsig(size_t idx)
Definition protocol.cpp:813
std::shared_ptr< messages::electroneum::ElectroneumTransactionInputsPermutationRequest > step_permutation()
Definition protocol.cpp:612
void step_final_ack(std::shared_ptr< const messages::electroneum::ElectroneumTransactionFinalAck > ack)
Definition protocol.cpp:957
void step_set_output_ack(std::shared_ptr< const messages::electroneum::ElectroneumTransactionSetOutputAck > ack)
Definition protocol.cpp:708
std::shared_ptr< messages::electroneum::ElectroneumTransactionSetInputRequest > step_set_input(size_t idx)
Definition protocol.cpp:555
void step_all_inputs_set_ack(std::shared_ptr< const messages::electroneum::ElectroneumTransactionAllInputsSetAck > ack)
Definition protocol.cpp:656
void step_permutation_ack(std::shared_ptr< const messages::electroneum::ElectroneumTransactionInputsPermutationAck > ack)
Definition protocol.cpp:621
std::shared_ptr< messages::electroneum::ElectroneumTransactionAllOutSetRequest > step_all_outs_set()
Definition protocol.cpp:833
std::shared_ptr< messages::electroneum::ElectroneumTransactionAllInputsSetRequest > step_all_inputs_set()
Definition protocol.cpp:652
std::shared_ptr< messages::electroneum::ElectroneumTransactionInputViniRequest > step_set_vini_input(size_t idx)
Definition protocol.cpp:625
tx_construction_data tx_data
Definition protocol.hpp:177
std::vector< std::string > couts
Definition protocol.hpp:199
std::vector< rct::ecdhTuple > tx_out_ecdh
Definition protocol.hpp:193
std::vector< std::string > alphas
Definition protocol.hpp:195
std::vector< std::string > tx_out_hmacs
Definition protocol.hpp:190
std::shared_ptr< ElectroneumRsigData > rsig_param
Definition protocol.hpp:182
cryptonote::transaction tx
Definition protocol.hpp:178
std::vector< std::string > spend_encs
Definition protocol.hpp:196
std::vector< std::string > tx_in_hmacs
Definition protocol.hpp:188
std::vector< uint64_t > grouping_vct
Definition protocol.hpp:181
std::vector< size_t > source_permutation
Definition protocol.hpp:194
std::vector< std::string > pseudo_outs_hmac
Definition protocol.hpp:198
std::vector< rct::key > rsig_gamma
Definition protocol.hpp:201
std::vector< std::string > couts_dec
Definition protocol.hpp:200
std::vector< std::string > tx_out_entr_hmacs
Definition protocol.hpp:189
std::vector< rsig_v > tx_out_rsigs
Definition protocol.hpp:191
std::shared_ptr< rct::rctSig > rv
Definition protocol.hpp:207
std::vector< std::string > pseudo_outs
Definition protocol.hpp:197
std::vector< rct::ctkey > tx_out_pk
Definition protocol.hpp:192
const char * res
const char * key
#define CHECK_AND_ASSERT_THROW_MES(expr, message)
crypto namespace.
Definition crypto.cpp:58
POD_CLASS ec_point
Definition crypto.h:70
epee::mlocked< tools::scrubbed< ec_scalar > > secret_key
Definition crypto.h:82
POD_CLASS key_image
Definition crypto.h:105
POD_CLASS ec_scalar
Definition crypto.h:74
void decrypt(const void *ciphertext, size_t length, const uint8_t *key, const uint8_t *iv, char *plaintext, size_t *plaintext_len)
Definition protocol.cpp:120
messages::electroneum::ElectroneumKeyImageSyncStepRequest_ElectroneumTransferDetails ElectroneumTransferDetails
Definition protocol.hpp:111
void live_refresh_ack(const ::crypto::secret_key &view_key_priv, const ::crypto::public_key &out_key, const std::shared_ptr< messages::Electroneum::ElectroneumLiveRefreshStepAck > &ack, ::cryptonote::keypair &in_ephemeral, ::crypto::key_image &ki)
Definition protocol.cpp:224
void generate_commitment(std::vector< ElectroneumTransferDetails > &mtds, const std::vector< tools::wallet2::transfer_details > &transfers, std::shared_ptr< messages::Electroneum::ElectroneumKeyImageExportInitRequest > &req)
Definition protocol.cpp:188
hw::device_cold::exported_key_image exported_key_image
Definition protocol.hpp:114
bool key_image_data(wallet_shim *wallet, const std::vector< tools::wallet2::transfer_details > &transfers, std::vector< ElectroneumTransferDetails > &res)
Definition protocol.cpp:145
messages::electroneum::ElectroneumKeyImageExportInitRequest_ElectroneumSubAddressIndicesList ElectroneumSubAddressIndicesList
Definition protocol.hpp:112
std::string compute_hash(const ElectroneumTransferDetails &rr)
Definition protocol.cpp:167
messages::electroneum::ElectroneumKeyImageSyncStepAck_ElectroneumExportedKeyImage ElectroneumExportedKeyImage
Definition protocol.hpp:113
void load_tx_key_data(hw::device_cold::tx_key_data_t &res, const std::string &data)
messages::electroneum::ElectroneumTransactionSourceEntry_ElectroneumOutputEntry_ElectroneumRctKeyPublic ElectroneumRctKey
Definition protocol.hpp:153
void translate_klrki(ElectroneumMultisigKLRki *dst, const rct::multisig_kLRki *src)
Definition protocol.cpp:305
std::shared_ptr< messages::Electroneum::ElectroneumGetTxKeyRequest > get_tx_key(const hw::device_cold::tx_key_data_t &tx_data)
messages::electroneum::ElectroneumTransactionInitRequest_ElectroneumTransactionData TsxData
Definition protocol.hpp:147
std::string hash_addr(const ElectroneumAccountPublicAddress *addr, boost::optional< uint64_t > amount, boost::optional< bool > is_subaddr)
Definition protocol.cpp:317
messages::electroneum::ElectroneumTransactionSourceEntry_ElectroneumOutputEntry ElectroneumOutputEntry
Definition protocol.hpp:152
messages::electroneum::ElectroneumTransactionSourceEntry ElectroneumTransactionSourceEntry
Definition protocol.hpp:150
void get_tx_key_ack(std::vector<::crypto::secret_key > &tx_keys, const std::string &tx_prefix_hash, const ::crypto::secret_key &view_key_priv, std::shared_ptr< const messages::Electroneum::ElectroneumGetTxKeyAck > ack)
::crypto::secret_key compute_enc_key(const ::crypto::secret_key &private_view_key, const std::string &aux, const std::string &salt)
Definition protocol.cpp:351
messages::electroneum::ElectroneumTransactionDestinationEntry ElectroneumTransactionDestinationEntry
Definition protocol.hpp:148
void translate_src_entry(ElectroneumTransactionSourceEntry *dst, const cryptonote::tx_source_entry *src)
Definition protocol.cpp:285
void translate_dst_entry(ElectroneumTransactionDestinationEntry *dst, const cryptonote::tx_destination_entry *src)
Definition protocol.cpp:277
messages::electroneum::ElectroneumTransactionSourceEntry_ElectroneumMultisigKLRki ElectroneumMultisigKLRki
Definition protocol.hpp:151
void translate_rct_key(ElectroneumRctKey *dst, const rct::ctkey *src)
Definition protocol.cpp:312
boost::variant< rct::rangeSig, rct::Bulletproof > rsig_v
Definition protocol.hpp:169
tools::wallet2::unsigned_tx_set unsigned_tx_set
Definition protocol.hpp:157
void translate_address(ElectroneumAccountPublicAddress *dst, const cryptonote::account_public_address *src)
Definition protocol.cpp:272
tools::wallet2::tx_construction_data tx_construction_data
Definition protocol.hpp:156
messages::electroneum::ElectroneumTransactionRsigData ElectroneumRsigData
Definition protocol.hpp:154
messages::electroneum::ElectroneumTransactionDestinationEntry_ElectroneumAccountPublicAddress ElectroneumAccountPublicAddress
Definition protocol.hpp:149
void assign_from_repeatable(std::vector< sub_t > *dst, const InputIterator begin, const InputIterator end)
Definition protocol.hpp:61
bool cn_deserialize(const void *buff, size_t len, T &dst)
Definition protocol.hpp:68
void string_to_key(::crypto::ec_scalar &key, const std::string &str)
Definition protocol.cpp:96
void assign_to_repeatable(::google::protobuf::RepeatedField< sub_t > *dst, const InputIterator begin, const InputIterator end)
Definition protocol.hpp:53
std::string key_to_string(const ::crypto::ec_point &key)
Definition protocol.cpp:80
std::string cn_serialize(T &obj)
Definition protocol.hpp:82
Definition device.cpp:38
@ RCTTypeSimple
Definition rctTypes.h:231
@ RCTTypeBulletproof2
Definition rctTypes.h:233
@ RCTTypeBulletproof
Definition rctTypes.h:232
@ RangeProofBorromean
Definition rctTypes.h:235
bool serialize(Archive &ar, T &v)
unsigned char uint8_t
Definition stdint.h:124
#define T(x)