2 * rcracki_mt is a multithreaded implementation and fork of the original
5 * Copyright 2009, 2010 Daniƫl Niggebrugge <niggebrugge@fox-it.com>
6 * Copyright 2009, 2010 James Nobis <frt@quelrod.net>
8 * This file is part of rcracki_mt.
10 * rcracki_mt is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 2 of the License, or
13 * (at your option) any later version.
15 * rcracki_mt is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with rcracki_mt. If not, see <http://www.gnu.org/licenses/>.
28 #include "ChainWalkContext.h"
31 //#include <process.h>
37 unsigned char* t_TargetHash;
39 int t_nRainbowChainLen;
40 CChainWalkContext t_cwc;
41 vector<uint64> t_vStartPosIndexE;
44 uint64* t_pStartPosIndexE;
46 bool falseAlarmChecker;
47 bool falseAlarmCheckerO;
48 vector<RainbowChain *> t_pChainsFound;
49 vector<RainbowChainO *> t_pChainsFoundO;
50 vector<int> t_nGuessedPoss;
51 unsigned char* t_pHash;
53 int t_nChainWalkStepDueToFalseAlarm;
60 rcrackiThread(unsigned char* TargetHash, int thread_id, int nRainbowChainLen, int thread_count, uint64* pStartPosIndexE);
61 rcrackiThread(unsigned char* pHash, bool oldFormat = false);
65 //void SetWork(unsigned char* TargetHash, int nPos, int nRainbowChainLen);
66 //static unsigned __stdcall rcrackiThread::rcrackiThreadStaticEntryPoint(void * pThis);
67 static void * rcrackiThreadStaticEntryPointPthread(void * pThis);
69 int GetChainWalkStep();
70 uint64 GetIndex(int nPos);
72 void AddAlarmCheck(RainbowChain* pChain, int nGuessedPos);
73 void AddAlarmCheckO(RainbowChainO* pChain, int nGuessedPos);
74 int GetChainWalkStepDueToFalseAlarm();
81 void rcrackiThreadEntryPoint();