summaryrefslogtreecommitdiff
path: root/node/C25519.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-10-05 06:00:47 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-10-05 06:00:47 -0400
commitb0187f44720fb675b99e6b6e57b660c6dfe8e464 (patch)
treee809178143d5b554f97ed6bf1df9254a3cab17e9 /node/C25519.hpp
parent588a47be893cf8b3b720bb41fac3bc0b75573e26 (diff)
downloadinfinitytier-b0187f44720fb675b99e6b6e57b660c6dfe8e464.tar.gz
infinitytier-b0187f44720fb675b99e6b6e57b660c6dfe8e464.zip
Hashcash-based identity, work in progress... committing to test speed on other boxes.
Diffstat (limited to 'node/C25519.hpp')
-rw-r--r--node/C25519.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/node/C25519.hpp b/node/C25519.hpp
index 8d6a58ba..79edfa06 100644
--- a/node/C25519.hpp
+++ b/node/C25519.hpp
@@ -101,7 +101,8 @@ public:
Utils::getSecureRandom(priv,kp.priv.size());
_calcPubED(kp); // do Ed25519 key -- bytes 32-63 of pub and priv
do {
- ++*((uint64_t *)priv);
+ ++(((uint64_t *)priv)[1]);
+ --(((uint64_t *)priv)[2]);
_calcPubDH(kp); // keep regenerating bytes 0-31 until satisfied
} while (!cond(kp));
return kp;