mirror of https://github.com/AxioDL/metaforce.git
fully-integrated blowfish
This commit is contained in:
parent
e07ed779d6
commit
30ac6e7d8c
|
@ -7,8 +7,11 @@ unix:!macx:LIBS += -std=c++11 -stdlib=libc++ -lc++abi
|
|||
|
||||
INCLUDEPATH += ../include
|
||||
|
||||
LIBPATH += $$OUT_PWD/../lib $$OUT_PWD/../extern/sqlite3
|
||||
LIBS += -lhecl -lsqlite3
|
||||
LIBPATH += $$OUT_PWD/../lib \
|
||||
$$OUT_PWD/../extern/sqlite3 \
|
||||
$$OUT_PWD/../extern/blowfish
|
||||
|
||||
LIBS += -lhecl -lsqlite3 -lblowfish
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/main.cpp
|
||||
|
|
|
@ -1,228 +0,0 @@
|
|||
#ifdef little_endian /* Eg: Intel */
|
||||
#include <dos.h>
|
||||
#include <graphics.h>
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef little_endian /* Eg: Intel */
|
||||
#include <alloc.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef little_endian /* Eg: Intel */
|
||||
#include <dir.h>
|
||||
#include <bios.h>
|
||||
#endif
|
||||
|
||||
#ifdef big_endian
|
||||
#include <Types.h>
|
||||
#endif
|
||||
|
||||
#include "Blowfish.h"
|
||||
|
||||
#define N 16
|
||||
#define noErr 0
|
||||
#define DATAERROR -1
|
||||
#define KEYBYTES 8
|
||||
#define subkeyfilename "Blowfish.dat"
|
||||
|
||||
unsigned long P[N + 2];
|
||||
unsigned long S[4][256];
|
||||
FILE* SubkeyFile;
|
||||
|
||||
short opensubkeyfile(void) /* read only */
|
||||
{
|
||||
short error;
|
||||
|
||||
error = noErr;
|
||||
|
||||
if((SubkeyFile = fopen(subkeyfilename,"rb")) == NULL) {
|
||||
error = DATAERROR;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
unsigned long F(unsigned long x)
|
||||
{
|
||||
unsigned short a;
|
||||
unsigned short b;
|
||||
unsigned short c;
|
||||
unsigned short d;
|
||||
unsigned long y;
|
||||
|
||||
d = x & 0x00FF;
|
||||
x >>= 8;
|
||||
c = x & 0x00FF;
|
||||
x >>= 8;
|
||||
b = x & 0x00FF;
|
||||
x >>= 8;
|
||||
a = x & 0x00FF;
|
||||
//y = ((S[0][a] + S[1][b]) ^ S[2][c]) + S[3][d];
|
||||
y = S[0][a] + S[1][b];
|
||||
y = y ^ S[2][c];
|
||||
y = y + S[3][d];
|
||||
|
||||
return y;
|
||||
}
|
||||
|
||||
void Blowfish_encipher(unsigned long *xl, unsigned long *xr)
|
||||
{
|
||||
unsigned long Xl;
|
||||
unsigned long Xr;
|
||||
unsigned long temp;
|
||||
short i;
|
||||
|
||||
Xl = *xl;
|
||||
Xr = *xr;
|
||||
|
||||
for (i = 0; i < N; ++i) {
|
||||
Xl = Xl ^ P[i];
|
||||
Xr = F(Xl) ^ Xr;
|
||||
|
||||
temp = Xl;
|
||||
Xl = Xr;
|
||||
Xr = temp;
|
||||
}
|
||||
|
||||
temp = Xl;
|
||||
Xl = Xr;
|
||||
Xr = temp;
|
||||
|
||||
Xr = Xr ^ P[N];
|
||||
Xl = Xl ^ P[N + 1];
|
||||
|
||||
*xl = Xl;
|
||||
*xr = Xr;
|
||||
}
|
||||
|
||||
void Blowfish_decipher(unsigned long *xl, unsigned long *xr)
|
||||
{
|
||||
unsigned long Xl;
|
||||
unsigned long Xr;
|
||||
unsigned long temp;
|
||||
short i;
|
||||
|
||||
Xl = *xl;
|
||||
Xr = *xr;
|
||||
|
||||
for (i = N + 1; i > 1; --i) {
|
||||
Xl = Xl ^ P[i];
|
||||
Xr = F(Xl) ^ Xr;
|
||||
|
||||
/* Exchange Xl and Xr */
|
||||
temp = Xl;
|
||||
Xl = Xr;
|
||||
Xr = temp;
|
||||
}
|
||||
|
||||
/* Exchange Xl and Xr */
|
||||
temp = Xl;
|
||||
Xl = Xr;
|
||||
Xr = temp;
|
||||
|
||||
Xr = Xr ^ P[1];
|
||||
Xl = Xl ^ P[0];
|
||||
|
||||
*xl = Xl;
|
||||
*xr = Xr;
|
||||
}
|
||||
|
||||
short InitializeBlowfish(char key[], short keybytes)
|
||||
{
|
||||
short i;
|
||||
short j;
|
||||
short k;
|
||||
short error;
|
||||
short numread;
|
||||
unsigned long data;
|
||||
unsigned long datal;
|
||||
unsigned long datar;
|
||||
|
||||
/* First, open the file containing the array initialization data */
|
||||
error = opensubkeyfile();
|
||||
if (error == noErr) {
|
||||
for (i = 0; i < N + 2; ++i) {
|
||||
numread = fread(&data, 4, 1, SubkeyFile);
|
||||
#ifdef little_endian /* Eg: Intel We want to process things in byte */
|
||||
/* order, not as rearranged in a longword */
|
||||
data = ((data & 0xFF000000) >> 24) |
|
||||
((data & 0x00FF0000) >> 8) |
|
||||
((data & 0x0000FF00) << 8) |
|
||||
((data & 0x000000FF) << 24);
|
||||
#endif
|
||||
|
||||
if (numread != 1) {
|
||||
return DATAERROR;
|
||||
} else {
|
||||
P[i] = data;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 4; ++i) {
|
||||
for (j = 0; j < 256; ++j) {
|
||||
numread = fread(&data, 4, 1, SubkeyFile);
|
||||
|
||||
#ifdef little_endian /* Eg: Intel We want to process things in byte */
|
||||
/* order, not as rearranged in a longword */
|
||||
data = ((data & 0xFF000000) >> 24) |
|
||||
((data & 0x00FF0000) >> 8) |
|
||||
((data & 0x0000FF00) << 8) |
|
||||
((data & 0x000000FF) << 24);
|
||||
#endif
|
||||
|
||||
if (numread != 1) {
|
||||
return DATAERROR;
|
||||
} else {
|
||||
S[i][j] = data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fclose(SubkeyFile);
|
||||
|
||||
j = 0;
|
||||
for (i = 0; i < N + 2; ++i) {
|
||||
data = 0x00000000;
|
||||
for (k = 0; k < 4; ++k) {
|
||||
data = (data << 8) | key[j];
|
||||
j = j + 1;
|
||||
if (j >= keybytes) {
|
||||
j = 0;
|
||||
}
|
||||
}
|
||||
P[i] = P[i] ^ data;
|
||||
}
|
||||
|
||||
datal = 0x00000000;
|
||||
datar = 0x00000000;
|
||||
|
||||
for (i = 0; i < N + 2; i += 2) {
|
||||
Blowfish_encipher(&datal, &datar);
|
||||
|
||||
P[i] = datal;
|
||||
P[i + 1] = datar;
|
||||
}
|
||||
|
||||
for (i = 0; i < 4; ++i) {
|
||||
for (j = 0; j < 256; j += 2) {
|
||||
|
||||
Blowfish_encipher(&datal, &datar);
|
||||
|
||||
S[i][j] = datal;
|
||||
S[i][j + 1] = datar;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
printf("Unable to open subkey initialization file : %d\n", error);
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
|
@ -1,505 +0,0 @@
|
|||
#include <stdlib.h>
|
||||
size_t BLOWFISH_DAT_SZ = 5006;
|
||||
char BLOWFISH_DAT[] = {
|
||||
0x24,0x3F,0x6A,0x88,0x85,0xA3,0x08,0xD3,0x13,0x19,
|
||||
0x8A,0x2E,0x03,0x70,0x73,0x44,0xA4,0x09,0x38,0x22,
|
||||
0x29,0x9F,0x31,0xD0,0x08,0x2E,0xFA,0x98,0xEC,0x4E,
|
||||
0x6C,0x89,0x45,0x28,0x21,0xE6,0x38,0xD0,0x13,0x77,
|
||||
0xBE,0x54,0x66,0xCF,0x34,0xE9,0x0C,0x6C,0xC0,0xAC,
|
||||
0x29,0xB7,0xC9,0x7C,0x50,0xDD,0x3F,0x84,0xD5,0xB5,
|
||||
0xB5,0x47,0x09,0x17,0x92,0x16,0xD5,0xD9,0x89,0x79,
|
||||
0xFB,0x1B,0xD1,0x31,0x0B,0xA6,0x98,0xDF,0xB5,0xAC,
|
||||
0x2F,0xFD,0x72,0xDB,0xD0,0x1A,0xDF,0xB7,0xB8,0xE1,
|
||||
0xAF,0xED,0x6A,0x26,0x7E,0x96,0xBA,0x7C,0x90,0x45,
|
||||
0xF1,0x2C,0x7F,0x99,0x24,0xA1,0x99,0x47,0xB3,0x91,
|
||||
0x6C,0xF7,0x08,0x01,0xF2,0xE2,0x85,0x8E,0xFC,0x16,
|
||||
0x63,0x69,0x20,0xD8,0x71,0x57,0x4E,0x69,0xA4,0x58,
|
||||
0xFE,0xA3,0xF4,0x93,0x3D,0x7E,0x0D,0x95,0x74,0x8F,
|
||||
0x72,0x8E,0xB6,0x58,0x71,0x8B,0xCD,0x58,0x82,0x15,
|
||||
0x4A,0xEE,0x7B,0x54,0xA4,0x1D,0xC2,0x5A,0x59,0xB5,
|
||||
0x9C,0x30,0xD5,0x39,0x2A,0xF2,0x60,0x13,0xC5,0xD1,
|
||||
0xB0,0x23,0x28,0x60,0x85,0xF0,0xCA,0x41,0x79,0x18,
|
||||
0xB8,0xDB,0x38,0xEF,0x8E,0x79,0xDC,0xB0,0x60,0x3A,
|
||||
0x18,0x0E,0x6C,0x9E,0x0E,0x8B,0xB0,0x1E,0x8A,0x3E,
|
||||
0xD7,0x15,0x77,0xC1,0xBD,0x31,0x4B,0x27,0x78,0xAF,
|
||||
0x2F,0xDA,0x55,0x60,0x5C,0x60,0xE6,0x55,0x25,0xF3,
|
||||
0xAA,0x55,0xAB,0x94,0x57,0x48,0x98,0x62,0x63,0xE8,
|
||||
0x14,0x40,0x55,0xCA,0x39,0x6A,0x2A,0xAB,0x10,0xB6,
|
||||
0xB4,0xCC,0x5C,0x34,0x11,0x41,0xE8,0xCE,0xA1,0x54,
|
||||
0x86,0xAF,0x7C,0x72,0xE9,0x93,0xB3,0xEE,0x14,0x11,
|
||||
0x63,0x6F,0xBC,0x2A,0x2B,0xA9,0xC5,0x5D,0x74,0x18,
|
||||
0x31,0xF6,0xCE,0x5C,0x3E,0x16,0x9B,0x87,0x93,0x1E,
|
||||
0xAF,0xD6,0xBA,0x33,0x6C,0x24,0xCF,0x5C,0x7A,0x32,
|
||||
0x53,0x81,0x28,0x95,0x86,0x77,0x3B,0x8F,0x48,0x98,
|
||||
0x6B,0x4B,0xB9,0xAF,0xC4,0xBF,0xE8,0x1B,0x66,0x28,
|
||||
0x21,0x93,0x61,0xD8,0x09,0xCC,0xFB,0x21,0xA9,0x91,
|
||||
0x48,0x7C,0xAC,0x60,0x5D,0xEC,0x80,0x32,0xEF,0x84,
|
||||
0x5D,0x5D,0xE9,0x85,0x75,0xB1,0xDC,0x26,0x23,0x02,
|
||||
0xEB,0x65,0x1B,0x88,0x23,0x89,0x3E,0x81,0xD3,0x96,
|
||||
0xAC,0xC5,0x0F,0x6D,0x6F,0xF3,0x83,0xF4,0x42,0x39,
|
||||
0x2E,0x0B,0x44,0x82,0xA4,0x84,0x20,0x04,0x69,0xC8,
|
||||
0xF0,0x4A,0x9E,0x1F,0x9B,0x5E,0x21,0xC6,0x68,0x42,
|
||||
0xF6,0xE9,0x6C,0x9A,0x67,0x0C,0x9C,0x61,0xAB,0xD3,
|
||||
0x88,0xF0,0x6A,0x51,0xA0,0xD2,0xD8,0x54,0x2F,0x68,
|
||||
0x96,0x0F,0xA7,0x28,0xAB,0x51,0x33,0xA3,0x6E,0xEF,
|
||||
0x0B,0x6C,0x13,0x7A,0x3B,0xE4,0xBA,0x3B,0xF0,0x50,
|
||||
0x7E,0xFB,0x2A,0x98,0xA1,0xF1,0x65,0x1D,0x39,0xAF,
|
||||
0x01,0x76,0x66,0xCA,0x59,0x3E,0x82,0x43,0x0E,0x88,
|
||||
0x8C,0xEE,0x86,0x19,0x45,0x6F,0x9F,0xB4,0x7D,0x84,
|
||||
0xA5,0xC3,0x3B,0x8B,0x5E,0xBE,0xE0,0x6F,0x75,0xD8,
|
||||
0x85,0xC1,0x20,0x73,0x40,0x1A,0x44,0x9F,0x56,0xC1,
|
||||
0x6A,0xA6,0x4E,0xD3,0xAA,0x62,0x36,0x3F,0x77,0x06,
|
||||
0x1B,0xFE,0xDF,0x72,0x42,0x9B,0x02,0x3D,0x37,0xD0,
|
||||
0xD7,0x24,0xD0,0x0A,0x12,0x48,0xDB,0x0F,0xEA,0xD3,
|
||||
0x49,0xF1,0xC0,0x9B,0x07,0x53,0x72,0xC9,0x80,0x99,
|
||||
0x1B,0x7B,0x25,0xD4,0x79,0xD8,0xF6,0xE8,0xDE,0xF7,
|
||||
0xE3,0xFE,0x50,0x1A,0xB6,0x79,0x4C,0x3B,0x97,0x6C,
|
||||
0xE0,0xBD,0x04,0xC0,0x06,0xBA,0xC1,0xA9,0x4F,0xB6,
|
||||
0x40,0x9F,0x60,0xC4,0x5E,0x5C,0x9E,0xC2,0x19,0x6A,
|
||||
0x24,0x63,0x68,0xFB,0x6F,0xAF,0x3E,0x6C,0x53,0xB5,
|
||||
0x13,0x39,0xB2,0xEB,0x3B,0x52,0xEC,0x6F,0x6D,0xFC,
|
||||
0x51,0x1F,0x9B,0x30,0x95,0x2C,0xCC,0x81,0x45,0x44,
|
||||
0xAF,0x5E,0xBD,0x09,0xBE,0xE3,0xD0,0x04,0xDE,0x33,
|
||||
0x4A,0xFD,0x66,0x0F,0x28,0x07,0x19,0x2E,0x4B,0xB3,
|
||||
0xC0,0xCB,0xA8,0x57,0x45,0xC8,0x74,0x0F,0xD2,0x0B,
|
||||
0x5F,0x39,0xB9,0xD3,0xFB,0xDB,0x55,0x79,0xC0,0xBD,
|
||||
0x1A,0x60,0x32,0x0A,0xD6,0xA1,0x00,0xC6,0x40,0x2C,
|
||||
0x72,0x79,0x67,0x9F,0x25,0xFE,0xFB,0x1F,0xA3,0xCC,
|
||||
0x8E,0xA5,0xE9,0xF8,0xDB,0x32,0x22,0xF8,0x3C,0x75,
|
||||
0x16,0xDF,0xFD,0x61,0x6B,0x15,0x2F,0x50,0x1E,0xC8,
|
||||
0xAD,0x05,0x52,0xAB,0x32,0x3D,0xB5,0xFA,0xFD,0x23,
|
||||
0x87,0x60,0x53,0x31,0x7B,0x48,0x3E,0x00,0xDF,0x82,
|
||||
0x9E,0x5C,0x57,0xBB,0xCA,0x6F,0x8C,0xA0,0x1A,0x87,
|
||||
0x56,0x2E,0xDF,0x17,0x69,0xDB,0xD5,0x42,0xA8,0xF6,
|
||||
0x28,0x7E,0xFF,0xC3,0xAC,0x67,0x32,0xC6,0x8C,0x4F,
|
||||
0x55,0x73,0x69,0x5B,0x27,0xB0,0xBB,0xCA,0x58,0xC8,
|
||||
0xE1,0xFF,0xA3,0x5D,0xB8,0xF0,0x11,0xA0,0x10,0xFA,
|
||||
0x3D,0x98,0xFD,0x21,0x83,0xB8,0x4A,0xFC,0xB5,0x6C,
|
||||
0x2D,0xD1,0xD3,0x5B,0x9A,0x53,0xE4,0x79,0xB6,0xF8,
|
||||
0x45,0x65,0xD2,0x8E,0x49,0xBC,0x4B,0xFB,0x97,0x90,
|
||||
0xE1,0xDD,0xF2,0xDA,0xA4,0xCB,0x7E,0x33,0x62,0xFB,
|
||||
0x13,0x41,0xCE,0xE4,0xC6,0xE8,0xEF,0x20,0xCA,0xDA,
|
||||
0x36,0x77,0x4C,0x01,0xD0,0x7E,0x9E,0xFE,0x2B,0xF1,
|
||||
0x1F,0xB4,0x95,0xDB,0xDA,0x4D,0xAE,0x90,0x91,0x98,
|
||||
0xEA,0xAD,0x8E,0x71,0x6B,0x93,0xD5,0xA0,0xD0,0x8E,
|
||||
0xD1,0xD0,0xAF,0xC7,0x25,0xE0,0x8E,0x3C,0x5B,0x2F,
|
||||
0x8E,0x75,0x94,0xB7,0x8F,0xF6,0xE2,0xFB,0xF2,0x12,
|
||||
0x2B,0x64,0x88,0x88,0xB8,0x12,0x90,0x0D,0xF0,0x1C,
|
||||
0x4F,0xAD,0x5E,0xA0,0x68,0x8F,0xC3,0x1C,0xD1,0xCF,
|
||||
0xF1,0x91,0xB3,0xA8,0xC1,0xAD,0x2F,0x2F,0x22,0x18,
|
||||
0xBE,0x0E,0x17,0x77,0xEA,0x75,0x2D,0xFE,0x8B,0x02,
|
||||
0x1F,0xA1,0xE5,0xA0,0xCC,0x0F,0xB5,0x6F,0x74,0xE8,
|
||||
0x18,0xAC,0xF3,0xD6,0xCE,0x89,0xE2,0x99,0xB4,0xA8,
|
||||
0x4F,0xE0,0xFD,0x13,0xE0,0xB7,0x7C,0xC4,0x3B,0x81,
|
||||
0xD2,0xAD,0xA8,0xD9,0x16,0x5F,0xA2,0x66,0x80,0x95,
|
||||
0x77,0x05,0x93,0xCC,0x73,0x14,0x21,0x1A,0x14,0x77,
|
||||
0xE6,0xAD,0x20,0x65,0x77,0xB5,0xFA,0x86,0xC7,0x54,
|
||||
0x42,0xF5,0xFB,0x9D,0x35,0xCF,0xEB,0xCD,0xAF,0x0C,
|
||||
0x7B,0x3E,0x89,0xA0,0xD6,0x41,0x1B,0xD3,0xAE,0x1E,
|
||||
0x7E,0x49,0x00,0x25,0x0E,0x2D,0x20,0x71,0xB3,0x5E,
|
||||
0x22,0x68,0x00,0xBB,0x57,0xB8,0xE0,0xAF,0x24,0x64,
|
||||
0x36,0x9B,0xF0,0x09,0xB9,0x1E,0x55,0x63,0x91,0x1D,
|
||||
0x59,0xDF,0xA6,0xAA,0x78,0xC1,0x43,0x89,0xD9,0x5A,
|
||||
0x53,0x7F,0x20,0x7D,0x5B,0xA2,0x02,0xE5,0xB9,0xC5,
|
||||
0x83,0x26,0x03,0x76,0x62,0x95,0xCF,0xA9,0x11,0xC8,
|
||||
0x19,0x68,0x4E,0x73,0x4A,0x41,0xB3,0x47,0x2D,0xCA,
|
||||
0x7B,0x14,0xA9,0x4A,0x1B,0x51,0x00,0x52,0x9A,0x53,
|
||||
0x29,0x15,0xD6,0x0F,0x57,0x3F,0xBC,0x9B,0xC6,0xE4,
|
||||
0x2B,0x60,0xA4,0x76,0x81,0xE6,0x74,0x00,0x08,0xBA,
|
||||
0x6F,0xB5,0x57,0x1B,0xE9,0x1F,0xF2,0x96,0xEC,0x6B,
|
||||
0x2A,0x0D,0xD9,0x15,0xB6,0x63,0x65,0x21,0xE7,0xB9,
|
||||
0xF9,0xB6,0xFF,0x34,0x05,0x2E,0xC5,0x85,0x56,0x64,
|
||||
0x53,0xB0,0x2D,0x5D,0xA9,0x9F,0x8F,0xA1,0x08,0xBA,
|
||||
0x47,0x99,0x6E,0x85,0x07,0x6A,0x4B,0x7A,0x70,0xE9,
|
||||
0xB5,0xB3,0x29,0x44,0xDB,0x75,0x09,0x2E,0xC4,0x19,
|
||||
0x26,0x23,0xAD,0x6E,0xA6,0xB0,0x49,0xA7,0xDF,0x7D,
|
||||
0x9C,0xEE,0x60,0xB8,0x8F,0xED,0xB2,0x66,0xEC,0xAA,
|
||||
0x8C,0x71,0x69,0x9A,0x17,0xFF,0x56,0x64,0x52,0x6C,
|
||||
0xC2,0xB1,0x9E,0xE1,0x19,0x36,0x02,0xA5,0x75,0x09,
|
||||
0x4C,0x29,0xA0,0x59,0x13,0x40,0xE4,0x18,0x3A,0x3E,
|
||||
0x3F,0x54,0x98,0x9A,0x5B,0x42,0x9D,0x65,0x6B,0x8F,
|
||||
0xE4,0xD6,0x99,0xF7,0x3F,0xD6,0xA1,0xD2,0x9C,0x07,
|
||||
0xEF,0xE8,0x30,0xF5,0x4D,0x2D,0x38,0xE6,0xF0,0x25,
|
||||
0x5D,0xC1,0x4C,0xDD,0x20,0x86,0x84,0x70,0xEB,0x26,
|
||||
0x63,0x82,0xE9,0xC6,0x02,0x1E,0xCC,0x5E,0x09,0x68,
|
||||
0x6B,0x3F,0x3E,0xBA,0xEF,0xC9,0x3C,0x97,0x18,0x14,
|
||||
0x6B,0x6A,0x70,0xA1,0x68,0x7F,0x35,0x84,0x52,0xA0,
|
||||
0xE2,0x86,0xB7,0x9C,0x53,0x05,0xAA,0x50,0x07,0x37,
|
||||
0x3E,0x07,0x84,0x1C,0x7F,0xDE,0xAE,0x5C,0x8E,0x7D,
|
||||
0x44,0xEC,0x57,0x16,0xF2,0xB8,0xB0,0x3A,0xDA,0x37,
|
||||
0xF0,0x50,0x0C,0x0D,0xF0,0x1C,0x1F,0x04,0x02,0x00,
|
||||
0xB3,0xFF,0xAE,0x0C,0xF5,0x1A,0x3C,0xB5,0x74,0xB2,
|
||||
0x25,0x83,0x7A,0x58,0xDC,0x09,0x21,0xBD,0xD1,0x91,
|
||||
0x13,0xF9,0x7C,0xA9,0x2F,0xF6,0x94,0x32,0x47,0x73,
|
||||
0x22,0xF5,0x47,0x01,0x3A,0xE5,0xE5,0x81,0x37,0xC2,
|
||||
0xDA,0xDC,0xC8,0xB5,0x76,0x34,0x9A,0xF3,0xDD,0xA7,
|
||||
0xA9,0x44,0x61,0x46,0x0F,0xD0,0x03,0x0E,0xEC,0xC8,
|
||||
0xC7,0x3E,0xA4,0x75,0x1E,0x41,0xE2,0x38,0xCD,0x99,
|
||||
0x3B,0xEA,0x0E,0x2F,0x32,0x80,0xBB,0xA1,0x18,0x3E,
|
||||
0xB3,0x31,0x4E,0x54,0x8B,0x38,0x4F,0x6D,0xB9,0x08,
|
||||
0x6F,0x42,0x0D,0x03,0xF6,0x0A,0x04,0xBF,0x2C,0xB8,
|
||||
0x12,0x90,0x24,0x97,0x7C,0x79,0x56,0x79,0xB0,0x72,
|
||||
0xBC,0xAF,0x89,0xAF,0xDE,0x9A,0x77,0x1F,0xD9,0x93,
|
||||
0x08,0x10,0xB3,0x8B,0xAE,0x12,0xDC,0xCF,0x3F,0x2E,
|
||||
0x55,0x12,0x72,0x1F,0x2E,0x6B,0x71,0x24,0x50,0x1A,
|
||||
0xDD,0xE6,0x9F,0x84,0xCD,0x87,0x7A,0x58,0x47,0x18,
|
||||
0x74,0x08,0xDA,0x17,0xBC,0x9F,0x9A,0xBC,0xE9,0x4B,
|
||||
0x7D,0x8C,0xEC,0x7A,0xEC,0x3A,0xDB,0x85,0x1D,0xFA,
|
||||
0x63,0x09,0x43,0x66,0xC4,0x64,0xC3,0xD2,0xEF,0x1C,
|
||||
0x18,0x47,0x32,0x15,0xD9,0x08,0xDD,0x43,0x3B,0x37,
|
||||
0x24,0xC2,0xBA,0x16,0x12,0xA1,0x4D,0x43,0x2A,0x65,
|
||||
0xC4,0x51,0x50,0x94,0x00,0x02,0x13,0x3A,0xE4,0xDD,
|
||||
0x71,0xDF,0xF8,0x9E,0x10,0x31,0x4E,0x55,0x81,0xAC,
|
||||
0x77,0xD6,0x5F,0x11,0x19,0x9B,0x04,0x35,0x56,0xF1,
|
||||
0xD7,0xA3,0xC7,0x6B,0x3C,0x11,0x18,0x3B,0x59,0x24,
|
||||
0xA5,0x09,0xF2,0x8F,0xE6,0xED,0x97,0xF1,0xFB,0xFA,
|
||||
0x9E,0xBA,0xBF,0x2C,0x1E,0x15,0x3C,0x6E,0x86,0xE3,
|
||||
0x45,0x70,0xEA,0xE9,0x6F,0xB1,0x86,0x0E,0x5E,0x0A,
|
||||
0x5A,0x3E,0x2A,0xB3,0x77,0x1F,0xE7,0x1C,0x4E,0x3D,
|
||||
0x06,0xFA,0x29,0x65,0xDC,0xB9,0x99,0xE7,0x1D,0x0F,
|
||||
0x80,0x3E,0x89,0xD6,0x52,0x66,0xC8,0x25,0x2E,0x4C,
|
||||
0xC9,0x78,0x9C,0x10,0xB3,0x6A,0xC6,0x15,0x0E,0xBA,
|
||||
0x94,0xE2,0xEA,0x78,0xA5,0xFC,0x3C,0x53,0x1E,0x0A,
|
||||
0x2D,0xF4,0xF2,0xF7,0x4E,0xA7,0x36,0x1D,0x2B,0x3D,
|
||||
0x19,0x39,0x26,0x0F,0x19,0xC2,0x79,0x60,0x52,0x23,
|
||||
0xA7,0x08,0xF7,0x13,0x12,0xB6,0xEB,0xAD,0xFE,0x6E,
|
||||
0xEA,0xC3,0x1F,0x66,0xE3,0xBC,0x45,0x95,0xA6,0x7B,
|
||||
0xC8,0x83,0xB1,0x7F,0x37,0xD1,0x01,0x8C,0xFF,0x28,
|
||||
0xC3,0x32,0xDD,0xEF,0xBE,0x6C,0x5A,0xA5,0x65,0x58,
|
||||
0x21,0x85,0x68,0xAB,0x98,0x02,0xEE,0xCE,0xA5,0x0F,
|
||||
0xDB,0x2F,0x95,0x3B,0x2A,0xEF,0x7D,0xAD,0x5B,0x6E,
|
||||
0x2F,0x84,0x15,0x21,0xB6,0x28,0x29,0x07,0x61,0x70,
|
||||
0xEC,0xDD,0x47,0x75,0x61,0x9F,0x15,0x10,0x13,0xCC,
|
||||
0xA8,0x30,0xEB,0x61,0xBD,0x96,0x03,0x34,0xFE,0x1E,
|
||||
0xAA,0x03,0x63,0xCF,0xB5,0x73,0x5C,0x90,0x4C,0x70,
|
||||
0xA2,0x39,0xD5,0x9E,0x9E,0x0B,0xCB,0xAA,0xDE,0x14,
|
||||
0xEE,0xCC,0x86,0xBC,0x60,0x62,0x2C,0xA7,0x9C,0xAB,
|
||||
0x5C,0xAB,0xB2,0xF3,0x84,0x6E,0x64,0x8B,0x1E,0xAF,
|
||||
0x19,0xBD,0xF0,0xCA,0xA0,0x23,0x69,0xB9,0x65,0x5A,
|
||||
0xBB,0x50,0x40,0x68,0x5A,0x32,0x3C,0x2A,0xB4,0xB3,
|
||||
0x31,0x9E,0xE9,0xD5,0xC0,0x21,0xB8,0xF7,0x9B,0x54,
|
||||
0x0B,0x19,0x87,0x5F,0xA0,0x99,0x95,0xF7,0x99,0x7E,
|
||||
0x62,0x3D,0x7D,0xA8,0xF8,0x37,0x88,0x9A,0x97,0xE3,
|
||||
0x2D,0x77,0x11,0xED,0x93,0x5F,0x16,0x68,0x12,0x81,
|
||||
0x0E,0x35,0x88,0x29,0xC7,0xE6,0x1F,0xD6,0x96,0xDE,
|
||||
0xDF,0xA1,0x78,0x58,0xBA,0x99,0x57,0xF5,0x84,0xA5,
|
||||
0x1B,0x22,0x72,0x63,0x9B,0x83,0xC3,0xFF,0x1A,0xC2,
|
||||
0x46,0x96,0xCD,0xB3,0x0A,0xEB,0x53,0x2E,0x30,0x54,
|
||||
0x8F,0xD9,0x48,0xE4,0x6D,0xBC,0x31,0x28,0x58,0xEB,
|
||||
0xF2,0xEF,0x34,0xC6,0xFF,0xEA,0xFE,0x28,0xED,0x61,
|
||||
0xEE,0x7C,0x3C,0x73,0x5D,0x4A,0x14,0xD9,0xE8,0x64,
|
||||
0xB7,0xE3,0x42,0x10,0x5D,0x14,0x20,0x3E,0x13,0xE0,
|
||||
0x45,0xEE,0xE2,0xB6,0xA3,0xAA,0xAB,0xEA,0xDB,0x6C,
|
||||
0x4F,0x15,0xFA,0xCB,0x4F,0xD0,0xC7,0x42,0xF4,0x42,
|
||||
0xEF,0x6A,0xBB,0xB5,0x65,0x4F,0x3B,0x1D,0x41,0xCD,
|
||||
0x21,0x05,0xD8,0x1E,0x79,0x9E,0x86,0x85,0x4D,0xC7,
|
||||
0xE4,0x4B,0x47,0x6A,0x3D,0x81,0x62,0x50,0xCF,0x62,
|
||||
0xA1,0xF2,0x5B,0x8D,0x26,0x46,0xFC,0x88,0x83,0xA0,
|
||||
0xC1,0xC7,0xB6,0xA3,0x7F,0x15,0x24,0xC3,0x69,0xCB,
|
||||
0x74,0x92,0x47,0x84,0x8A,0x0B,0x56,0x92,0xB2,0x85,
|
||||
0x09,0x5B,0xBF,0x00,0xAD,0x19,0x48,0x9D,0x14,0x62,
|
||||
0xB1,0x74,0x23,0x82,0x0E,0x00,0x58,0x42,0x8D,0x2A,
|
||||
0x0C,0x55,0xF5,0xEA,0x1D,0xAD,0xF4,0x3E,0x23,0x3F,
|
||||
0x70,0x61,0x33,0x72,0xF0,0x92,0x8D,0x93,0x7E,0x41,
|
||||
0xD6,0x5F,0xEC,0xF1,0x6C,0x22,0x3B,0xDB,0x7C,0xDE,
|
||||
0x37,0x59,0xCB,0xEE,0x74,0x60,0x40,0x85,0xF2,0xA7,
|
||||
0xCE,0x77,0x32,0x6E,0xA6,0x07,0x80,0x84,0x19,0xF8,
|
||||
0x50,0x9E,0xE8,0xEF,0xD8,0x55,0x61,0xD9,0x97,0x35,
|
||||
0xA9,0x69,0xA7,0xAA,0xC5,0x0C,0x06,0xC2,0x5A,0x04,
|
||||
0xAB,0xFC,0x80,0x0B,0xCA,0xDC,0x9E,0x44,0x7A,0x2E,
|
||||
0xC3,0x45,0x34,0x84,0xFD,0xD5,0x67,0x05,0x0E,0x1E,
|
||||
0x9E,0xC9,0xDB,0x73,0xDB,0xD3,0x10,0x55,0x88,0xCD,
|
||||
0x67,0x5F,0xDA,0x79,0xE3,0x67,0x43,0x40,0xC5,0xC4,
|
||||
0x34,0x65,0x71,0x3E,0x38,0xD8,0x3D,0x28,0xF8,0x9E,
|
||||
0xF1,0x6D,0xFF,0x20,0x15,0x3E,0x21,0xE7,0x8F,0xB0,
|
||||
0x3D,0x4A,0xE6,0xE3,0x9F,0x2B,0xDB,0x83,0xAD,0xF7,
|
||||
0xE9,0x3D,0x5A,0x68,0x94,0x81,0x40,0xF7,0xF6,0x4C,
|
||||
0x26,0x1C,0x94,0x69,0x29,0x34,0x41,0x15,0x20,0xF7,
|
||||
0x76,0x02,0xD4,0xF7,0xBC,0xF4,0x6B,0x2E,0xD4,0xA2,
|
||||
0x00,0x68,0xD4,0x08,0x24,0x71,0x33,0x20,0xF4,0x6A,
|
||||
0x43,0xB7,0xD4,0xB7,0x50,0x00,0x61,0xAF,0x1E,0x39,
|
||||
0xF6,0x2E,0x97,0x24,0x45,0x46,0x14,0x21,0x4F,0x74,
|
||||
0xBF,0x8B,0x88,0x40,0x4D,0x95,0xFC,0x1D,0x96,0xB5,
|
||||
0x91,0xAF,0x70,0xF4,0xDD,0xD3,0x66,0xA0,0x2F,0x45,
|
||||
0xBF,0xBC,0x09,0xEC,0x03,0xBD,0x97,0x85,0x7F,0xAC,
|
||||
0x6D,0xD0,0x31,0xCB,0x85,0x04,0x96,0xEB,0x27,0xB3,
|
||||
0x55,0xFD,0x39,0x41,0xDA,0x25,0x47,0xE6,0xAB,0xCA,
|
||||
0x0A,0x9A,0x28,0x50,0x78,0x25,0x53,0x04,0x29,0xF4,
|
||||
0x0A,0x2C,0x86,0xDA,0xE9,0xB6,0x6D,0xFB,0x68,0xDC,
|
||||
0x14,0x62,0xD7,0x48,0x69,0x00,0x68,0x0E,0xC0,0xA4,
|
||||
0x27,0xA1,0x8D,0xEE,0x4F,0x3F,0xFE,0xA2,0xE8,0x87,
|
||||
0xAD,0x8C,0xB5,0x8C,0xE0,0x06,0x7A,0xF4,0xD6,0xB6,
|
||||
0xAA,0xCE,0x1E,0x7C,0xD3,0x37,0x5F,0xEC,0xCE,0x78,
|
||||
0xA3,0x99,0x40,0x6B,0x2A,0x42,0x20,0xFE,0x9E,0x35,
|
||||
0xD9,0xF3,0x85,0xB9,0xEE,0x39,0xD7,0xAB,0x3B,0x12,
|
||||
0x4E,0x8B,0x1D,0xC9,0xFA,0xF7,0x4B,0x6D,0x18,0x56,
|
||||
0x26,0xA3,0x66,0x31,0xEA,0xE3,0x97,0xB2,0x3A,0x6E,
|
||||
0xFA,0x74,0xDD,0x5B,0x43,0x32,0x68,0x41,0xE7,0xF7,
|
||||
0xCA,0x78,0x20,0xFB,0xFB,0x0A,0xF5,0x4E,0xD8,0xFE,
|
||||
0xB3,0x97,0x45,0x40,0x56,0xAC,0xBA,0x48,0x95,0x27,
|
||||
0x55,0x53,0x3A,0x3A,0x20,0x83,0x8D,0x87,0xFE,0x6B,
|
||||
0xA9,0xB7,0xD0,0x96,0x95,0x4B,0x55,0xA8,0x67,0xBC,
|
||||
0xA1,0x15,0x9A,0x58,0xCC,0xA9,0x29,0x63,0x99,0xE1,
|
||||
0xDB,0x33,0xA6,0x2A,0x4A,0x56,0x3F,0x31,0x25,0xF9,
|
||||
0x5E,0xF4,0x7E,0x1C,0x90,0x29,0x31,0x7C,0xFD,0xF8,
|
||||
0xE8,0x02,0x04,0x27,0x2F,0x70,0x80,0xBB,0x15,0x5C,
|
||||
0x05,0x28,0x2C,0xE3,0x95,0xC1,0x15,0x48,0xE4,0xC6,
|
||||
0x6D,0x22,0x48,0xC1,0x13,0x3F,0xC7,0x0F,0x86,0xDC,
|
||||
0x07,0xF9,0xC9,0xEE,0x41,0x04,0x1F,0x0F,0x40,0x47,
|
||||
0x79,0xA4,0x5D,0x88,0x6E,0x17,0x32,0x5F,0x51,0xEB,
|
||||
0xD5,0x9B,0xC0,0xD1,0xF2,0xBC,0xC1,0x8F,0x41,0x11,
|
||||
0x35,0x64,0x25,0x7B,0x78,0x34,0x60,0x2A,0x9C,0x60,
|
||||
0xDF,0xF8,0xE8,0xA3,0x1F,0x63,0x6C,0x1B,0x0E,0x12,
|
||||
0xB4,0xC2,0x02,0xE1,0x32,0x9E,0xAF,0x66,0x4F,0xD1,
|
||||
0xCA,0xD1,0x81,0x15,0x6B,0x23,0x95,0xE0,0x33,0x3E,
|
||||
0x92,0xE1,0x3B,0x24,0x0B,0x62,0xEE,0xBE,0xB9,0x22,
|
||||
0x85,0xB2,0xA2,0x0E,0xE6,0xBA,0x0D,0x99,0xDE,0x72,
|
||||
0x0C,0x8C,0x2D,0xA2,0xF7,0x28,0xD0,0x12,0x78,0x45,
|
||||
0x95,0xB7,0x94,0xFD,0x64,0x7D,0x08,0x62,0xE7,0xCC,
|
||||
0xF5,0xF0,0x54,0x49,0xA3,0x6F,0x87,0x7D,0x48,0xFA,
|
||||
0xC3,0x9D,0xFD,0x27,0xF3,0x3E,0x8D,0x1E,0x0A,0x47,
|
||||
0x63,0x41,0x99,0x2E,0xFF,0x74,0x3A,0x6F,0x6E,0xAB,
|
||||
0xF4,0xF8,0xFD,0x37,0xA8,0x12,0xDC,0x60,0xA1,0xEB,
|
||||
0xDD,0xF8,0x99,0x1B,0xE1,0x4C,0xDB,0x6E,0x6B,0x0D,
|
||||
0xC6,0x7B,0x55,0x10,0x6D,0x67,0x2C,0x37,0x27,0x65,
|
||||
0xD4,0x3B,0xDC,0xD0,0xE8,0x04,0xF1,0x29,0x0D,0xC7,
|
||||
0xCC,0x00,0xFF,0xA3,0xB5,0x39,0x0F,0x92,0x69,0x0F,
|
||||
0xED,0x0B,0x66,0x7B,0x9F,0xFB,0xCE,0xDB,0x7D,0x9C,
|
||||
0xA0,0x91,0xCF,0x0B,0xD9,0x15,0x5E,0xA3,0xBB,0x13,
|
||||
0x2F,0x88,0x51,0x5B,0xAD,0x24,0x7B,0x94,0x79,0xBF,
|
||||
0x76,0x3B,0xD6,0xEB,0x37,0x39,0x2E,0xB3,0xCC,0x11,
|
||||
0x59,0x79,0x80,0x26,0xE2,0x97,0xF4,0x2E,0x31,0x2D,
|
||||
0x68,0x42,0xAD,0xA7,0xC6,0x6A,0x2B,0x3B,0x12,0x75,
|
||||
0x4C,0xCC,0x78,0x2E,0xF1,0x1C,0x6A,0x12,0x42,0x37,
|
||||
0xB7,0x92,0x51,0xE7,0x06,0xA1,0xBB,0xE6,0x4B,0xFB,
|
||||
0x63,0x50,0x1A,0x6B,0x10,0x18,0x11,0xCA,0xED,0xFA,
|
||||
0x3D,0x25,0xBD,0xD8,0xE2,0xE1,0xC3,0xC9,0x44,0x42,
|
||||
0x16,0x59,0x0A,0x12,0x13,0x86,0xD9,0x0C,0xEC,0x6E,
|
||||
0xD5,0xAB,0xEA,0x2A,0x64,0xAF,0x67,0x4E,0xDA,0x86,
|
||||
0xA8,0x5F,0xBE,0xBF,0xE9,0x88,0x64,0xE4,0xC3,0xFE,
|
||||
0x9D,0xBC,0x80,0x57,0xF0,0xF7,0xC0,0x86,0x60,0x78,
|
||||
0x7B,0xF8,0x60,0x03,0x60,0x4D,0xD1,0xFD,0x83,0x46,
|
||||
0xF6,0x38,0x1F,0xB0,0x77,0x45,0xAE,0x04,0xD7,0x36,
|
||||
0xFC,0xCC,0x83,0x42,0x6B,0x33,0xF0,0x1E,0xAB,0x71,
|
||||
0xB0,0x80,0x41,0x87,0x3C,0x00,0x5E,0x5F,0x77,0xA0,
|
||||
0x57,0xBE,0xBD,0xE8,0xAE,0x24,0x55,0x46,0x42,0x99,
|
||||
0xBF,0x58,0x2E,0x61,0x4E,0x58,0xF4,0x8F,0xF2,0xDD,
|
||||
0xFD,0xA2,0xF4,0x74,0xEF,0x38,0x87,0x89,0xBD,0xC2,
|
||||
0x53,0x66,0xF9,0xC3,0xC8,0xB3,0x8E,0x74,0xB4,0x75,
|
||||
0xF2,0x55,0x46,0xFC,0xD9,0xB9,0x7A,0xEB,0x26,0x61,
|
||||
0x8B,0x1D,0xDF,0x84,0x84,0x6A,0x0E,0x79,0x91,0x5F,
|
||||
0x95,0xE2,0x46,0x6E,0x59,0x8E,0x20,0xB4,0x57,0x70,
|
||||
0x8C,0xD5,0x55,0x91,0xC9,0x02,0xDE,0x4C,0xB9,0x0B,
|
||||
0xAC,0xE1,0xBB,0x82,0x05,0xD0,0x11,0xA8,0x62,0x48,
|
||||
0x75,0x74,0xA9,0x9E,0xB7,0x7F,0x19,0xB6,0xE0,0xA9,
|
||||
0xDC,0x09,0x66,0x2D,0x09,0xA1,0xC4,0x32,0x46,0x33,
|
||||
0xE8,0x5A,0x1F,0x02,0x09,0xF0,0xBE,0x8C,0x4A,0x99,
|
||||
0xA0,0x25,0x1D,0x6E,0xFE,0x10,0x1A,0xB9,0x3D,0x1D,
|
||||
0x0B,0xA5,0xA4,0xDF,0xA1,0x86,0xF2,0x0F,0x28,0x68,
|
||||
0xF1,0x69,0xDC,0xB7,0xDA,0x83,0x57,0x39,0x06,0xFE,
|
||||
0xA1,0xE2,0xCE,0x9B,0x4F,0xCD,0x7F,0x52,0x50,0x11,
|
||||
0x5E,0x01,0xA7,0x06,0x83,0xFA,0xA0,0x02,0xB5,0xC4,
|
||||
0x0D,0xE6,0xD0,0x27,0x9A,0xF8,0x8C,0x27,0x77,0x3F,
|
||||
0x86,0x41,0xC3,0x60,0x4C,0x06,0x61,0xA8,0x06,0xB5,
|
||||
0xF0,0x17,0x7A,0x28,0xC0,0xF5,0x86,0xE0,0x00,0x60,
|
||||
0x58,0xAA,0x30,0xDC,0x7D,0x62,0x11,0xE6,0x9E,0xD7,
|
||||
0x23,0x38,0xEA,0x63,0x53,0xC2,0xDD,0x94,0xC2,0xC2,
|
||||
0x16,0x34,0xBB,0xCB,0xEE,0x56,0x90,0xBC,0xB6,0xDE,
|
||||
0xEB,0xFC,0x7D,0xA1,0xCE,0x59,0x1D,0x76,0x6F,0x05,
|
||||
0xE4,0x09,0x4B,0x7C,0x01,0x88,0x39,0x72,0x0A,0x3D,
|
||||
0x7C,0x92,0x7C,0x24,0x86,0xE3,0x72,0x5F,0x72,0x4D,
|
||||
0x9D,0xB9,0x1A,0xC1,0x5B,0xB4,0xD3,0x9E,0xB8,0xFC,
|
||||
0xED,0x54,0x55,0x78,0x08,0xFC,0xA5,0xB5,0xD8,0x3D,
|
||||
0x7C,0xD3,0x4D,0xAD,0x0F,0xC4,0x1E,0x50,0xEF,0x5E,
|
||||
0xB1,0x61,0xE6,0xF8,0xA2,0x85,0x14,0xD9,0x6C,0x51,
|
||||
0x13,0x3C,0x6F,0xD5,0xC7,0xE7,0x56,0xE1,0x4E,0xC4,
|
||||
0x36,0x2A,0xBF,0xCE,0xDD,0xC6,0xC8,0x37,0xD7,0x9A,
|
||||
0x32,0x34,0x92,0x63,0x82,0x12,0x67,0x0E,0xFA,0x8E,
|
||||
0x40,0x60,0x00,0xE0,0x3A,0x39,0xCE,0x37,0xD3,0xFA,
|
||||
0xF5,0xCF,0xAB,0xC2,0x77,0x37,0x5A,0xC5,0x2D,0x1B,
|
||||
0x5C,0xB0,0x67,0x9E,0x4F,0xA3,0x37,0x42,0xD3,0x82,
|
||||
0x27,0x40,0x99,0xBC,0x9B,0xBE,0xD5,0x11,0x8E,0x9D,
|
||||
0xBF,0x0F,0x73,0x15,0xD6,0x2D,0x1C,0x7E,0xC7,0x00,
|
||||
0xC4,0x7B,0xB7,0x8C,0x1B,0x6B,0x21,0xA1,0x90,0x45,
|
||||
0xB2,0x6E,0xB1,0xBE,0x6A,0x36,0x6E,0xB4,0x57,0x48,
|
||||
0xAB,0x2F,0xBC,0x94,0x6E,0x79,0xC6,0xA3,0x76,0xD2,
|
||||
0x65,0x49,0xC2,0xC8,0x53,0x0F,0xF8,0xEE,0x46,0x8D,
|
||||
0xDE,0x7D,0xD5,0x73,0x0A,0x1D,0x4C,0xD0,0x4D,0xC6,
|
||||
0x29,0x39,0xBB,0xDB,0xA9,0xBA,0x46,0x50,0xAC,0x95,
|
||||
0x26,0xE8,0xBE,0x5E,0xE3,0x04,0xA1,0xFA,0xD5,0xF0,
|
||||
0x6A,0x2D,0x51,0x9A,0x63,0xEF,0x8C,0xE2,0x9A,0x86,
|
||||
0xEE,0x22,0xC0,0x89,0xC2,0xB8,0x43,0x24,0x2E,0xF6,
|
||||
0xA5,0x1E,0x03,0xAA,0x9C,0xF2,0xD0,0xA4,0x83,0xC0,
|
||||
0x61,0xBA,0x9B,0xE9,0x6A,0x4D,0x8F,0xE5,0x15,0x50,
|
||||
0xBA,0x64,0x5B,0xD6,0x28,0x26,0xA2,0xF9,0xA7,0x3A,
|
||||
0x3A,0xE1,0x4B,0xA9,0x95,0x86,0xEF,0x55,0x62,0xE9,
|
||||
0xC7,0x2F,0xEF,0xD3,0xF7,0x52,0xF7,0xDA,0x3F,0x04,
|
||||
0x6F,0x69,0x77,0xFA,0x0A,0x59,0x80,0xE4,0xA9,0x15,
|
||||
0x87,0xB0,0x86,0x01,0x9B,0x09,0xE6,0xAD,0x3B,0x3E,
|
||||
0xE5,0x93,0xE9,0x90,0xFD,0x5A,0x9E,0x34,0xD7,0x97,
|
||||
0x2C,0xF0,0xB7,0xD9,0x02,0x2B,0x8B,0x51,0x96,0xD5,
|
||||
0xAC,0x3A,0x01,0x7D,0xA6,0x7D,0xD1,0xCF,0x3E,0xD6,
|
||||
0x7C,0x7D,0x2D,0x28,0x1F,0x9F,0x25,0xCF,0xAD,0xF2,
|
||||
0xB8,0x9B,0x5A,0xD6,0xB4,0x72,0x5A,0x88,0xF5,0x4C,
|
||||
0xE0,0x29,0xAC,0x71,0xE0,0x19,0xA5,0xE6,0x47,0xB0,
|
||||
0xAC,0xFD,0xED,0x93,0xFA,0x9B,0xE8,0xD3,0xC4,0x8D,
|
||||
0x28,0x3B,0x57,0xCC,0xF8,0xD5,0x66,0x29,0x79,0x13,
|
||||
0x2E,0x28,0x78,0x5F,0x01,0x91,0xED,0x75,0x60,0x55,
|
||||
0xF7,0x96,0x0E,0x44,0xE3,0xD3,0x5E,0x8C,0x15,0x05,
|
||||
0x6D,0xD4,0x88,0xF4,0x6D,0xBA,0x03,0xA1,0x61,0x25,
|
||||
0x05,0x64,0xF0,0xBD,0xC3,0xEB,0x9E,0x15,0x3C,0x90,
|
||||
0x57,0xA2,0x97,0x27,0x1A,0xEC,0xA9,0x3A,0x07,0x2A,
|
||||
0x1B,0x3F,0x6D,0x9B,0x1E,0x63,0x21,0xF5,0xF5,0x9C,
|
||||
0x66,0xFB,0x26,0xDC,0xF3,0x19,0x75,0x33,0xD9,0x28,
|
||||
0xB1,0x55,0xFD,0xF5,0x03,0x56,0x34,0x82,0x8A,0xBA,
|
||||
0x3C,0xBB,0x28,0x51,0x77,0x11,0xC2,0x0A,0xD9,0xF8,
|
||||
0xAB,0xCC,0x51,0x67,0xCC,0xAD,0x92,0x5F,0x4D,0xE8,
|
||||
0x17,0x51,0x38,0x30,0xDC,0x8E,0x37,0x9D,0x58,0x62,
|
||||
0x93,0x20,0xF9,0x91,0xEA,0x7A,0x90,0xC2,0xFB,0x3E,
|
||||
0x7B,0xCE,0x51,0x21,0xCE,0x64,0x77,0x4F,0xBE,0x32,
|
||||
0xA8,0xB6,0xE3,0x7E,0xC3,0x29,0x3D,0x46,0x48,0xDE,
|
||||
0x53,0x69,0x64,0x13,0xE6,0x80,0xA2,0xAE,0x08,0x10,
|
||||
0xDD,0x6D,0xB2,0x24,0x69,0x85,0x2D,0xFD,0x09,0x07,
|
||||
0x21,0x66,0xB3,0x9A,0x46,0x0A,0x64,0x45,0xC0,0xDD,
|
||||
0x58,0x6C,0xDE,0xCF,0x1C,0x20,0xC8,0xAE,0x5B,0xBE,
|
||||
0xF7,0xDD,0x1B,0x58,0x8D,0x40,0xCC,0xD2,0x01,0x7F,
|
||||
0x6B,0xB4,0xE3,0xBB,0xDD,0xA2,0x6A,0x7E,0x3A,0x59,
|
||||
0xFF,0x45,0x3E,0x35,0x0A,0x44,0xBC,0xB4,0xCD,0xD5,
|
||||
0x72,0xEA,0xCE,0xA8,0xFA,0x64,0x84,0xBB,0x8D,0x66,
|
||||
0x12,0xAE,0xBF,0x3C,0x6F,0x47,0xD2,0x9B,0xE4,0x63,
|
||||
0x54,0x2F,0x5D,0x9E,0xAE,0xC2,0x77,0x1B,0xF6,0x4E,
|
||||
0x63,0x70,0x74,0x0E,0x0D,0x8D,0xE7,0x5B,0x13,0x57,
|
||||
0xF8,0x72,0x16,0x71,0xAF,0x53,0x7D,0x5D,0x40,0x40,
|
||||
0xCB,0x08,0x4E,0xB4,0xE2,0xCC,0x34,0xD2,0x46,0x6A,
|
||||
0x01,0x15,0xAF,0x84,0xE1,0xB0,0x04,0x28,0x95,0x98,
|
||||
0x3A,0x1D,0x06,0xB8,0x9F,0xB4,0xCE,0x6E,0xA0,0x48,
|
||||
0x6F,0x3F,0x3B,0x82,0x35,0x20,0xAB,0x82,0x01,0x1A,
|
||||
0x1D,0x4B,0x27,0x72,0x27,0xF8,0x61,0x15,0x60,0xB1,
|
||||
0xE7,0x93,0x3F,0xDC,0xBB,0x3A,0x79,0x2B,0x34,0x45,
|
||||
0x25,0xBD,0xA0,0x88,0x39,0xE1,0x51,0xCE,0x79,0x4B,
|
||||
0x2F,0x32,0xC9,0xB7,0xA0,0x1F,0xBA,0xC9,0xE0,0x1C,
|
||||
0xC8,0x7E,0xBC,0xC7,0xD1,0xF6,0xCF,0x01,0x11,0xC3,
|
||||
0xA1,0xE8,0xAA,0xC7,0x1A,0x90,0x87,0x49,0xD4,0x4F,
|
||||
0xBD,0x9A,0xD0,0xDA,0xDE,0xCB,0xD5,0x0A,0xDA,0x38,
|
||||
0x03,0x39,0xC3,0x2A,0xC6,0x91,0x36,0x67,0x8D,0xF9,
|
||||
0x31,0x7C,0xE0,0xB1,0x2B,0x4F,0xF7,0x9E,0x59,0xB7,
|
||||
0x43,0xF5,0xBB,0x3A,0xF2,0xD5,0x19,0xFF,0x27,0xD9,
|
||||
0x45,0x9C,0xBF,0x97,0x22,0x2C,0x15,0xE6,0xFC,0x2A,
|
||||
0x0F,0x91,0xFC,0x71,0x9B,0x94,0x15,0x25,0xFA,0xE5,
|
||||
0x93,0x61,0xCE,0xB6,0x9C,0xEB,0xC2,0xA8,0x64,0x59,
|
||||
0x12,0xBA,0xA8,0xD1,0xB6,0xC1,0x07,0x5E,0xE3,0x05,
|
||||
0x6A,0x0C,0x10,0xD2,0x50,0x65,0xCB,0x03,0xA4,0x42,
|
||||
0xE0,0xEC,0x6E,0x0E,0x16,0x98,0xDB,0x3B,0x4C,0x98,
|
||||
0xA0,0xBE,0x32,0x78,0xE9,0x64,0x9F,0x1F,0x95,0x32,
|
||||
0xE0,0xD3,0x92,0xDF,0xD3,0xA0,0x34,0x2B,0x89,0x71,
|
||||
0xF2,0x1E,0x1B,0x0A,0x74,0x41,0x4B,0xA3,0x34,0x8C,
|
||||
0xC5,0xBE,0x71,0x20,0xC3,0x76,0x32,0xD8,0xDF,0x35,
|
||||
0x9F,0x8D,0x9B,0x99,0x2F,0x2E,0xE6,0x0B,0x6F,0x47,
|
||||
0x0F,0xE3,0xF1,0x1D,0xE5,0x4C,0xDA,0x54,0x1E,0xDA,
|
||||
0xD8,0x91,0xCE,0x62,0x79,0xCF,0xCD,0x3E,0x7E,0x6F,
|
||||
0x16,0x18,0xB1,0x66,0xFD,0x2C,0x1D,0x05,0x84,0x8F,
|
||||
0xD2,0xC5,0xF6,0xFB,0x22,0x99,0xF5,0x23,0xF3,0x57,
|
||||
0xA6,0x32,0x76,0x23,0x93,0xA8,0x35,0x31,0x56,0xCC,
|
||||
0xCD,0x02,0xAC,0xF0,0x81,0x62,0x5A,0x75,0xEB,0xB5,
|
||||
0x6E,0x16,0x36,0x97,0x88,0xD2,0x73,0xCC,0xDE,0x96,
|
||||
0x62,0x92,0x81,0xB9,0x49,0xD0,0x4C,0x50,0x90,0x1B,
|
||||
0x71,0xC6,0x56,0x14,0xE6,0xC6,0xC7,0xBD,0x32,0x7A,
|
||||
0x14,0x0A,0x45,0xE1,0xD0,0x06,0xC3,0xF2,0x7B,0x9A,
|
||||
0xC9,0xAA,0x53,0xFD,0x62,0xA8,0x0F,0x00,0xBB,0x25,
|
||||
0xBF,0xE2,0x35,0xBD,0xD2,0xF6,0x71,0x12,0x69,0x05,
|
||||
0xB2,0x04,0x02,0x22,0xB6,0xCB,0xCF,0x7C,0xCD,0x76,
|
||||
0x9C,0x2B,0x53,0x11,0x3E,0xC0,0x16,0x40,0xE3,0xD3,
|
||||
0x38,0xAB,0xBD,0x60,0x25,0x47,0xAD,0xF0,0xBA,0x38,
|
||||
0x20,0x9C,0xF7,0x46,0xCE,0x76,0x77,0xAF,0xA1,0xC5,
|
||||
0x20,0x75,0x60,0x60,0x85,0xCB,0xFE,0x4E,0x8A,0xE8,
|
||||
0x8D,0xD8,0x7A,0xAA,0xF9,0xB0,0x4C,0xF9,0xAA,0x7E,
|
||||
0x19,0x48,0xC2,0x5C,0x02,0xFB,0x8A,0x8C,0x01,0xC3,
|
||||
0x6A,0xE4,0xD6,0xEB,0xE1,0xF9,0x90,0xD4,0xF8,0x69,
|
||||
0xA6,0x5C,0xDE,0xA0,0x3F,0x09,0x25,0x2D,0xC2,0x08,
|
||||
0xE6,0x9F,0xB7,0x4E,0x61,0x32,0xCE,0x77,0xE2,0x5B,
|
||||
0x57,0x8F,0xDF,0xE3,0x3A,0xC3,0x72,0xE6,0xB8,0x3A,
|
||||
0xCB,0x02,0x20,0x02,0x39,0x7A,0x6E,0xC6,0xFB,0x5B,
|
||||
0xFF,0xCF,0xD4,0xDD,0x4C,0xBF,0x5E,0xD1,0xF4,0x3F,
|
||||
0xE5,0x82,0x3E,0xF4,0xE8,0x23,0x2D,0x15,0x2A,0xF0,
|
||||
0xE7,0x18,0xC9,0x70,0x59,0xBD,0x98,0x20,0x1F,0x4A,
|
||||
0x9D,0x62,0xE7,0xA5,0x29,0xBA,0x89,0xE1,0x24,0x8D,
|
||||
0x3B,0xF8,0x86,0x56,0xC5,0x11,0x4D,0x0E,0xBC,0x4C,
|
||||
0xEE,0x16,0x03,0x4D,0x8A,0x39,0x20,0xE4,0x78,0x82,
|
||||
0xE9,0xAE,0x8F,0xBD,0xE3,0xAB,0xDC,0x1F,0x6D,0xA5,
|
||||
0x1E,0x52,0x5D,0xB2,0xBA,0xE1,0x01,0xF8,0x6E,0x7A,
|
||||
0x6D,0x9C,0x68,0xA9,0x27,0x08,0xFC,0xD9,0x29,0x3C,
|
||||
0xBC,0x0C,0xB0,0x3C,0x86,0xF8,0xA8,0xAD,0x2C,0x2F,
|
||||
0x00,0x42,0x4E,0xEB,0xCA,0xCB,0x45,0x2D,0x89,0xCC,
|
||||
0x71,0xFC,0xD5,0x9C,0x7F,0x91,0x7F,0x06,0x22,0xBC,
|
||||
0x6D,0x8A,0x08,0xB1,0x83,0x4D,0x21,0x32,0x68,0x84,
|
||||
0xCA,0x82,0xE3,0xAA,0xCB,0xF3,0x77,0x86,0xF2,0xFA,
|
||||
0x2C,0xAB,0x6E,0x3D,0xCE,0x53,0x5A,0xD1,0xF2,0x0A,
|
||||
0xC6,0x07,0xC6,0xB8,0xE1,0x4F,0x5E,0xB4,0x38,0x8E,
|
||||
0x77,0x50,0x14,0xA6,0x65,0x66,0x65,0xF7,0xB6,0x4A,
|
||||
0x43,0xE4,0xBA,0x38,0x3D,0x01,0xB2,0xE4,0x10,0x79,
|
||||
0x8E,0xB2,0x98,0x6F,0x90,0x9E,0x0C,0xA4,0x1F,0x7B,
|
||||
0x37,0x77,0x2C,0x12,0x60,0x30,0x85,0x08,0x87,0x18,
|
||||
0xC4,0xE7,0xD1,0xBD,0x40,0x65,0xFF,0xCE,0x83,0x92,
|
||||
0xFD,0x8A,0xAA,0x36,0xD1,0x2B,0xB4,0xC8,0xC9,0xD0,
|
||||
0x99,0x4F,0xB0,0xB7,0x14,0xF9,0x68,0x18,0xF9,0xA5,
|
||||
0x39,0x98,0xA0,0xA1,0x78,0xC6,0x26,0x84,0xA8,0x1E,
|
||||
0x8A,0xE9,0x72,0xF6,0xB8,0x42,0x5E,0xB6,0x7A,0x29,
|
||||
0xD4,0x86,0x55,0x1B,0xD7,0x19,0xAF,0x32,0xC1,0x89,
|
||||
0xD5,0x14,0x55,0x05,0xDC,0x81,0xD5,0x3E,0x48,0x42,
|
||||
0x4E,0xDA,0xB7,0x96,0xEF,0x46,0xA0,0x49,0x8F,0x03,
|
||||
0x66,0x7D,0xEE,0xDE,0x03,0xAC,0x0A,0xB3,0xC4,0x97,
|
||||
0x73,0x3D,0x53,0x16,0xA8,0x91,0x30,0xA8,0x8F,0xCC,
|
||||
0x96,0x04,0x44,0x0A,0xCE,0xEB,0x89,0x3A,0x77,0x25,
|
||||
0xB8,0x2B,0x0E,0x1E,0xF6,0x9D,0x30,0x2A,0x5C,0x8E,
|
||||
0xE7,0xB8,0x4D,0xEF,0x5A,0x31,0xB0,0x96,0xC9,0xEB,
|
||||
0xF8,0x8D,0x51,0x2D,0x78,0x8E,0x7E,0x40,0x02,0xEE,
|
||||
0x87,0xE0,0x2A,0xF6,0xC3,0x58,0xA1,0xBB,0x02,0xE8,
|
||||
0xD7,0xAF,0xDF,0x9F,0xB0,0xE7,0x79,0x0E,0x94,0x2A,
|
||||
0x3B,0x3C,0x1A,0xBA,0xC6,0xFF,0xA7,0xAF,0x9D,0xF7,
|
||||
0x96,0xF9,0x32,0x1B,0xB9,0x94,0x01,0x74,0xA8,0xA8,
|
||||
0xED,0x22,0x16,0x2C,0xCF,0xF1,0xBB,0x99,0xDA,0xA8,
|
||||
0xD5,0x51,0xA4,0xD5,0xE4,0x4B,0xEC,0xDD,0xE3,0xEC,
|
||||
0xA8,0x0D,0xC5,0x09,0x03,0x93,0xEE,0xF2,0x72,0x52,
|
||||
0x3D,0x31,0xD4,0x8E,0x3A,0x1C,0x22,0x4E,0xB6,0x5E,
|
||||
0x60,0x52,0xC3,0xA4,0x21,0x09,0xC3,0x2F,0x05,0x2E,
|
||||
0xE3,0x88,0xED,0x9F,0x7E,0xA9,0x91,0xC6,0x2F,0x97,
|
||||
0x77,0xB5,0x5B,0xA0,0x15,0x0C,0xBC,0xA3,0x3A,0xEC,
|
||||
0x65,0x25,0xDF,0x31,0x83,0x83,0x43,0xA9,0xCE,0x26,
|
||||
0x93,0x62,0xAD,0x8B,0x01,0x34,0x14,0x0B,0x8D,0xF5,
|
||||
0xCF,0x81,0x1E,0x9F,0xF5,0x59,0x16,0x7F,0x05,0x64,
|
||||
0x38,0x12,0xF4,0xE0,0x58,0x8A,0x52,0xB0,0xCB,0xB8,
|
||||
0xE9,0x44,0xEF,0x5B,0x16,0xA3,0x73,0xC4,0xED,0xA1,
|
||||
0x7D,0xFC,0xFE,0xEA,0xF5,0x4B,0xCB,0xBE,0x87,0x73,
|
||||
0xE3,0xD2,0xC5,0x31,0xDC,0xD0,0x55,0xC4,0x67,0x29,
|
||||
0x52,0x77,0x4F,0x3A,0x57,0xCA,0x6B,0xC0,0x46,0x7D,
|
||||
0x3A,0x3B,0x24,0x77,0x84,0x25,0xB7,0x99,0x1E,0x9A,
|
||||
0xDD,0x82,0x5C,0x26,0xE4,0x52,0xC8,0xEE,0xFC,0xAC,
|
||||
0xDE,0x1E,0x84,0x83,0x3A,0xF3,0x61,0x21,0x1D,0x03,
|
||||
0x17,0x32,0xC1,0x31,0xCC,0xAD,0xB2,0x47,0xE6,0x06,
|
||||
0xBE,0x8C,0x71,0x2B,0x39,0xF1,0x88,0xB4,0xEF,0x39,
|
||||
0x3A,0x9F,0xCD,0xC5,0xC5,0x75,0x51,0x69,0x1F,0xF6,
|
||||
0x99,0x4F,0x39,0x82,0x9C,0xB0,0x11,0x01,0x65,0x73,
|
||||
0x33,0x43,0xCB,0xEB,0x61,0xD3,0xD0,0xB4,0x44,0xF3,
|
||||
0x0A,0xEF,0xA8,0xAE,0x73,0x75,0x2A,0x3A,0x1C,0x9D,
|
||||
0xB4,0xB7,0x09,0x14,0xD6,0xAB,0x25,0x0C,0x85,0x3B,
|
||||
0x73,0x28,0x49,0x5F,0x94,0x8F,0xD2,0xA4,0xED,0x8E,
|
||||
0x6C,0xF7,0x51,0xE4,0xC3,0x20,0xBB,0x75,0xD9,0xCA,
|
||||
0xA0,0xB3,0x8B,0xA5,0x62,0x62,0x4E,0x84,0xB0,0x3F,
|
||||
0xEE,0xA8,0x07,0x6E,0x74,0xA0,0x7F,0xE5,0x80,0x39,
|
||||
0xE0,0x0C,0x36,0xFF,0xDA,0xF8,0x03,0x73,0x13,0x58,
|
||||
0xB9,0xE6,0x71,0xB9,0xDA,0xC4,0xCE,0x1C,0xB2,0x5B,
|
||||
0x10,0xED,0x4D,0xD3,0xD5,0xB1,0xFC,0xF2,0xB4,0x80,
|
||||
0x46,0x34,0xF5,0x79,0x25,0xEA,0xC4,0x00,0xA9,0xAC,
|
||||
0x55,0xEA,0x72,0x89,0x32,0xDF,0x06,0x04,0x1D,0x05,
|
||||
0x5D,0x31,0xF5,0x02,0xC5,0x39,0xC2,0xE3,0x2B,0x89,
|
||||
0xD9,0xDB,0x5B,0xCC,0x0A,0x98,0xC0,0x5B,0xFD,0x6F,
|
||||
0x1B,0x25,0x06,0x22,0x2E,0x21,0xBE,0x0E,0x60,0x97,
|
||||
0x3B,0x04,0xEC,0xD5,0x4A,0x67,0xB5,0x4F,0xE6,0x38,
|
||||
0xA6,0xED,0x66,0x15,0x98,0x1A,0x91,0x0A,0x5D,0x92,
|
||||
0x92,0x8D,0xAC,0x6F,0xC6,0x97,0xE7,0x3C,0x63,0xAD,
|
||||
0x45,0x6E,0xDF,0x5F,0x45,0x7A,0x81,0x45,0x51,0x87,
|
||||
0x5A,0x64,0xCD,0x30,0x99,0xF1,0x69,0xB5,0xF1,0x8A,
|
||||
0x8C,0x73,0xEE,0x0B,0x5E,0x57,0x36,0x8F,0x6C,0x79,
|
||||
0xF4,0xBB,0x7A,0x59,0x59,0x26,0xAA,0xB4,0x9E,0xC6,
|
||||
0x8A,0xC8,0xFC,0xFB,0x80,0x00,
|
||||
0x0};
|
|
@ -1,8 +0,0 @@
|
|||
#define MAXKEYBYTES 56 /* 448 bits */
|
||||
// #define little_endian 1 /* Eg: Intel */
|
||||
#define big_endian 1 /* Eg: Motorola */
|
||||
|
||||
short opensubkeyfile(void);
|
||||
unsigned long F(unsigned long x);
|
||||
void Blowfish_encipher(unsigned long *xl, unsigned long *xr);
|
||||
void Blowfish_decipher(unsigned long *xl, unsigned long *xr);
|
|
@ -0,0 +1,128 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include "blowfish.h"
|
||||
|
||||
#define N 16
|
||||
|
||||
extern const unsigned long BLOWFISH_DAT_P[N + 2];
|
||||
extern const unsigned long BLOWFISH_DAT_S[4][256];
|
||||
|
||||
#define P BLOWFISH_DAT_P
|
||||
#define S BLOWFISH_DAT_S
|
||||
|
||||
static unsigned long F(unsigned long x)
|
||||
{
|
||||
unsigned short a;
|
||||
unsigned short b;
|
||||
unsigned short c;
|
||||
unsigned short d;
|
||||
unsigned long y;
|
||||
|
||||
d = x & 0x00FF;
|
||||
x >>= 8;
|
||||
c = x & 0x00FF;
|
||||
x >>= 8;
|
||||
b = x & 0x00FF;
|
||||
x >>= 8;
|
||||
a = x & 0x00FF;
|
||||
y = S[0][a] + S[1][b];
|
||||
y = y ^ S[2][c];
|
||||
y = y + S[3][d];
|
||||
|
||||
return y;
|
||||
}
|
||||
|
||||
void Blowfish_encipher(unsigned long *xl, unsigned long *xr)
|
||||
{
|
||||
unsigned long Xl;
|
||||
unsigned long Xr;
|
||||
unsigned long temp;
|
||||
short i;
|
||||
|
||||
Xl = *xl;
|
||||
Xr = *xr;
|
||||
|
||||
for (i = 0; i < N; ++i) {
|
||||
Xl = Xl ^ P[i];
|
||||
Xr = F(Xl) ^ Xr;
|
||||
|
||||
temp = Xl;
|
||||
Xl = Xr;
|
||||
Xr = temp;
|
||||
}
|
||||
|
||||
temp = Xl;
|
||||
Xl = Xr;
|
||||
Xr = temp;
|
||||
|
||||
Xr = Xr ^ P[N];
|
||||
Xl = Xl ^ P[N + 1];
|
||||
|
||||
*xl = Xl;
|
||||
*xr = Xr;
|
||||
}
|
||||
|
||||
void Blowfish_decipher(unsigned long *xl, unsigned long *xr)
|
||||
{
|
||||
unsigned long Xl;
|
||||
unsigned long Xr;
|
||||
unsigned long temp;
|
||||
short i;
|
||||
|
||||
Xl = *xl;
|
||||
Xr = *xr;
|
||||
|
||||
for (i = N + 1; i > 1; --i) {
|
||||
Xl = Xl ^ P[i];
|
||||
Xr = F(Xl) ^ Xr;
|
||||
|
||||
/* Exchange Xl and Xr */
|
||||
temp = Xl;
|
||||
Xl = Xr;
|
||||
Xr = temp;
|
||||
}
|
||||
|
||||
/* Exchange Xl and Xr */
|
||||
temp = Xl;
|
||||
Xl = Xr;
|
||||
Xr = temp;
|
||||
|
||||
Xr = Xr ^ P[1];
|
||||
Xl = Xl ^ P[0];
|
||||
|
||||
*xl = Xl;
|
||||
*xr = Xr;
|
||||
}
|
||||
|
||||
uint64_t Blowfish_hash(void* buf, size_t len)
|
||||
{
|
||||
unsigned i,j;
|
||||
union
|
||||
{
|
||||
unsigned long h32[2];
|
||||
uint64_t h64;
|
||||
} hash = {};
|
||||
|
||||
for (i=0 ; i<len/4 ; ++i)
|
||||
{
|
||||
unsigned long block = *(unsigned long*)buf;
|
||||
Blowfish_encipher(&hash.h32[i&1], &block);
|
||||
buf += 4;
|
||||
}
|
||||
|
||||
unsigned rem = len % 4;
|
||||
if (rem)
|
||||
{
|
||||
union
|
||||
{
|
||||
unsigned long b32;
|
||||
char b[4];
|
||||
} block = {0};
|
||||
for (j=0 ; j<rem ; ++j)
|
||||
block.b[j] = *(unsigned long*)buf;
|
||||
Blowfish_encipher(&hash.h32[i&1], &block.b32);
|
||||
}
|
||||
|
||||
return hash.h64;
|
||||
}
|
||||
|
|
@ -0,0 +1,265 @@
|
|||
const unsigned long BLOWFISH_P[] = {
|
||||
0xECE2997A,0x878D9BB6,0xBD99A37F,0x87CE5082,
|
||||
0x731DA749,0x8D1593C4,0x7759157C,0x64B420F3,
|
||||
0x16FE203E,0x8D5D0E1A,0x9F8BFD16,0xE50AAE06,
|
||||
0x6F69D85E,0x4A2B2E2C,0x6C6092F3,0x3E6E839C,
|
||||
0x7332BC74,0xEB9C5558,
|
||||
};
|
||||
const unsigned long BLOWFISH_S[] = {
|
||||
0x421D7293,0x2EC59345,0x9EACE875,0x4B558191,
|
||||
0xD37BEE4C,0x5D9A8E3C,0x21102E6F,0x478600F2,
|
||||
0xFCC4FA37,0x78D81A66,0xC1D6A5A6,0x5CF4D077,
|
||||
0x5B001183,0x6C6BF222,0xA1E6B437,0x25258DFC,
|
||||
0xB0B6A5C9,0xB922A022,0x6F599F11,0x33AC5389,
|
||||
0x0BD2CE8A,0xD2BF3D3B,0xEDB1971C,0xABFA231C,
|
||||
0x250CC0B4,0x1D8F3A1D,0x9CC9C373,0x470F5F5D,
|
||||
0xF1B26237,0x7CCECDEB,0xB2652840,0xC43C5DC7,
|
||||
0x52AB9291,0x3CA0F779,0x93C120E2,0x9657FE6C,
|
||||
0x18E28A36,0x38CBD5C3,0x91321972,0x143C8019,
|
||||
0x9A986345,0x089BC863,0x088D97D9,0x9AA5298F,
|
||||
0xBDB4C22E,0xFDDB607B,0x09F6200E,0xF4762B60,
|
||||
0x112068A4,0xC9C34AAA,0x1646AE14,0x3ED8ABC3,
|
||||
0x812F9820,0xBE8166F2,0x11992911,0x7E73D832,
|
||||
0xFFEEEB21,0x2914E308,0x52762303,0x3A1AAF59,
|
||||
0x6D684400,0x68CEEA3F,0x8020E74C,0x23932FD1,
|
||||
0x7F81C903,0x28D1DF23,0x47C6546F,0x10E9906D,
|
||||
0x2FC7E523,0x788B31B6,0xA34779FE,0xD4D3CBCB,
|
||||
0xA2669C45,0x160EE34B,0xEEC86439,0x01A68E02,
|
||||
0xC19122FA,0x47108632,0x5ED39396,0x3ACE13D8,
|
||||
0x1F6DA64C,0x8BDF89A4,0x0340FB9E,0x139DBCFF,
|
||||
0x5F975A6E,0x0BC71EE0,0x4BCD423F,0xD17F8EBD,
|
||||
0x9C32844C,0x231E2B4F,0x32764ECA,0x31A86FEB,
|
||||
0x510786F3,0xC3AD90C6,0x723A86FE,0x5B473CF0,
|
||||
0x0F1D8D3D,0xD53B2CD6,0x3EB4E682,0xB7F499B6,
|
||||
0x364C0FA9,0x8C6DFE24,0xEFDD8593,0x5A8C8FD9,
|
||||
0xFB09F4FF,0x755D8664,0x18172338,0xA730DF83,
|
||||
0x6D5CAF4D,0xE1AF6FC8,0x52A3A7C5,0xE92640C0,
|
||||
0x1D26389F,0xE6F81F9F,0x30EE4466,0xA9A2B2FD,
|
||||
0xDE5E9F8B,0x820D01C4,0x801A3EBF,0x868D144F,
|
||||
0xE19FD5CC,0xED5982B9,0x40788FA3,0x9D5D0603,
|
||||
0x2EBB28DA,0x6440756F,0x462528A1,0x180987F2,
|
||||
0xDCD71AC1,0x8322365A,0x3567ECAF,0x9C1AB502,
|
||||
0x3AFCB4C0,0x2D316F8D,0xF838B706,0x83D6167A,
|
||||
0xA8CA2242,0x92251B43,0xFB475A07,0xD6B84FF6,
|
||||
0xE6E545FF,0xED984921,0xE85F1731,0xAB95905C,
|
||||
0x139A180D,0xBDF6B63E,0x2E49C8D0,0x91E936B4,
|
||||
0xA5CD4333,0x6E4420B3,0x99846D33,0xBB6A36F2,
|
||||
0xBCC62D7E,0x83B9C684,0x4F1D67C9,0x6EEA5BE4,
|
||||
0xA5C1FBA9,0xD5903D0A,0x3A7D01A3,0xCEF6B09E,
|
||||
0x8A9038DD,0x6CC5D354,0xFC8E6BE9,0xC31EB29C,
|
||||
0xF6EB895D,0xBC5CC652,0x108FC0ED,0xBC4BD7C6,
|
||||
0xF5B247DA,0xC8B6DC25,0xA9AC3ABE,0x2472E65C,
|
||||
0x20C3DB8B,0xC3C2874F,0x86C09F29,0x3138F070,
|
||||
0x971005D9,0xC81A7769,0x16D7B065,0xD66B2E55,
|
||||
0xB85D5B2C,0xA3D31A82,0xB3EEA578,0xA813810E,
|
||||
0x070D1377,0xD445453D,0xC71D5128,0xC6BE1578,
|
||||
0xF08F6428,0xBB6A896D,0xC89AF5BE,0xC917210B,
|
||||
0x7285DFC4,0x68B5EA23,0x3EA24BC8,0x83F2EFA1,
|
||||
0x3C4F6B8C,0x709EF994,0x04468F7E,0x07F1E3E2,
|
||||
0xA4B6C9A8,0xECF2B777,0xD9583CA8,0x992DA6B4,
|
||||
0xCDB55EE2,0x7BCB7842,0xE7E9B318,0x43893D4A,
|
||||
0xFF8CC771,0xB9C65E4D,0xCCD233D1,0x5B394220,
|
||||
0x11655394,0xD093D599,0xD54CBED0,0xC39214C9,
|
||||
0x49BC9528,0xCD176E1D,0x953E5364,0x0245FBAC,
|
||||
0xA4CB8CD4,0x44DA688D,0xBEE0F8FD,0x34906411,
|
||||
0x29205E3A,0xBBF92030,0xDFEDC07A,0xF66F3C07,
|
||||
0x78FFC26D,0x7005FE9A,0x3BF5FE65,0x34CA0E22,
|
||||
0x51E859F8,0x73866086,0x025BA522,0xE1BF5A23,
|
||||
0xE9FBF06F,0x78630F0F,0x49D87ED6,0x1E4E522E,
|
||||
0xD7DAA554,0x73F897DA,0x7E837E88,0x19C4F285,
|
||||
0xEF5DCED2,0xBF4CBE2C,0x6B3C44ED,0x35197A88,
|
||||
0xC3021855,0x278FD11F,0x55854B29,0xA71A1A1D,
|
||||
0xFA3CBA9E,0x71A8DED1,0x04286C0D,0x51A31113,
|
||||
0xBF38301F,0x6A105725,0xE0FC3F53,0x79FC8C6F,
|
||||
0x0A8E94EB,0xF9598BE7,0xB53147A5,0x1867499F,
|
||||
0x77680751,0xDE9854A7,0x4E5B491C,0x8076EE6D,
|
||||
0xF800F274,0x3E027A2B,0x618E1D68,0x95E7D26A,
|
||||
0xE88DF5DA,0xDCA65187,0x706D9C25,0x3D32FFA6,
|
||||
0x26154F23,0x481661AC,0x1C9E7501,0x2668D7CA,
|
||||
0x29AE367B,0xAB1BCAB4,0x5956746C,0x408FB623,
|
||||
0x70FDA74D,0x267A3C22,0xCE245B56,0x6D46CBC5,
|
||||
0x3E9A1DBF,0xF4B14956,0x6433C3E9,0x2512F370,
|
||||
0x710A1269,0x45D25252,0x8F0E0035,0xE93E893F,
|
||||
0x059F0EF9,0xBAACE2BA,0x0442C220,0x4315F1FC,
|
||||
0xB46B7BC8,0xA9E5978D,0xB887DFE3,0x934F68B0,
|
||||
0xF5A3AD6D,0xFAF2A641,0x62E319A8,0xAA7BA0FC,
|
||||
0x97933E9F,0x905BA2A2,0x22698B3E,0x7C403613,
|
||||
0x48B91B6C,0x76D589C3,0xEA0AF0D9,0x254541E4,
|
||||
0x4C68FCA3,0x861A5BBD,0x0C3D2814,0x11410597,
|
||||
0x39B93083,0x9856F056,0xF9D62D99,0xBB857A8A,
|
||||
0xDCDE7FEE,0x854B8A34,0x11941383,0xE7A00321,
|
||||
0x59414DEF,0x4AD7291D,0x892FA9CA,0x08E8F54B,
|
||||
0x8DC5620A,0x2057BAC5,0xEF7A58AC,0x07A149C4,
|
||||
0xBA8F3C45,0x1D96D12B,0x9C66B748,0x95C5B4B7,
|
||||
0xED541CC2,0xA251536D,0xA4EDBB76,0x38604523,
|
||||
0x635E92E9,0xE5A2F89E,0x5B525EAD,0x5CA050C9,
|
||||
0x3C87A7A9,0x89070858,0x37152C1A,0xBAA2FE68,
|
||||
0x27033C24,0x50C19D69,0x965E070C,0x611C561F,
|
||||
0x4FB28DD1,0xEFFD2B22,0xC9FCD75C,0x82192997,
|
||||
0x0420F5A7,0x04B11929,0xF60465E3,0x988CCC21,
|
||||
0x8B2BA5A1,0x70421CF6,0x8D3A12B2,0x5A9245A6,
|
||||
0xC7F6141A,0xD7C28FF6,0xE8669164,0x60AD7642,
|
||||
0x918FB28A,0x7E44CA1E,0xA42DF8EE,0x06FD9F89,
|
||||
0x3EC461C1,0x588BB24A,0xD770532B,0xD3A71097,
|
||||
0x1BB81AFE,0xC824B481,0x488393DA,0x73C1E3AF,
|
||||
0x24B1C15E,0x48AAC468,0xBD55BEF3,0x9FC11E9D,
|
||||
0xEF2CE2FF,0xBD633C50,0x6FDE4D94,0x2C31F2F6,
|
||||
0x6EDD1BC0,0x43B3D5CB,0x21A9DE5A,0x3193CC6A,
|
||||
0x16604CA5,0x2A3C5050,0x32BAFA40,0x082E56AF,
|
||||
0x8A085A4D,0x4B278229,0xE2693335,0x4B94B79A,
|
||||
0xF1CF9999,0xF5674594,0x13FFC8AE,0x0FA8089D,
|
||||
0x77A8DADD,0x10352C72,0x84AD2262,0x3E9687B2,
|
||||
0x0F644F40,0xF84EB9FC,0x70F83CEC,0xC0014469,
|
||||
0x88BD4381,0x8697108F,0xC93D7C3A,0x7C328F90,
|
||||
0xBD14A599,0x435D6435,0xE73B4D63,0x80BCA793,
|
||||
0x1A08E670,0x173D780F,0x38890082,0xF728D66C,
|
||||
0x78AD5448,0x5848FAEF,0x28766E24,0x25B37D9B,
|
||||
0xDD7B5711,0x3061587B,0x7D7F9C69,0x26CDC35C,
|
||||
0x186E5105,0x63F6BACF,0x785FC8E2,0xB3D56F12,
|
||||
0x9B5EE2AE,0x37831B5D,0x4C24053A,0x4AFB1ED4,
|
||||
0x19C8E276,0xAFAB7962,0xB5B6EFBB,0xA845B632,
|
||||
0xDD267596,0xAE653EF6,0xDCBE94B5,0x8D2F32BD,
|
||||
0x986F8F0D,0x6812F0C5,0x2FD16C8A,0xA178342B,
|
||||
0x28F6453B,0xBB389EF4,0xAE4FEF56,0xAD769918,
|
||||
0xA255A773,0x11448CA8,0xA455382B,0xB1ACCBA6,
|
||||
0xD40C2707,0x01022D06,0x1260150F,0x03549650,
|
||||
0x875FF827,0x8848FD7F,0x5724F044,0x72AADBAA,
|
||||
0xD22038BF,0x4C632982,0xC05D490A,0xAD7C22F9,
|
||||
0xB5D81AED,0x87B3DCC8,0x6CA81B06,0x379475FC,
|
||||
0x82F94B61,0x188E3FF8,0x3105EE03,0x4C81B5C0,
|
||||
0xBCA1FE23,0x288C904F,0x67CAB301,0xCD839435,
|
||||
0xEDBC05E4,0x89F9CDA7,0x042A93A2,0xA27CD38E,
|
||||
0x2D56C211,0xE7AD278D,0x1C7E1D41,0xE7F7B82A,
|
||||
0x83EF848B,0xB0343EF5,0xD86DE0CE,0x8C887D41,
|
||||
0x633F4E48,0xB61E3116,0x8D381492,0x64EE8715,
|
||||
0xE9593093,0x932F8560,0x29BBF110,0x849DDDA2,
|
||||
0x72E4084F,0xE0E2FC14,0xD449B863,0x28949AA5,
|
||||
0x6F3F93DE,0x5610FD4B,0x6626E7E8,0x7ED92BBC,
|
||||
0xE5C54C68,0x7A21C8B4,0xCE7DF6AA,0x4E7E6D4D,
|
||||
0xE0C71068,0x07A0D021,0xBD93F36C,0x4FA001AF,
|
||||
0x9DF25F75,0xB1EEAAC2,0x272A3BEA,0x90F35536,
|
||||
0x5D2DF0F5,0x61862870,0x3A72E272,0xDA5C0E3C,
|
||||
0x58BEAA84,0x0C5D82BD,0xEE7B3142,0x1A2C7CF7,
|
||||
0xE166D9E9,0x8D210F18,0x9AFA021F,0x8CA402C4,
|
||||
0x07D5AABC,0xEE604E42,0xA083A093,0xA8025CA2,
|
||||
0xFF529528,0x2021CC44,0x858A6FFE,0x390E00AD,
|
||||
0x95F91CAB,0x94E28A82,0x015144A7,0x847B894A,
|
||||
0xB1459D0C,0x90EC6130,0xB193FCA7,0x5CF05C19,
|
||||
0xABE438AF,0x8633254E,0xDA173369,0x9929619F,
|
||||
0x43B1F909,0xEE249E40,0xC977654B,0x5CEEDE29,
|
||||
0x376AFD4E,0xA156EA63,0x2C52E11B,0x6321370A,
|
||||
0x5C37C873,0xD8B97243,0x5E306568,0x67AB98C7,
|
||||
0xF92A3D45,0x9CE53640,0xBFC0F799,0x780E7221,
|
||||
0x30240C05,0x53D4FC61,0x6F4F00A5,0x7019DCCE,
|
||||
0xD210665D,0xD4DE43BF,0xA0C4906D,0x9A959121,
|
||||
0x6B3C9A6E,0xDA6CA139,0xF0EC6479,0x1239DFE7,
|
||||
0xF849A1E1,0x642DD95D,0xF97F5545,0x9535790A,
|
||||
0x26226531,0xA38E6F02,0x093AD3A5,0x020955BB,
|
||||
0x7148D565,0xF63E8167,0xA55502C8,0x941EACF2,
|
||||
0xA23D89FF,0x7BE7C397,0x963BAD54,0x07D31203,
|
||||
0xA8C5CFD6,0x88998563,0x7070518A,0x0ADDE3B9,
|
||||
0x3CEEB1CF,0xA85CB4C1,0xEF6CE433,0xDE30E959,
|
||||
0x5767C0EC,0x6A410015,0x93AECAC8,0xE7D933B5,
|
||||
0x0BC4D71B,0xE52FA620,0xE5AC4224,0xEE189ED8,
|
||||
0x25370151,0x641D64B8,0x57EB26B0,0xCC035118,
|
||||
0xCE3AB51F,0xE74B4A3F,0x56400FCB,0xDA240998,
|
||||
0x795BBE06,0x0FE37753,0x58A8F106,0x0C4550EA,
|
||||
0xAC660A0C,0xC0360865,0x0F5A373F,0xFB77C558,
|
||||
0xABA1BE8C,0x3A60CB0F,0x5B4660CB,0xE2DCD316,
|
||||
0x7EDF11A4,0x8FB55220,0xFC3E3EA9,0x79A91FA3,
|
||||
0x72BA250C,0xF3F1FB10,0x06650DB7,0x4888875C,
|
||||
0x038B941D,0x0BC7CB8A,0xA558266A,0x8125270C,
|
||||
0xF9C6A655,0x97375314,0x3D5AC65E,0x7BF5B5FB,
|
||||
0x7DE1B472,0x8AD00491,0x23434745,0xF8C72F5A,
|
||||
0xA9E96818,0x877E8739,0xE129CE24,0x60016BDA,
|
||||
0xA589380F,0xE2A2136D,0xF28791E9,0x98023D6E,
|
||||
0x3F60A5B5,0xA2D81D0A,0x2B72C734,0xC2FED55D,
|
||||
0xBE72E7E4,0x75C4BE91,0x18000D47,0x44648EEE,
|
||||
0xBA5F98C3,0x8AFE6227,0x549FB360,0x0A5F91BC,
|
||||
0xB5FE7915,0x925145CC,0x60B52089,0x4F2775F9,
|
||||
0xF12E7521,0x5979EC96,0xB40C584C,0xD9079BFD,
|
||||
0x6E0087D3,0x75F304F3,0x4D8CF539,0xA9D5B761,
|
||||
0xC2B6C8AC,0xDB62C83F,0x478AD1F6,0x37F5D9E9,
|
||||
0x27312221,0x77D44C63,0xCDB8BC34,0x6DD03B96,
|
||||
0xFCA9A53E,0xF8748694,0x1DBB0972,0x3CF7831E,
|
||||
0x40B045D8,0xA7177F11,0x999409EE,0x737D5F7D,
|
||||
0xE7DD0A3E,0x5423FC7C,0x1947177E,0x2B1BD645,
|
||||
0xD81780D9,0x67ED703A,0x48E2E18E,0xC26EE041,
|
||||
0xDCE51290,0x1BC8E826,0x19BE2BBC,0xB5CB2246,
|
||||
0x33A54A14,0x3DEB0BDC,0xCD2FA6E2,0x5F1F261C,
|
||||
0xD95013C0,0x545F7DC8,0x11E3ECD4,0x48C36163,
|
||||
0x87417051,0x91CD5A84,0x4807B0AB,0x9C560515,
|
||||
0x33176BCD,0xA47CD74E,0x74C4CAE8,0xB988A1D9,
|
||||
0xE99E3134,0x6871F912,0x49918C65,0xAFA0FD31,
|
||||
0x5F62AB88,0x39375AE1,0x64665842,0x00AB4DFC,
|
||||
0x43F94B42,0xBDC0450F,0xD49520D0,0x6F215C70,
|
||||
0xF3EACBEA,0x6A0293B7,0x10ECE2FE,0x81BDFFC0,
|
||||
0x8DB5952A,0x19D8B352,0xFA341EB3,0x4038059D,
|
||||
0x8C351E18,0xB6E931C1,0xF2ED3ECA,0x384D0BD9,
|
||||
0xED004F2B,0x6F3A34B5,0x9F63CAEB,0xFC6ED801,
|
||||
0x67B611D7,0xB1729B09,0xF7F3FC13,0x3F45FC82,
|
||||
0x95B6F12B,0x798357F8,0xEC7005CF,0x9729BF68,
|
||||
0xFEB68AD6,0xE6214661,0xC79F2FC6,0x2A62FC00,
|
||||
0x952EE069,0xC324D73E,0xBB75D0B4,0x1B3C157A,
|
||||
0x138D6D37,0x7FD3535B,0x401F5BC4,0xFB6A17EE,
|
||||
0xDAA02563,0xC0D11734,0x4A14F41F,0xAFF1D9BD,
|
||||
0xD576BC77,0xE76E394D,0x999A7F72,0xB87637AC,
|
||||
0x4500E2FD,0x4DE46925,0x105B44BF,0xE7719951,
|
||||
0xB23F6608,0xDA09378B,0xE6785D14,0xB9D3D087,
|
||||
0x01E43279,0xE0E21827,0x61A78890,0x5430F676,
|
||||
0x3BEF316E,0xD5668DFC,0x5965785B,0x69756DE0,
|
||||
0x4D27188F,0x461A3E80,0xD0017994,0xD053E020,
|
||||
0x4C354799,0x743ACF50,0x512AC0D4,0xCB55EBFD,
|
||||
0x0884E3AE,0x3FA2346E,0x843E8966,0x38B8A818,
|
||||
0x82B70A21,0x140FB35D,0x2705F723,0x7D061F13,
|
||||
0x8CD668E6,0x657B5F87,0x8050CA9B,0x949857EE,
|
||||
0x2E79EA0F,0x4415B763,0xC289FEF4,0x41CE8F7A,
|
||||
0xDEE4FB69,0x38D698E1,0xEBCFAE8D,0xABB4B975,
|
||||
0xA6EFF066,0x19442C2B,0x823984F6,0xAD69E725,
|
||||
0x35B84874,0xBA7D95AC,0xE55CD936,0xA3B31928,
|
||||
0x1BC94FEA,0x1DB555A6,0x8D5685D6,0xE82FE735,
|
||||
0x05DD952A,0xEAD60A51,0xA8C23FD9,0x23E2F4B1,
|
||||
0x00BB7FCF,0x28D1785D,0xB9BA3917,0xE9309960,
|
||||
0x977DFE25,0xA27813A9,0xF77DDA48,0x92F1CDC9,
|
||||
0xB071A5A2,0xB72063B9,0x5ED69228,0xD7DFF757,
|
||||
0x9559F7E1,0xE10A8CD8,0xA3A2E8CE,0x37ACEC9A,
|
||||
0x327135A0,0xE2589B14,0x974450F0,0x5D20C609,
|
||||
0x84BEAD73,0x16DA4AA7,0x2A56C444,0x9383D8AE,
|
||||
0x87A85082,0xD6464389,0xD7F0E4FB,0x69E03B48,
|
||||
0x89FE2FBB,0xA3BB6B64,0xE2742F13,0x0CB318F5,
|
||||
0xA35B334E,0x9409122A,0x6A1AA74D,0xA66D37BD,
|
||||
0xFED04165,0x54AFC1D7,0xCAE9321A,0x6EBF1FCA,
|
||||
0xDBD82D9C,0xA6AF629A,0x020BE359,0xE489161E,
|
||||
0xE8D2E4CE,0xB8688AD8,0xB36D6260,0xE75B3F0D,
|
||||
0x3B1F2ED8,0x6A57437E,0x66AA1B5A,0x801F1985,
|
||||
0x12398344,0x1D76CB53,0x8B14271D,0x94EB5CD1,
|
||||
0x95BB6C11,0xAF29869F,0x8B0BD55F,0xDB4A96AC,
|
||||
0x5D76DBB8,0xB79B2BD2,0x1DE977D4,0x70C46079,
|
||||
0x158C4A11,0x2A27C18A,0x1279D53C,0x19B3494A,
|
||||
0x1D72B811,0xAA19F50D,0x83755185,0x07692F45,
|
||||
0xBC3C96DE,0x996C5C57,0x8D7FE502,0x9078A744,
|
||||
0x3F2E6EB8,0x47871BCC,0x745D634A,0xAAAC893E,
|
||||
0xF90A6979,0x33B84450,0xBB66F3E8,0xB1D3F872,
|
||||
0x5351A2E3,0x456026D2,0xBE493C68,0xEE1F2739,
|
||||
0x446A9AC8,0xA42D07B9,0x4C9D02A5,0x474E7675,
|
||||
0xA9A0C840,0x719E8295,0x7D2C9156,0xCEF602A5,
|
||||
0x0FBA9D12,0x37349207,0xC0F3C7C9,0xC513B94E,
|
||||
0x428067F3,0x6A73EC2A,0x1124068E,0x5C08C9B1,
|
||||
0x02A66533,0x9832196C,0x60317F5A,0x455A4886,
|
||||
0x9F7C495B,0x87BB6754,0xA686DA84,0x6E0DC2A1,
|
||||
0xB9548F8F,0xFE383139,0xCCFA6A55,0x15418A66,
|
||||
0x512918A4,0x60ED8CD0,0x0F556316,0xBBADA8D0,
|
||||
0xB1DB7D9F,0x2F0A9259,0x92FD3E34,0x636BC287,
|
||||
0x04C837D4,0xB30BB311,0x4AE4A9C8,0x6561A8C6,
|
||||
0xDE3E342B,0xB9DE12C4,0xA5AB0BF6,0x20A9FB0E,
|
||||
0xB669B1DD,0xCBFBBA85,0x264332EE,0x1CD28CC6,
|
||||
0x240CDDD3,0xBFBE7BA3,0x431A4A71,0xB55FC792,
|
||||
0x48E33646,0x4380FD82,0x9DF7FBBD,0xBC30DE31,
|
||||
0x3D950D25,0xA0775F51,0x8AE9F434,0xDCE3D490,
|
||||
0xF2EB87C3,0x0426BE6E,0xAAF40F97,0xD034EC8D,
|
||||
0x2AC4B781,0x1E382DE5,0xBB09F263,0x6100257E,
|
||||
0x82CCFE8A,0xF350DF77,0x86FA5CD4,0x2BF09255,
|
||||
0xEDD42D4D,0x812DEE18,0xCF47B5CF,0x8D059B5A,
|
||||
0x87BB31B3,0x6DFCA21B,0x69C60380,0x790FED88,
|
||||
0xAB68958B,0x9E3A1278,0x3A7A7D9D,0xD7FD6BF6,
|
||||
};
|
|
@ -0,0 +1,14 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
void Blowfish_encipher(unsigned long *xl, unsigned long *xr);
|
||||
void Blowfish_decipher(unsigned long *xl, unsigned long *xr);
|
||||
uint64_t Blowfish_hash(void* buf, size_t len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,9 @@
|
|||
TEMPLATE = lib
|
||||
CONFIG += staticlib
|
||||
TARGET = blowfish
|
||||
CONFIG -= Qt
|
||||
QT =
|
||||
|
||||
HEADERS += blowfish.h
|
||||
SOURCES += blowfish.c blowfish.dat.c
|
||||
|
|
@ -1,16 +1,104 @@
|
|||
import struct
|
||||
with open('BLOWFISH.DAT', 'rb') as fin:
|
||||
with open('BLOWFISH.DAT.c', 'w') as fout:
|
||||
fout.write('#include <stdlib.h>\n')
|
||||
fin.seek(0, 2)
|
||||
sz = fin.tell()
|
||||
fout.write('size_t BLOWFISH_DAT_SZ = %u;\n' % sz)
|
||||
fout.write('char BLOWFISH_DAT[] = {')
|
||||
fin.seek(0)
|
||||
rb = fin.read(1)
|
||||
for i in range(sz):
|
||||
if not i%10:
|
||||
|
||||
P = []
|
||||
S = []
|
||||
|
||||
def F(x):
|
||||
d = x & 0x00FF
|
||||
x >>= 8
|
||||
c = x & 0x00FF
|
||||
x >>= 8
|
||||
b = x & 0x00FF
|
||||
x >>= 8
|
||||
a = x & 0x00FF
|
||||
#y = ((S[0][a] + S[1][b]) ^ S[2][c]) + S[3][d];
|
||||
y = S[0][a] + S[1][b]
|
||||
y = y ^ S[2][c]
|
||||
y = y + S[3][d]
|
||||
|
||||
return y
|
||||
|
||||
def bfencipher(xl, xr):
|
||||
Xl = xl
|
||||
Xr = xr
|
||||
|
||||
for i in range(16):
|
||||
Xl = Xl ^ P[i]
|
||||
Xr = F(Xl) ^ Xr
|
||||
|
||||
temp = Xl
|
||||
Xl = Xr
|
||||
Xr = temp
|
||||
|
||||
temp = Xl
|
||||
Xl = Xr
|
||||
Xr = temp
|
||||
|
||||
Xr = Xr ^ P[16]
|
||||
Xl = Xl ^ P[16+1]
|
||||
|
||||
return Xl&0xffffffff, Xr&0xffffffff
|
||||
|
||||
key = bytearray()
|
||||
with open('hecl_key', 'r') as keyin:
|
||||
b = keyin.read(2)
|
||||
while len(b):
|
||||
if len(b) != 2:
|
||||
break
|
||||
key += struct.pack('B', int(b, 16))
|
||||
b = keyin.read(2)
|
||||
|
||||
if len(key) < 8:
|
||||
raise RuntimeError('key must be at least 8 bytes in length')
|
||||
|
||||
with open('blowfish.dat', 'rb') as fin:
|
||||
word = fin.read(4)
|
||||
for i in range(18):
|
||||
P.append(struct.unpack(">I", word)[0])
|
||||
word = fin.read(4)
|
||||
for i in range(4):
|
||||
sub = []
|
||||
for j in range(256):
|
||||
sub.append(struct.unpack(">I", word)[0])
|
||||
word = fin.read(4)
|
||||
S.append(sub)
|
||||
|
||||
j = 0
|
||||
for i in range(18):
|
||||
data = 0x00000000
|
||||
for k in range(4):
|
||||
data = (data << 8) | key[j]
|
||||
j = j + 1
|
||||
if j >= len(key):
|
||||
j = 0
|
||||
P[i] = P[i] ^ data
|
||||
|
||||
datal = 0x00000000
|
||||
datar = 0x00000000
|
||||
|
||||
for i in range(9):
|
||||
datal, datar = bfencipher(datal, datar)
|
||||
P[i*2] = datal
|
||||
P[i*2+1] = datar
|
||||
|
||||
for i in range(4):
|
||||
for j in range(128):
|
||||
datal, datar = bfencipher(datal, datar)
|
||||
S[i][j*2] = datal
|
||||
S[i][j*2+1] = datar
|
||||
|
||||
with open('blowfish.dat.c', 'w') as fout:
|
||||
fout.write('const unsigned long BLOWFISH_P[] = {')
|
||||
for i in range(18):
|
||||
if not i%4:
|
||||
fout.write('\n ')
|
||||
fout.write('0x%02X,' % struct.unpack("B", rb)[0])
|
||||
rb = fin.read(1)
|
||||
fout.write('\n0x0};\n')
|
||||
fout.write('0x%08X,' % P[i])
|
||||
fout.write('\n};\n')
|
||||
fout.write('const unsigned long BLOWFISH_S[] = {')
|
||||
for i in range(4):
|
||||
for j in range(256):
|
||||
if not (i*256+j)%4:
|
||||
fout.write('\n ')
|
||||
fout.write('0x%08X,' % S[i][j])
|
||||
fout.write('\n};\n')
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
CA75FA1170DABBAD00BADD00D5B00B51
|
|
@ -17,8 +17,10 @@ HEADERS += \
|
|||
|
||||
SUBDIRS += \
|
||||
extern/sqlite3 \
|
||||
extern/blowfish \
|
||||
lib \
|
||||
driver
|
||||
|
||||
lib.depends = extern/sqlite3
|
||||
driver.depends = extern/sqlite3
|
||||
driver.depends = extern/blowfish
|
||||
driver.depends = lib
|
||||
|
|
Loading…
Reference in New Issue