summaryrefslogtreecommitdiff
path: root/node/Identity.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-09-16 13:57:57 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-09-16 13:57:57 -0400
commite376c6f6a989d99d873918b349405302b62403a5 (patch)
tree446962e3a4d17a6d6aaa2976c2da156f5a5e2a03 /node/Identity.cpp
parentceb024ab03a114c8dadbbd393032231069981c45 (diff)
downloadinfinitytier-e376c6f6a989d99d873918b349405302b62403a5.tar.gz
infinitytier-e376c6f6a989d99d873918b349405302b62403a5.zip
New crypto integrated -- going to be testing new identity address generation algo a bit more before finalizing.
Diffstat (limited to 'node/Identity.cpp')
-rw-r--r--node/Identity.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/node/Identity.cpp b/node/Identity.cpp
index 5a752e85..67892232 100644
--- a/node/Identity.cpp
+++ b/node/Identity.cpp
@@ -31,6 +31,7 @@
#include <stdint.h>
#include "Identity.hpp"
+#include "SHA512.hpp"
namespace ZeroTier {
@@ -76,7 +77,7 @@ std::string Identity::toString(bool includePrivate) const
r.append(Utils::hex(_signature.data,_signature.size()));
if ((_privateKey)&&(includePrivate)) {
r.push_back(':');
- r.append(Utils::hex(_privateKey.data,_privateKey.size()));
+ r.append(Utils::hex(_privateKey->data,_privateKey->size()));
}
return r;
@@ -129,8 +130,8 @@ bool Identity::fromString(const char *str)
// These are fixed parameters and can't be changed without a new
// identity type.
-#define ZT_IDENTITY_DERIVEADDRESS_DIGESTS 540672
-#define ZT_IDENTITY_DERIVEADDRESS_ROUNDS 4
+#define ZT_IDENTITY_DERIVEADDRESS_DIGESTS 2048
+#define ZT_IDENTITY_DERIVEADDRESS_ROUNDS 8
Address Identity::deriveAddress(const void *keyBytes,unsigned int keyLen)
{