diff --git a/libdevcrypto/EC.cpp b/libdevcrypto/EC.cpp
index 519c59305..e985b50c5 100644
--- a/libdevcrypto/EC.cpp
+++ b/libdevcrypto/EC.cpp
@@ -1,16 +1,16 @@
/*
This file is part of cpp-ethereum.
-
+
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
cpp-ethereum is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with cpp-ethereum. If not, see .
*/
@@ -18,7 +18,7 @@
* @author Alex Leverington
* @date 2014
*
- * Ethereum-specific data structures & algorithms.
+ * Shared EC classes and functions.
*/
#pragma warning(push)
diff --git a/libdevcrypto/EC.h b/libdevcrypto/EC.h
index 2ef9fd1d7..5db0cb4bf 100644
--- a/libdevcrypto/EC.h
+++ b/libdevcrypto/EC.h
@@ -1,16 +1,16 @@
/*
This file is part of cpp-ethereum.
-
+
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
cpp-ethereum is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with cpp-ethereum. If not, see .
*/
@@ -18,7 +18,7 @@
* @author Alex Leverington
* @date 2014
*
- * Ethereum-specific data structures & algorithms.
+ * Shared EC classes and functions.
*/
#pragma once
@@ -56,23 +56,22 @@ inline CryptoPP::OID secp256k1()
{
return CryptoPP::ASN1::secp256k1();
}
-
+
class ECKeyPair
{
public:
static ECKeyPair create();
- CryptoPP::DL_PublicKey_EC pub() { return m_pub; } // deprecate
- CryptoPP::DL_PrivateKey_EC sec() { return m_sec; } // deprecate
+ /// deprecate
+ CryptoPP::DL_PublicKey_EC pub() { return m_pub; }
+ /// deprecate
+ CryptoPP::DL_PrivateKey_EC sec() { return m_sec; }
+
private:
ECKeyPair() {}
CryptoPP::DL_PublicKey_EC m_pub;
CryptoPP::DL_PrivateKey_EC m_sec;
};
-//class ECDHE;
-//bytes ECSign(KeyPair, bytesConstRef);
-//bool ECVerify(Public, bytesConstRef);
-
}
}
diff --git a/libdevcrypto/ECIES.cpp b/libdevcrypto/ECIES.cpp
index d52dd35fd..8d63ee752 100644
--- a/libdevcrypto/ECIES.cpp
+++ b/libdevcrypto/ECIES.cpp
@@ -1,16 +1,16 @@
/*
This file is part of cpp-ethereum.
-
+
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
cpp-ethereum is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with cpp-ethereum. If not, see .
*/
@@ -18,7 +18,7 @@
* @author Alex Leverington
* @date 2014
*
- * Ethereum-specific data structures & algorithms.
+ * ECIES Encrypt/Decrypt
*/
#include "EC.h"
diff --git a/libdevcrypto/ECIES.h b/libdevcrypto/ECIES.h
index a8331f5a8..0c2c386a5 100644
--- a/libdevcrypto/ECIES.h
+++ b/libdevcrypto/ECIES.h
@@ -1,16 +1,16 @@
/*
This file is part of cpp-ethereum.
-
+
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
cpp-ethereum is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with cpp-ethereum. If not, see .
*/
@@ -18,7 +18,7 @@
* @author Alex Leverington
* @date 2014
*
- * Ethereum-specific data structures & algorithms.
+ * ECIES Encrypt/Decrypt
*/
#pragma once
@@ -52,10 +52,10 @@ class ECIESEncryptor
{
public:
ECIESEncryptor(ECKeyPair* _k);
-
+
/// Encrypt _message. (object will be resized and replaced with cipher)
void encrypt(bytes& _message);
-
+
private:
CryptoPP::ECIES::Encryptor m_encryptor;
};
@@ -67,10 +67,10 @@ class ECIESDecryptor
{
public:
ECIESDecryptor(ECKeyPair* _k);
-
+
/// Decrypt cipher to plain.
bytes decrypt(bytesConstRef& _c);
-
+
private:
CryptoPP::ECIES::Decryptor m_decryptor;
};
diff --git a/libdevcrypto/SHA3MAC.cpp b/libdevcrypto/SHA3MAC.cpp
index d50f07e73..6bbf4c970 100644
--- a/libdevcrypto/SHA3MAC.cpp
+++ b/libdevcrypto/SHA3MAC.cpp
@@ -1,22 +1,24 @@
/*
This file is part of cpp-ethereum.
-
+
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
cpp-ethereum is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with cpp-ethereum. If not, see .
*/
/** @file SHA3MAC.cpp
* @author Alex Leverington
* @date 2014
+ *
+ * SHA3 MAC
*/
#pragma GCC diagnostic ignored "-Wunused-function"
diff --git a/libdevcrypto/SHA3MAC.h b/libdevcrypto/SHA3MAC.h
index 4a49f95f1..4b2d06eac 100644
--- a/libdevcrypto/SHA3MAC.h
+++ b/libdevcrypto/SHA3MAC.h
@@ -1,16 +1,16 @@
/*
This file is part of cpp-ethereum.
-
+
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
cpp-ethereum is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with cpp-ethereum. If not, see .
*/
@@ -18,7 +18,7 @@
* @author Alex Leverington
* @date 2014
*
- * Ethereum-specific data structures & algorithms.
+ * SHA3 MAC
*/
#pragma once