Debian Codegraph @

src/ntproba/hashToPwd.h

raw symbols SCIP
1 /*
2 *
3 * Ophcrack is a Lanmanager/NTLM hash cracker based on the faster time-memory
4 * trade-off using rainbow tables.
5 *
6 * Created with the help of: Maxime Mueller, Luca Wullschleger, Claude
7 * Hochreutiner, Andreas Huber and Etienne Dysli.
8 *
9 * Copyright (c) 2013 Philippe Oechslin, Cedric Tissieres,
10 * Bertrand Mesot, Pierre Lestringant
11 *
12 * Ophcrack is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * Ophcrack is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with Ophcrack; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 * This program is released under the GPL with the additional exemption
27 * that compiling, linking, and/or using OpenSSL is allowed.
28 *
29 *
30 *
31 *
32 */
33 /* WARNING: this file is a NOT copy from implCPU/v6 */
34
35 #ifndef HASHTOPWD_H
36 #define HASHTOPWD_H
37
38 #include <stdint.h>
39
40 #include "pattern.h"
41
42 #define PWD_UTF_SIZE 32
43
44 uint64_t getPatternFirstRound(patternArray* array, uint64_t index, unsigned int* patIndex);
45 unsigned int selectCharacterUTFFirstRound(markovDynProgWrapper* mdpw, markovImprobaStruct* mis, uint64_t patternDescriptor, uint64_t patternLength, uint64_t subIndex, char* result);
46 unsigned int selectCharacterUTF(markovDynProgWrapper* mdpw, markovImprobaStruct* mis, uint64_t patternDescriptor, uint64_t patternLength, uint64_t biasedCoin, uint64_t fairDice, char* result);
47
48 char checkFoundPwd(char* pwdUTF, unsigned int taille, unsigned int* hash, char* pwd);
49 uint64_t hashToIndex(patternArray* array, markovDynProgWrapper* mdpw, markovImprobaStruct* mis, unsigned int* hashsrc, const unsigned int startC, const unsigned int endC, const unsigned int threshold, const unsigned int currentTable, const unsigned int chainLength);
50 unsigned int indexToPwdUTF(patternArray* array, markovDynProgWrapper* mdpw, markovImprobaStruct* mis, const uint64_t start, const unsigned int threshold, const unsigned int endC, const unsigned int currentTable, const unsigned int chainLength, char* pwdUTF);
51 void hashNTH(char* plainText, unsigned char* hash);
52
53 #endif