{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

applied cryptography - protocols, algorithms, and source code in c

a08 a116 a016 a18

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Xl = Xr; Xr = temp; } temp = Xl; Xl = Xr; Xr = temp; Xr = Xr ^ c–>P[N]; Xl = Xl ^ c–>P[N + 1]; *xl = Xl; *xr = Xr; } void Blowfish_decipher(blf_ctx *c, 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 ^ c–>P[i]; Xr = F(c,Xl) ^ Xr; /* Exchange Xl and Xr */ temp = Xl; Xl = Xr; Xr = temp; } /* Exchange Xl and Xr */ temp = Xl; Xl = Xr; Xr = temp; Xr = Xr ^ c–>P[1]; Xl = Xl ^ c–>P[0]; *xl = Xl; *xr = Xr; } short InitializeBlowfish(blf_ctx *c, char key, short keybytes) { short i; short j; short k; short error; short numread; unsigned long data; unsigned long datal; unsigned long datar; unsigned long ks0 = { 0xd1310ba6, 0x98dfb5ac, 0xba7c9045, 0xf12c7f99, 0x636920d8, 0x71574e69, 0x718bcd58, 0x82154aee, 0xc5d1b023, 0x286085f0, 0x6c9e0e8b, 0xb01e8a3e, 0xe65525f3, 0xaa55ab94, 0x2ffd72db, 0x24a19947, 0xa458fea3, 0x7b54a41d, 0xca417918, 0xd71577c1, 0x57489862, 0xd01adfb7, 0xb3916cf7, 0xf4933d7e, 0xc25a59b5, 0xb8db38ef, 0xbd314b27, 0x63e81440, 0xb8e1afed, 0×0801f2e2, 0×0d95748f, 0x9c30d539, 0x8e79dcb0, 0x78af2fda, 0x55ca396a, 0x6a267e96, 0x858efc16, 0x728eb658, 0x2af26013, 0x603a180e, 0x55605c60, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, 0x2ba9c55d, 0x741831f6, 0x7a325381, 0x28958677, 0x61d809cc, 0xfb21a991, 0xdc262302, 0xeb651b88, 0x2e0b4482, 0xa4842004, 0x670c9c61, 0xabd388f0, 0x6eef0b6c, 0x137a3be4, 0x66ca593e, 0x82430e88, 0xe06f75d8, 0x85c12073, 0x1bfedf72, 0x429b023d, 0×075372c9, 0x80991b7b, 0x976ce0bd, 0×04c006ba, 0x68fb6faf, 0x3e6c53b5, 0xcc814544, 0xaf5ebd09, 0xc0cba857, 0x45c8740f, 0xd6a100c6, 0x402c7279, 0x3c7516df, 0xfd616b15, 0x53317b48, 0x3e00df82, 0xd542a8f6, 0x287effc3, 0xe1ffa35d, 0xb8f011a0, 0x9a53e479, 0xb6f84565, 0x62fb1341, 0xcee4c6e8, 0x95dbda4d, 0xae909198, 0x8e3c5b2f, 0x8e7594b7, 0x4fad5ea0, 0x688fc31c, 0xea752dfe, 0x8b021fa1, 0xb4a84fe0, 0xfd13e0b7, 0x93cc7314, 0x211a1477, 0xebcdaf0c, 0x7b3e89a0, 0x226800bb, 0x57b8e0af, 0x78c14389, 0xd95a537f, 0x11c81968, 0x4e734a41, 0xd60f573f, 0xbc9bc6e4, 0xf296ec6b, 0x2a0dd915, 0x53b02d5d, 0xa99f8fa1, unsigned long ks1 = { 0x4b7a70e9, 0xb5b32944, 0x9cee60b8, 0x8fedb266, 0x193602a5, 0x75094c29, 0x6b8fe4d6, 0x99f73...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online