From 27275f6bf78b909b253530f77e00206924e54130 Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Thu, 11 Feb 2016 02:10:04 -0800 Subject: [PATCH] Asymmetric encryption stubs. --- src/key.cpp | 16 ++++++++++++++++ src/key.h | 6 ++++++ 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a/src/key.cpp b/src/key.cpp index adafc32..afe63cb 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -6,6 +6,7 @@ #include #include +#include #include "key.h" #include "base58.h" @@ -1092,3 +1093,18 @@ bool CMalleableKeyView::CheckKeyVariant(const CPubKey &R, const CPubKey &vchPubK return true; } +//// Asymmetric encryption + +bool CPubKey::EncryptData(const std::vector& data, std::vector& encrypted) +{ + // TODO + + return true; +} + +bool CKey::DecryptData(const std::vector& encrypted, std::vector& data) +{ + // TODO + + return true; +} diff --git a/src/key.h b/src/key.h index c189090..a3b23fe 100644 --- a/src/key.h +++ b/src/key.h @@ -97,6 +97,9 @@ public: std::vector Raw() const { return vchPubKey; } + + // Encrypt data + bool EncryptData(const std::vector& data, std::vector& encrypted); }; @@ -164,6 +167,9 @@ public: // Reserialize to DER static bool ReserealizeSignature(std::vector& vchSig); + + // Decrypt data + bool DecryptData(const std::vector& encrypted, std::vector& data); }; class CPoint -- 1.7.1