aboutsummaryrefslogtreecommitdiff
path: root/src/device/device.hpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-04-01 17:35:11 +0200
committerRiccardo Spagni <ric@spagni.net>2019-04-01 17:35:12 +0200
commitb8ab510f238e5a4b9907ea09ed0f364b34ab1ae5 (patch)
tree25661fc3125132dff3f48a4f1aa19676f8e74c0e /src/device/device.hpp
parentMerge pull request #5349 (diff)
parentAdd get_tx_proof support, needed for new sanity check (diff)
downloadmonero-b8ab510f238e5a4b9907ea09ed0f364b34ab1ae5.tar.xz
Merge pull request #5332
7c440915 Add get_tx_proof support, needed for new sanity check (cslashm) 98fdcb2a Add support for V11 protocol with BulletProofV2 and short amount. New scheme key destination contrfol Fix dummy decryption in debug mode (cslashm) 3a981a33 Add application version compatibility check. (cslashm)
Diffstat (limited to 'src/device/device.hpp')
-rw-r--r--src/device/device.hpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/device/device.hpp b/src/device/device.hpp
index 65b38361b..2e485b1d6 100644
--- a/src/device/device.hpp
+++ b/src/device/device.hpp
@@ -27,21 +27,6 @@
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-
-/* Note about debug:
- * To debug Device you can def the following :
- * #define DEBUG_HWDEVICE
- * Activate debug mechanism:
- * - Add more trace
- * - All computation done by device are checked by default device.
- * Required IODUMMYCRYPT_HWDEVICE or IONOCRYPT_HWDEVICE for fully working
- * #define IODUMMYCRYPT_HWDEVICE 1
- * - It assumes sensitive data encryption is is off on device side. a XOR with 0x55. This allow Ledger Class to make check on clear value
- * #define IONOCRYPT_HWDEVICE 1
- * - It assumes sensitive data encryption is off on device side.
- */
-
-
#pragma once
#include "crypto/crypto.h"
@@ -211,6 +196,10 @@ namespace hw {
/* TRANSACTION */
/* ======================================================================= */
+ virtual void generate_tx_proof(const crypto::hash &prefix_hash,
+ const crypto::public_key &R, const crypto::public_key &A, const boost::optional<crypto::public_key> &B, const crypto::public_key &D, const crypto::secret_key &r,
+ crypto::signature &sig) = 0;
+
virtual bool open_tx(crypto::secret_key &tx_key) = 0;
virtual bool encrypt_payment_id(crypto::hash8 &payment_id, const crypto::public_key &public_key, const crypto::secret_key &secret_key) = 0;
@@ -220,6 +209,8 @@ namespace hw {
return encrypt_payment_id(payment_id, public_key, secret_key);
}
+ virtual rct::key genCommitmentMask(const rct::key &amount_key) = 0;
+
virtual bool ecdhEncode(rct::ecdhTuple & unmasked, const rct::key & sharedSec, bool short_amount) = 0;
virtual bool ecdhDecode(rct::ecdhTuple & masked, const rct::key & sharedSec, bool short_amount) = 0;