From 743608ec16e27a3c1ca2febd4e80391a32c23efd Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Wed, 20 May 2020 21:43:09 +0000 Subject: wallet: allow signing a message with spend or view key --- src/device/device_default.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/device/device_default.cpp') diff --git a/src/device/device_default.cpp b/src/device/device_default.cpp index 145197212..cb63deb15 100644 --- a/src/device/device_default.cpp +++ b/src/device/device_default.cpp @@ -207,6 +207,12 @@ namespace hw { return m; } + crypto::secret_key device_default::get_subaddress_view_secret_key(const crypto::secret_key &a, const cryptonote::subaddress_index &index) { + crypto::secret_key skey = get_subaddress_secret_key(a, index); + sc_mul((unsigned char*)skey.data, (const unsigned char*)skey.data, (const unsigned char*)a.data); + return skey; + } + /* ======================================================================= */ /* DERIVATION & KEY */ /* ======================================================================= */ -- cgit v1.2.3