Move Segher's hashing/crypto code from the Dolphin project to Common.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4857 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
48e3f0e17f
commit
9d14042a0c
|
@ -548,6 +548,38 @@
|
|||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Crypto"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Src\Crypto\bn.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\Crypto\ec.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\Crypto\md5.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\Crypto\md5.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\Crypto\sha1.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\Crypto\sha1.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\Crypto\tools.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\Src\ABI.cpp"
|
||||
>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "Common.h"
|
||||
#include "../Common.h"
|
||||
#include "tools.h"
|
||||
|
||||
/*static void bn_print(char *name, u8 *a, u32 n)
|
|
@ -4,10 +4,11 @@
|
|||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "Common.h"
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "../Common.h"
|
||||
#include "tools.h"
|
||||
#include "time.h"
|
||||
#include "stdlib.h"
|
||||
// y**2 + x*y = x**3 + x + b
|
||||
static u8 ec_b[30] =
|
||||
{0x00,0x66,0x64,0x7e,0xde,0x6c,0x33,0x2c,0x7f,0x8c,0x09,0x23,0xbb,0x58,0x21
|
|
@ -39,6 +39,10 @@ files = [
|
|||
"Thread.cpp",
|
||||
"x64Emitter.cpp",
|
||||
"x64Analyzer.cpp",
|
||||
"Crypto/bn.cpp",
|
||||
"Crypto/ec.cpp",
|
||||
"Crypto/md5.cpp",
|
||||
"Crypto/sha1.cpp",
|
||||
]
|
||||
|
||||
if sys.platform == 'win32':
|
||||
|
|
|
@ -1542,38 +1542,6 @@
|
|||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Crypto"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Src\MemoryCards\Crypto\bn.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\MemoryCards\Crypto\ec.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\MemoryCards\Crypto\md5.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\MemoryCards\Crypto\md5.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\MemoryCards\Crypto\sha1.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\MemoryCards\Crypto\sha1.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\MemoryCards\Crypto\tools.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\src\main.cpp"
|
||||
>
|
||||
|
|
|
@ -16,14 +16,11 @@
|
|||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
// Based off of tachtig/twintig http://git.infradead.org/?p=users/segher/wii.git
|
||||
// Copyright 2007,2008 Segher Boessenkool <segher@kernel.crashing.org>
|
||||
// Licensed under the terms of the GNU GPL, version 2
|
||||
// Copyright 2007,2008 Segher Boessenkool <segher@kernel.crashing.org>
|
||||
// Licensed under the terms of the GNU GPL, version 2
|
||||
// http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
|
||||
|
||||
|
||||
#include "WiiSaveCrypted.h"
|
||||
#include "FileUtil.h"
|
||||
|
||||
#include "FileUtil.h"
|
||||
#include "MathUtil.h"
|
||||
|
||||
|
@ -31,9 +28,9 @@ u8 SD_IV[0x10] = {0x21, 0x67, 0x12, 0xE6, 0xAA, 0x1F, 0x68, 0x9F,
|
|||
0x95, 0xC5, 0xA2, 0x23, 0x24, 0xDC, 0x6A, 0x98};
|
||||
const u8 SDKey[16] = {0xAB, 0x01, 0xB9, 0xD8, 0xE1, 0x62, 0x2B, 0x08,
|
||||
0xAF, 0xBA, 0xD8, 0x4D, 0xBF, 0xC2, 0xA5, 0x5D};
|
||||
|
||||
u8 MD5_BLANKER[0x10] = {0x0E, 0x65, 0x37, 0x81, 0x99, 0xBE, 0x45, 0x17,
|
||||
0xAB, 0x06, 0xEC, 0x22, 0x45, 0x1A, 0x57, 0x93};
|
||||
|
||||
CWiiSaveCrypted::CWiiSaveCrypted(const char* FileName, u64 title)
|
||||
: _saveGameTitle(title)
|
||||
{
|
||||
|
|
|
@ -37,10 +37,6 @@ if wxenv['HAVE_WX']:
|
|||
'stdafx.cpp',
|
||||
'WxUtils.cpp',
|
||||
'MemoryCards/WiiSaveCrypted.cpp',
|
||||
'MemoryCards/Crypto/bn.cpp',
|
||||
'MemoryCards/Crypto/ec.cpp',
|
||||
'MemoryCards/Crypto/md5.cpp',
|
||||
'MemoryCards/Crypto/sha1.cpp',
|
||||
]
|
||||
|
||||
CPPDEFINES = [
|
||||
|
|
Loading…
Reference in New Issue