Remove remainings of of sha512+scrypt key derivation
authorMASM fan <masmfan@gmail.com>
Sat, 24 Jan 2015 01:57:27 +0000 (17:57 -0800)
committerMASM fan <masmfan@gmail.com>
Sat, 24 Jan 2015 01:57:27 +0000 (17:57 -0800)
src/crypter.h
src/init.cpp
src/main.h
src/wallet.cpp

index 68b8803..bddcdfd 100644 (file)
@@ -56,26 +56,6 @@ public:
         nDerivationMethod = 1;
         vchOtherDerivationParameters = std::vector<unsigned char>(0);
     }
-
-    CMasterKey(unsigned int nDerivationMethodIndex)
-    {
-        switch (nDerivationMethodIndex)
-        {
-            case 0: // sha512
-            default:
-                nDeriveIterations = 25000;
-                nDerivationMethod = 0;
-                vchOtherDerivationParameters = std::vector<unsigned char>(0);
-            break;
-
-            case 1: // scrypt+sha512
-                nDeriveIterations = 10000;
-                nDerivationMethod = 1;
-                vchOtherDerivationParameters = std::vector<unsigned char>(0);
-            break;
-        }
-    }
-
 };
 
 typedef std::vector<unsigned char, secure_allocator<unsigned char> > CKeyingMaterial;
index 3e55c3c..34cb698 100644 (file)
@@ -31,7 +31,6 @@ CClientUIInterface uiInterface;
 std::string strWalletFileName;
 bool fConfChange;
 unsigned int nNodeLifespan;
-unsigned int nDerivationMethodIndex;
 unsigned int nMinerSleep;
 bool fUseFastIndex;
 bool fUseFastStakeMiner;
@@ -398,8 +397,6 @@ bool AppInit2()
         CheckpointsMode = Checkpoints::PERMISSIVE;
     }
 
-    nDerivationMethodIndex = 0;
-
     fTestNet = GetBoolArg("-testnet");
     if (fTestNet) {
         SoftSetBoolArg("-irc", true);
index 692c6b0..8ee3d31 100644 (file)
@@ -93,7 +93,6 @@ extern std::map<uint256, CBlock*> mapOrphanBlocks;
 extern int64_t nTransactionFee;
 extern int64_t nMinimumInputValue;
 extern bool fUseFastIndex;
-extern unsigned int nDerivationMethodIndex;
 extern int nScriptCheckThreads;
 extern const uint256 entropyStore[38];
 
index dc609b8..67a1859 100644 (file)
@@ -306,7 +306,7 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
     vMasterKey.resize(WALLET_CRYPTO_KEY_SIZE);
     RAND_bytes(&vMasterKey[0], WALLET_CRYPTO_KEY_SIZE);
 
-    CMasterKey kMasterKey(nDerivationMethodIndex);
+    CMasterKey kMasterKey;
 
     RandAddSeedPerfmon();
     kMasterKey.vchSalt.resize(WALLET_CRYPTO_SALT_SIZE);