From cd631325029bf8df53e2ec813a3d340a841f73e2 Mon Sep 17 00:00:00 2001 From: tom Date: Wed, 4 Jun 2014 23:08:35 -0400 Subject: compile issues, resolve later. commiting because switching machines --- src/crypto/crypto.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/crypto/crypto.h') diff --git a/src/crypto/crypto.h b/src/crypto/crypto.h index 61641fbcf..1d92647f6 100644 --- a/src/crypto/crypto.h +++ b/src/crypto/crypto.h @@ -26,7 +26,10 @@ namespace crypto { }; POD_CLASS ec_scalar { - char data[32]; + // FIXME: temporary to get wallet recovery to work. Need to + // discuss proper solution with team + public: + char data[32]; }; POD_CLASS public_key: ec_point { -- cgit v1.2.3 From e89949c766f2f98671b24893beedc48a47447a6f Mon Sep 17 00:00:00 2001 From: Thomas Winget Date: Fri, 6 Jun 2014 06:55:41 -0400 Subject: revert 'dirty hack' change to crypto.h. need a better way for sure. --- src/crypto/crypto.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/crypto/crypto.h') diff --git a/src/crypto/crypto.h b/src/crypto/crypto.h index 1d92647f6..61641fbcf 100644 --- a/src/crypto/crypto.h +++ b/src/crypto/crypto.h @@ -26,10 +26,7 @@ namespace crypto { }; POD_CLASS ec_scalar { - // FIXME: temporary to get wallet recovery to work. Need to - // discuss proper solution with team - public: - char data[32]; + char data[32]; }; POD_CLASS public_key: ec_point { -- cgit v1.2.3 From d22e458c6c680f4b5dcf56a58a37a5f79912e65c Mon Sep 17 00:00:00 2001 From: Thomas Winget Date: Fri, 6 Jun 2014 14:18:11 -0400 Subject: builds, but doesn't link. other than that, electrum-style recovery implemented (but not tested\!) --- src/crypto/crypto.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/crypto/crypto.h') diff --git a/src/crypto/crypto.h b/src/crypto/crypto.h index 61641fbcf..024713df1 100644 --- a/src/crypto/crypto.h +++ b/src/crypto/crypto.h @@ -62,8 +62,8 @@ namespace crypto { void operator=(const crypto_ops &); ~crypto_ops(); - static void generate_keys(public_key &, secret_key &); - friend void generate_keys(public_key &, secret_key &); + static secret_key generate_keys(public_key &pub, secret_key &sec, const secret_key& recovery_key = secret_key(), bool recover = false); + friend secret_key generate_keys(public_key &pub, secret_key &sec, const secret_key& recovery_key, bool recover); static bool check_key(const public_key &); friend bool check_key(const public_key &); static bool secret_key_to_public_key(const secret_key &, public_key &); @@ -102,8 +102,8 @@ namespace crypto { /* Generate a new key pair */ - inline void generate_keys(public_key &pub, secret_key &sec) { - crypto_ops::generate_keys(pub, sec); + inline secret_key generate_keys(public_key &pub, secret_key &sec, const secret_key& recovery_key = secret_key(), bool recover = false) { + return crypto_ops::generate_keys(pub, sec, recovery_key, recover); } /* Check a public key. Returns true if it is valid, false otherwise. -- cgit v1.2.3