|
|
@ -15,8 +15,8 @@ |
|
|
|
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/ |
|
|
|
/** @file Common.h
|
|
|
|
* @author Gav Wood <i@gavwood.com> |
|
|
|
* @author Alex Leverington <nessence@gmail.com> |
|
|
|
* @author Gav Wood <i@gavwood.com> |
|
|
|
* @date 2014 |
|
|
|
* |
|
|
|
* Ethereum-specific data structures & algorithms. |
|
|
@ -96,10 +96,19 @@ void encryptSym(Secret const& _k, bytesConstRef _plain, bytes& o_cipher); |
|
|
|
/// Symmetric decryption.
|
|
|
|
bool decryptSym(Secret const& _k, bytesConstRef _cipher, bytes& o_plaintext); |
|
|
|
|
|
|
|
/// Encrypt payload using ECIES standard with AES-CTR. TODO: move into class.
|
|
|
|
void encryptECIES(Public const& _k, bytesConstRef _plain, bytes& o_cipher); |
|
|
|
|
|
|
|
/// Decrypt payload using ECIES standard with AES-CTR. TODO: move into class.
|
|
|
|
bool decryptECIES(Secret const& _k, bytesConstRef _cipher, bytes& o_plaintext); |
|
|
|
|
|
|
|
/// Encrypts payload with random IV using AES-CTR. TODO: prefix IV.
|
|
|
|
h128 encryptSymNoAuth(Secret const& _k, bytesConstRef _plain, bytes& o_cipher); |
|
|
|
|
|
|
|
/// Encrypts payload with specified IV using AES-CTR TODO: prefix IV.
|
|
|
|
h128 encryptSymNoAuth(Secret const& _k, bytesConstRef _plain, bytes& o_cipher, h128 const& _iv); |
|
|
|
|
|
|
|
/// Decrypts payload with specified IV TODO: prefix IV.
|
|
|
|
bool decryptSymNoAuth(Secret const& _k, h128 const& _iv, bytesConstRef _cipher, bytes& o_plaintext); |
|
|
|
|
|
|
|
/// Recovers Public key from signed message hash.
|
|
|
|