From e376c6f6a989d99d873918b349405302b62403a5 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 16 Sep 2013 13:57:57 -0400 Subject: New crypto integrated -- going to be testing new identity address generation algo a bit more before finalizing. --- node/Identity.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'node/Identity.cpp') 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 #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) { -- cgit v1.2.3