This procedure is divided into two parts, the first part is the main program, and the other part is the library.
In this program, INT [] represents the 2-way form of char, such as 'a' = int [8] {0, 1, 1, 0, 0, 0, 1}
The following subprogramme this program passes at C # 2005. .
#Region Using Directives
Using system.collections.gener; using system.data; using system.drawing; using system.windows.form; using system.io; #ndregion
namespace DES_2nd {partial class Form1: Form {public Form1 () {InitializeComponent ();} Func.Func F = new Func.Func (); // initialize the library private void button1_Click (object sender, EventArgs e) {char [] Tempmchar = mbox.text.tochararray (); // Original plain text int mod = TempmChar.Length% 8; // Extension Flaming is 8 multiples CHAR [] mchar = new char [TempmChar.Length (8 - MOD)]; For (int i = 0; i Char [] kchar = kbox.text.tochararray (); // Get 64-bit key char [] cchar = new char [mchar.length]; // Initialization ciphertext number group Int [] [] keys = f.makekey (kchar); // calculate 16 48-bit key INT DIV = mchar.length / 8 by the makeKey function by the Makekey function; // For a set of places Group IF (mChar.Length% 8)! = 0) DIV = 1; char [] [] Divmchar = new char [div] []; // stores the plain text for "文" i ) {div Mchar [i] = new char [8]; divmhar [i] [0] = mchar [i * 8 0]; divmhar [i] [1] = mchar [i * 8 1]; divmhar [ I] [2] = mchar [i * 8 2]; divmadhar [i] [3] = mchar [i * 8 3]; divmhar [i] [4] = mchar [i * 8 4]; Divmchar [i] [5] = mchar [i * 8 5]; divmadhar [i] [6] = mchar [i * 8 6]; divmadhar [i] [7] = mchar [i * 8 7]; } Int [] [] Divcint = new int [div] []; // Get the packet encrypted packet ciphertext binary form for (int i = 0; i // Transform 2 en-ciphertext into Char ciphertext for (int i = 0; i Private void button2_click (object sender, evenetargs e) {// Initialization int [] cint = new int [64]; char [] kchar = kbox.text.tocharRay (); int [] kint = new int [56]; / / Or 16 key int [] [] keys = f.makekey (kchar); // From file deserialization or denominating CHAR form FILESTREAM FS = New FileStream (Sourse.Text, Filemode.Openorcreate, FileAccess. Read); System.Runtime.Serialization.formatters.Binary.BinaryFormatter Bf = new system.Runtime.Serialization.formatters.binary.binaryFormatter (); char [] cchar = (char []) bf.deserialize (fs); char [ ] mchar = new char [cchar.length]; // Each 8-bit group of group ciphertext INT DIV = cchar.length / 8; if (cchar.length% 8)! = 0) DIV = 1; char [ ] [] DivcChar = new char [div] []; for (int i = 0; i F.DES_1 (Keys, Divchar [I]);} // Combined in the plaintext 2 enrollment form int [] mint = new int = new int [div * 64]; for (int i = 0; i } The following is a library #Region Using Directives Using system.collections.generic; use system.text; #ndregion Namespace FUNC / / Function Library {public class func {// ip replacement public int [] ip (char [] mchar) {int [] mint = new int [64]; int [] mreturn = new int [64]; for (INT i = 0; i // Replacement table MRETURN [0] = mint [57]; mreturn [1] = mint [49]; mreturn [2] = mint [41]; MRETURN [3] = mint [33]; MRETURN [4] = MINT [25]; MRETURN [5] = mint [17]; MRETURN [6] = mint [9]; MRETURN [7] = mint [1]; MRETURN [8] = MINT [59]; MRTURN [9] = MINT [51]; MRETURN [10] = mRret [43]; MRETURN [11] = mint [35]; MRETURN [12] = Mint [27]; MRETURN [13] = mint [19]; MReturn [14] = MINT [11]; MRETURN [15] = MINT [3]; MRETURN [16] = Mint [61]; MRETURN [17] = MINT [53]; MRETURN [18] = MINT [45]; MRETURN [19] = Mint [37]; MRETURN [20] = mRret [29]; MRETURN [21] = MINT [21]; MRETURN [22] = MINT [13]; MRETURN [23] = MINT [5]; MRETURN [24] = MINT [63]; MRETURN [25] = mRret [55]; MRETURN [26] = MINT [47]; MRETURN [27] = mint [39]; MRETURN [28] = MINT [31]; MRETURN [29] = MINT [23]; MRETURN [30] = Mint [15]; MRETURN [31] = MINT [7]; MRETURN [32] = MINT [56]; MRETURN [33] = mint [48]; MRETURN [34] = MINT [40]; MRETURN [35] = MINT [32]; MRETURN [36] = MINT [24]; M Return [37] = mint [16]; MRETURN [38] = MINT [8]; MRETURN [39] = MINT [0]; MRETURN [40] = MINT [58]; MRETURN [41] = MINT [50]; MRETURN [42] = Mint [42]; MRETURN [43] = MINT [34]; MRETURN [44] = MINT [26]; MRETURN [45] = mint [18]; MRETURN [46] = MINT [10]; MRTURN [47] = MINT [2]; MRETURN [48] = MINT [60]; MRETURN [49] = MINT [52]; MRETURN [50] = MINT [44]; MRETURN [51] = MINT [36]; MRTURN [52] = Mint [28]; MRETURN [53] = MINT [20]; MRETURN [54] = MINT [12]; MRETURN [55] = MINT [4]; MRETURN [56] = Mint [62]; MRETURN [57]; MRETURN [58] = MINT [46]; MRETURN [59] = MINT [38]; MRETURN [60] = MINT [30]; MRETURN [61] = Mint [22]; MRETURN [62] = MINT [14]; MRETURN [63] = MINT [6]; RETURN MRETURN;} // IP-1 Displacement Public INT [] ip_1 (int [] mchar) {// Replacement Table INT [] ipreturn = new int [64]; ipreturn [0] = mchar [39]; ipreturn [1] = mchar [7]; ipreturn [2] = mchar [47]; ipreturn [3] = mchar [15 ]; Ipreturn [4] = mchar [55]; ipreturn [5] = mchar [23]; ipreturn [6] = mchar [63]; ipreturn [7] = mchar [31]; ipreturn [8] = mchar [38 ]; Ipreturn [9] = mchar [6]; ipreturn [10] = mchar [46]; ipreturn [11] = mchar [14]; ipreturn [12] = mchar [54]; ipreturn [13] = mchar [22 ]; IPRETURN [14] = mchar [62]; ipreturn [15] = mchar [30]; ipreturn [16] = mchar [37]; ipreturn [ 17] = mchar [5]; ipreturn [18] = mchar [45]; ipreturn [19] = mchar [13]; ipreturn [20] = mchar [53]; ipreturn [21] = mchar [21]; ipreturn [ 22] = mchar [61]; ipreturn [23] = mchar [29]; ipreturn [24] = mchar [36]; ipreturn [25] = mchar [4]; ipreturn [26] = mchar [44]; ipreturn [ 27] = mchar [12]; ipreturn [28] = mchar [52]; ipreturn [29] = mChar [20]; ipreturn [30] = mchar [60]; ipreturn [31] = mchar [28]; ipreturn [ 32] = mchar [35]; Ipreturn [33] = mchar [3]; ipreturn [34] = mchar [43]; ipreturn [35] = mchar [11]; ipreturn [36] = mchar [51]; ipreturn [37] = mchar [19]; Ipreturn [38] = mchar [59]; ipreturn [39] = mchar [27]; ipreturn [40] = mchar [34]; ipreturn [41] = mchar [2]; ipreturn [42] = mchar [42]; Ipreturn [43] = mchar [10]; ipreturn [44] = mchar [50]; ipreturn [45] = mchar [18]; ipreturn [46] = mchar [58]; ipreturn [47] = mchar [26]; Ipreturn [48] = mchar [33]; ipreturn [49] = mchar [1]; ipreturn [50] = mchar [41]; ipreturn [51] = mchar [9]; ipreturn [52] = mchar [49]; Ipreturn [53]; ipreturn [54] = mchar [57]; ipreturn [55] = mchar [25]; ipreturn [56] = mchar [32]; ipreturn [57] = mchar [0]; Ipreturn [58] = mchar [40]; ipreturn [59] = mchar [8]; ipretur N [60] = mchar [48]; ipreturn [61] = mchar [16]; ipreturn [62] = mchar [56]; ipreturn [63] = mchar [24]; return ipreturn;} // by 64-bit original Key calculation 16 48-bit key public int [] makekey (char [] kchar) {// 16-digit array stores 16 output key int [] [] Keyreturn = new int [16] []; int [] Temp = new int [64]; int [] kint = new int [= new int [28]; int [] d0 = new int [28]; int [] c16 = new int rt[N [28]; int [] D1 = new int [28]; int [] c1 = new int [28]; int [] D2 = new int [28]; INT [] C2 = new int [28]; int []; int [] c3 = new int [28]; int [] D4 = new int [28]; int [] c4 = new INT [28]; int [28]; int [] c5 = new int [28]; int [] D6 = new int [28]; int [] c6 = new int =; int [28]; int [] D7 = new int [28]; int [] c7 = new int [28]; int [] D8 = new int [28]; int [] c8 = new int [28]; int [] d9 = new int = new int = [28]; int [] c9 = new int [= new int [28]; int [] c10 = new int [28]; int [] D11 = new int [28]; int [ ] C11 = new int [28]; int [] D12 = new int [28]; int [] c12 = new int [28]; int [] D13 = new int [28]; int [] c13 = new int = new int = 28]; int [] D14 = new int [28]; int [] c14 = new int [28]; int [] D15 = new int [28]; int [] c15 = new int [28]; int [] D16 = new int [28]; int [] k1 = new int [48]; int [】 K2 = new int [48]; int [] k3 = new int [48]; int [] k4 = new int = ]; int [] k5 = new int [48]; int [] k6 = new int [48]; int [] k7 = new int [48]; int [] k8 = new int [48]; int [] k9 = new int [48]; int [] k10 = new int [48]; int [] k11 = new INT [48]; int []; int [] k13 = new int [48]; int [] k14 = new int [48]; int [] k15 = new int [48]; int [ [] k16 = new int [48]; // Get the original key 2 in form for (INT i = 0; I IF ((kchar [i] & 0x20)! = 0) TEMP [i * 8 2] = 1; if ((kchar [i] & 0x10)! = 0) TEMP [i * 8 3] = 1; IF ((kchar [i] & 0x8)! = 0) TEMP [i * 8 4] = 1; if ((kchar [i] & 0x4)! = 0) TEMP [i * 8 5] = 1; IF ((kchar [i] & 0x2)! = 0) TEMP [i * 8 6] = 1; if ((kchar [i] & 0x1)! = 0) TEMP [i * 8 7] = 1; } // remove 7. . 15. . . . . 63 奇 校 检 检 校 校 校;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [4] = Temp [24]; Kint [5] = Temp [16]; Kint [6] = Temp [8]; Kint [7] = Temp [0]; Kint [8] = Temp [57]; kint [9] = Temp [49]; Kint [10] = Temp [41]; Kint [11] = Temp [33]; KINT [12] = Temp [25]; Kint [13] = Temp [17]; KINT [14] = Temp [9]; Kint [15] = Temp [1]; Kint [16] = Temp [58]; Kint [17] = Temp [50]; Kint [18] = Temp [42]; Kint [19] = Temp [34]; Kint [20] = Temp [26]; Kint [21] = Temp [18]; Kint [22] = Temp [10]; Kint [23] = Temp [2]; Kint [24] = TEMP [59]; Kint [25] = Temp [51]; Kint [26] = Temp [43]; Kint [27] = Temp [35]; Kint [28] = Temp [62]; KINT [29] = Temp [54]; KINT [30] = Temp [46]; Kint [31]; Kint [32] = Temp [30]; Kint [33] = Temp [22]; Kint [34] = TEMP [14]; Kint [35] = Temp [6]; Kint [36] = Temp [61]; Kint [37] = Temp [53]; Kint [38] = Temp [45]; Kint [39] = Temp [37]; Kint [40] = TEMP [29]; Kint [41] = Temp [21]; Kint [42] = Temp [13]; Kint [43] = Temp [5]; Kint [44] = Temp [60]; Kint [45] = TEMP [52]; Kint [46] = Temp [44]; Kint [47] = Temp [36]; KINT [48] = Temp [28]; Kint [49] = Temp [20]; Kint [50] = Temp [12]; Kint [51] = Temp [4]; Kint [52] = Temp [27]; kint [53] = Temp [19]; Kint [54] = Temp [11]; Kint [55] = Temp [3]; // Packet 56-bit key is 2 portions for (int i = 0; i <28; i ) {c0 [i] = kint [i]; d0 [i] = kint [i 28];} // loop left shift 1 bit for (int i = 1; i <28; i ) {C1 [i - 1] = C0 [i]; D1 [i - 1] = D0 [i];} C1 [27] = C0 [0]; D1 [27] = D0 [0]; // Cycle left shift 1 bit for (int i = 1; i <28; i ) {C2 [i - 1] = C1 [i]; D2 [i - 1] = D1 [i];} C2 [27] = C1 [0]; D2 [27] = D1 [0]; // Cycle left shift 2 bits for (int i = 2; i <28; i ) {C3 [i - 2] = C2 [i]; D3 [i - 2] = D2 [i];} c3 [26] = C2 [0]; C3 [27] = C2 [1]; D3 [26] = D2 [0]; D3 [27] = D2 [1]; // Cycle left shift 2 bits for (int i = 2; i <28; i ) {C4 [i - 2] = C3 [ I];} C4 [26] = C3 [0]; C4 [27] = C3 [1]; for (int I = 2; I <28; i ) {D4 [i - 2] = D3 [i]; } D4 [26] = D3 [0]; D4 [27] = D3 [1]; // Cycle left shift 2 bits for (int i = 2; i <28; i ) {c5 [i - 2] = C4 [I];} C5 [26] = C4 [0]; C5 [27] = C4 [1]; for (int i = 2; i <28; i ) {d5 [i - 2] = D4 [i] } D5 [26] = D4 [0]; D5 [27] = D4 [1]; // cycle left shift 2 bits for (int i = 2; i <28; i ) {C6 [i - 2] = C5 [i];} C6 [26] = C5 [0]; C6 [27] = C5 [1]; for (int i = 2; i <28; i ) {d6 [i - 2] = D5 [i ]; D6 [26] = D5 [0]; D6 [27] = D5 [1]; // Cycle left shift 2 bits for (INT i = 2; I <28; i ) {C7 [i - 2] = C6 [i];} C7 [26] = C6 [0]; c7 [27] = C6 [1]; for (int i = 2; i <28; i ) {D7 [i - 2] = D6 [i];} D7 [26] = D6 [0] ; D7 [27] = D6 [1]; // Cycle left shift 2 bits for (int i = 2; i <28; i ) {c8 [i - 2] = C7 [i];} c8 [26] = C7 [0]; C8 [27] = C7 [1]; for (int i = 2; i <28; i ) {d8 [i - 2] = D7 [i];} D8 [26] = D7 [0]; D8 [27 ] = D7 [1]; // Cycle left shift 1 bit for (int i = 1; i <28; i ) {c9 [i - 1] = C8 [i];} c9 [27] = c8 [0] ; Int i = 1; i <28; i ) {D9 [i - 1] = D8 [i];} D9 [27] = D8 [0]; // loop left shift 2 bits for (int i = 2; i <28; i ) {C10 [i - 2] = c9 [i];} C10 [26] = C9 [0]; C10 [27] = C9 [1]; for (int i = 2; I <28; i ) {d10 [i - 2] = D9 [i];} D10 [26] = D9 [0]; D10 [27] = D9 [1]; // cycle left shift 2 bits for (int I = 2; I <28; i ) {C11 [i - 2] = C10 [i];} C11 [26] = C10 [0]; C11 [27] = C10 [1]; for (int I = 2; I <28; i ) {D11 [i - 2] = D10 [i];} D11 [26] = D10 [0]; D11 [27] = D10 [1]; // cycle left shift 2 bits for (int i = 2; i < 28; i ) {C12 [i - 2] = C11 [i];} C12 [26] = C11 [0]; C12 [27] = C11 [1]; for (int i = 2; i <28; i ) ) {D12 [i - 2] = D11 [i];} D12 [26] = D11 [0]; D12 [27] = D11 [1]; // Cycle left shift 2 bits for (int i = 2; i <28; i ) {C13 [i - 2] = C12 [i];} C13 [26] = C12 [0]; C13 [27] = C12 [1]; for (int I = 2; i <28; i ) {D13 [i - 2] = D12 [i];} D13 [26] = D12 [0]; D13 [27] = D12 [1] ; // cycle left shift 2 bits for (int i = 2; I <28; i ) {C14 [i - 2] = C13 [i];} C14 [26] = C13 [0]; C14 [27] = C13 [1]; for (int i = 2; I <28; i ) {D14 [i - 2] = D13 [i];} D14 [26] = D13 [0]; D14 [27] = D13 [1 ]; // Cycle left shift 2 bits for (int i = 2; i <28; i ) {C15 [i - 2] = C14 [i];} C15 [26] = C14 [0]; C15 [27] = C14 [1]; for (int i = 2; I <28; i ) {D15 [i - 2] = D14 [i];} D15 [26] = D14 [0]; D15 [27] = D14 [1]; // Cycle left shift 1 bits for (int i = 1; i <28; i ) {C16 [i - 1] = C15 [i];} C16 [27] = C15 [0]; for (INT i = 1; I <28; i ) {D16 [i - 1] = D15 [i];} D16 [27] = D15 [0]; // Merge CI, DI and by PC2 replacement calculation final 16 Key K1 = PC2 (C1, D1); K2 = PC2 (C2, D2); K3 = PC2 (C3, D3); K4 = PC2 (C4, D4); K5 = PC2 (C5, D5); K6 = PC2 (C6, D6); K7 = PC2 (C7, D7); K8 = PC2 (C8, D8); K9 = PC2 (C9, D9); K10 = PC2 (C10, D10); K11 = PC2 (C11, D11 ); K12 = PC2 (C12, D12); K13 = PC2 (C13, D13); K14 = PC2 (C14, D14); K15 = PC2 (C15, D15); K16 = PC2 (C16, D16); KeyReturn [0 ] = (int []) k1.clone (); keyreturn [1] = (int []) k2.clone (); keyreturn [2] = (int []) K3.Clone (); keyreturn [3] = (int []) k4.clone (); keyreturn [4] = (int []) K5.Clone (); keyreturn [5] = (int []) k6.clone (); keyreturn [6] = (int " []) K7.Clone (); keyreturn [7] = (int []) K8.Clone (); keyreturn [8] = (int []) k9.clone (); keyreturn [9] = (int [] K10.Clone (); keyreturn [10] = (int []) k11.clone (); keyreturn [11] = (int []) k12.clone (); keyreturn [12] = (int []) K13 .Clone (); Keyreturn [13] = (int []) k14.clone (); keyreturn [14] = (int []) k15.clone (); Keyreturn [15] = (int []) k16.clone (); Return Keyreturn; } // PC2 replacement public int [] pc2 (int [] c, int [] d) {int [] temp = new int [56]; int [] k = new int [48]; // Merge CI and DI For (int i = 0; i <28; i ) {TEMP [i] = C [i]; TEMP [i 28] = d [i]; // Replacement table k [0] = Temp [13]; K [1] = Temp [16]; K [2] = Temp [10]; k [3] = temp [23]; k [4] = Temp [0]; k [5] = Temp [4]; k [6] = Temp [2]; K [7] = Temp [27]; K [8] = temp [14]; k [9] = Temp [5]; k [10] = Temp [20]; k [11] = Temp [9]; k [12] = temp [22]; k [13] = temp [18]; k [14] = Temp [11]; k [15] = Temp [3]; k [16] = Temp [25]; K [17] = Temp [7]; k [18] = temp [15]; k [19] = Temp [6]; k [20] = Temp [26]; K [21] = Temp [19]; k [22] = Temp [12]; k [23] = temp [1]; k [24] = Temp [40]; k [25] = Temp [51]; k [26] = Temp [30]; k [27] = temp [36]; k [28] = Temp [46]; k [29] = Temp [54]; k [30] = Temp [29]; k [31] = Temp [39]; k [32] = Temp [50]; k [33] = temp [44]; k [34] = Temp [32] K [35] = Temp [47]; K [36] = Temp [43]; K [37] = Temp [48]; K [38] = Temp [38]; K [39] = Temp [55] K [40] = Temp [33]; K [41] = Temp [52]; K [42] = Temp [45]; K [43] = Temp [41]; K [44] = Temp [49] K [45] = Temp [35]; K [46] = Temp [28]; K [47] = Temp [31]; RETURN K;} // e expansion 32-bit expressions 2 enrichment forms to 48 Public int [] e (int [] r) {INT i; int [] AfTERE = New Int [48]; Aftere [0] = r [31]; for (i = 1; i <= 5; i ) {after [i] = r [i - 1];} for (i = 6; i <= 11; i ) {After [i] = r [i - 3];} for (i = 12; i <= 17; i ) {after [i] = r [i - 5];} for (i = 18; i <= 23; i ) {after [i] = r [i - 7];} for (i = 24; i <= 29; i ) {after [i] = r [i - 9];} for (i = 30 i <= 35; i ) {after [i] = r [i - 11];} for (i = 36; i <= 41; i ) {afre [i] = r [i - 13];} for (i = 42; i <= 46; i ) {after [i] = r [i - 15];} Aftere [47] = r [0]; returnific;} // g function public int [] g ( INT [] r, int [] k) {int [] AfTERE = E (R); // Out of expansion // e expansion, the initialization INT [] m1 = new int [6]; int [] m4 = new int [6]; int [] m2 = new int [6]; int [] m2 = new int [6]; int [] m2 = new int = new int [6]; int [] m2 = new int [6]; int [] m2 = new int [6]; int [] m2 = new int [6]; int [] m2 = new INT [6]; int [6]; int [] m8 = new int [6]; int [] m3 = new int [6]; int [] m6 = new int [6]; / / ]文 = 初 初 初 = = =;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4]; int [] Afters3 = new int [4]; int [] after7 = new int [4]; Int [] after 4 = new int [4]; int []Afters8 = new int [4]; int [] AFTERS = new int [32]; int [] Greturn = new int [32]; int Temp; // e After expanding, it is clear and key different or for (int i = 0; i <48; i ) {if (after [i]! = K [i]) after [i] = 1; else offere [i] = 0; } // Packets of FOR (INT i = 0; I <6; i ) {m1 [i] = afre [i]; m2 [i] = afre [i 6]; m3 [i] = afre [i 12]; M4 [i] = afre [i 18]; M5 [i] = afre [i 24]; m6 [i] = afre [i 30]; m7 [i] = afre [i 36 ]; M8 [i] = afre [i 42]; //6 The monographs have been outputted by the S-box after the S-box, and the respective output is an after ...Afters8 Temp = GETS (M1, 1); if ((Temp & 0x8)! = 0) AfTers1 [0] = 1; IF ((Temp & 0x4)! = 0) AFTERS1 [1] = 1; IF ((Temp & 0x2)! = 0) AfTers1 [2] = 1; IF ((Temp & 0x1)! = 0) Afters1 [3] = 1; Temp = GETS (M2, 2); if ((Temp & 0x8)! = 0) AFTERS2 [0] = 1; IF ((Temp & 0x4)! = 0) AfTers2 [1] = 1; IF ((Temp & 0x2 )! = 0) antes2 [2] = 1; if ((Temp & 0x1)! = 0) AfTers2 [3] = 1; Temp = Gets (M3, 3); if ((Temp & 0x8)! = 0) AfTers3 [0] = 1; IF ((Temp & 0x4)! = 0) AfTers3 [1] = 1; IF ((Temp & 0x2)! = 0) AfTers3 [2] = 1; IF ((Temp & 0x1) ! = 0) AfTers3 [3] = 1; Temp = Gets (M4, 4); IF ((Temp & 0x8)! = 0) AfTers4 [0] = 1; IF ((Temp & 0x4)! = 0) AfTers4 [1] = 1; IF (Temp & 0x2)! = 0) AfTers4 [2] = 1; IF ((Temp & 0x1)! = 0) AfTers4 [3] = 1; Temp = Gets (M5, 5) ; IF ((Temp & 0x8)! = 0) AFTERS5 [0] = 1; IF ((Temp & 0x4)! = 0) AfTers5 [1] = 1; IF ((Temp & 0x2)! = 0) Afters5 [2 ] = 1; IF ((Temp & 0x1)! = 0) AfTers5 [3] = 1; Temp = Gets (M6, 6); IF ((Temp & 0x8)! = 0) AfTers6 [0] = 1; if ((Temp & 0x4)! = 0) AfTers6 [1] = 1; IF (Temp & 0x2)! = 0) AfTers6 [2] = 1; IF ((Temp & 0x1)! = 0) AfTers6 [3] = 1; Temp = GETS (M7, 7); IF ((Temp & 0x8)! = 0) AfTers7 [0] = 1; IF ((Temp & 0x4)! = 0) AfTers7 [1] = 1; IF ((Temp & 0x2)! = 0) after 7 [2] = 1; IF ((Temp & 0x1)! = 0) AfTers7 [3] = 1; Temp = Gets (M8, 8); if ((Temp & 0x8)! = 0 AfTers8 [0] = 1; IF ((Temp & 0x4)! = 0) AfTers8 [1] = 1; IF ((Temp & 0x2)! = 0) AfTers8 [2] = 1; IF ((Temp & 0x1 )! = 0) AFTERS8 [3] = 1; // Combined with the plain text for the S box (INT I = 0; I <4; I ) {after [i] = afters1 [i]; offers [i 4 ] = afters [i 8] = afters3 [i]; offers [i 12] = afters4 [i]; after [i 16] = afters5 [i]; after [i 20] = Afters6 [i]; after the AFTERS7 [I]; AfTers [i 28] = afters8 [i]; // p Replace Greturn [0] = after [15]; Greturn [1] = after [6]; greturn [2] = afters [19]; greturn [3] = afters [20]; greturn [4] = afters [28]; Greturn [5] = AfTers [11]; Greturn [6] = AfTers [27]; Greturn [7] = after [16]; Greturn [8] = after [0]; Greturn [9] = afters [14]; greturn [10] = Afters [22]; greturn [11] = afters [25]; greturn [12] = afters [4]; greturn [13] = afters [17]; greturn [14] = after [30]; greturn [15] = AfTers [9]; Greturn [16] = after [1]; greturn [17] = after [7]; greturn [18] = after [23]; greturn [19] = afters [13]; greturn [20] = AfTers [31]; Greturn [21] = after "[26]; Greturn [22] = AfTers [2]; Greturn [23] = AfTers [8]; Greturn [24] = Afters [18]; Greturn [25] = after [12]; Greturn [26] = AfTers [29]; GR ETURN [27] = AfTERS [5]; Greturn [28] = after [21]; greturn [29] = afters [10]; greturn [30] = afters [3]; Greturn [31] = after [24]; Return Greturn;} // Get the value of the S box PUBLIC INT GETS (int [] Mi, INT i) {// initializes 8 S box int [,] s1 = new int [4, 16]; int [] S2 = New Int [4, 16]; int [] S3 = new int [4, 16]; int [] S4 = new int [4, 16]; int [] S5 = new int [4, 16] ; int [,] s6 = new int [4, 16]; int [] S7 = new int [4, 16]; int [] S8 = new int [4, 16]; int [] Output = New int [8]; int J, k; // 8 S-box S1 [0, 0] = 14; S1 [0, 1] = 4; S1 [0, 2] = 13; S1 [0, 3] = 1; S1 [0, 4] = 2; S1 [0, 5] = 15; S1 [0, 6] = 11; S1 [0, 7] = 8; S1 [0, 8] = 3; S1 [ 0, 9] = 10; S1 [0, 10] = 6; S1 [0, 11] = 12; S1 [0, 12] = 5; S1 [0, 13] = 9; S1 [0, 14] = 0; S1 [0, 15] = 7; S1 [1, 0] = 0; S1 [1, 1] = 15; S1 [1, 2] = 7; S1 [1, 3] = 4; S1 [1 , 4] = 14; S1 [1, 5] = 2; S1 [1, 6] = 13; S1 [1, 7] = 1; S1 [1, 8] = 10; S1 [1, 9] = 6 S1 [1, 10] = 12; S1 [1, 11] = 11; S1 [1, 12] = 9; S1 [1, 13] = 5; S1 [1, 14] = 3; S1 [1, 15] = 8; S1 [2, 0] = 4; S1 [2, 1] = 1; S1 [2, 2] = 14; S1 [2, 3] = 8; S1 [2, 4] = 13 S1 [2, 5] = 6; S1 [2, 6] = 2; S1 [2, 7] = 11; S1 [2, 8] = 15; S1 [2, 9] = 12; S1 [2, 10] = 9; S1 [2, 11] = 7; S1 [2, 12] = 3; S1 [2, 13] = 10; S1 [2, 14] = 5; S1 [2, 15] = 0; S1 [3, 0] = 15; S1 [3, 1] = 12; S1 [3, 2] = 8; S1 [3, 3] = 2; S1 [3, 4] = 4; S1 [3, 5 ] = 9; S1 [3, 6] = 1; S1 [3, 7] = 7; S1 [3, 8] = 5; S1 [3, 9] = 11; S1 [3, 10] = 3; S1 [3, 11] = 14; S1 [3, 12] = 10; S1 [3, 13] = 0; S1 [3, 14 ] = 6; S1 [3, 15] = 13; S2 [0, 0] = 15; S2 [0, 1] = 1; S2 [0, 2] = 8; S2 [0, 3] = 14; S2 [0, 4] = 6; S2 [0, 5 ] = 11; S2 [0, 6] = 3; S2 [0, 7] = 4; S2 [0, 8] = 9; S2 [0, 9] = 7; S2 [0, 10] = 2; S2 [0, 11] = 13; S2 [0, 12] = 12; S2 [0, 13] = 0; S2 [0, 14] = 5; S2 [0, 15] = 10; S2 [1, 0] = 3; S2 [1, 1] = 13; S2 [1, 2] = 4; S2 [1, 3] = 7; S2 [1, 4] = 15; S2 [1, 5] = 2; S2 [ 1, 6] = 8; S2 [1, 7] = 14; S2 [1, 8] = 12; S2 [1, 9] = 0; S2 [1, 10] = 1; S2 [1, 11] = 10; S2 [1, 12] = 6; S2 [1, 13] = 9; S2 [1, 14] = 11; S2 [1, 15] = 5; S2 [2, 0] = 0; S2 [2 1] = 14; S2 [2, 2] = 7; S2 [2, 3] = 11; S2 [2, 4] = 10; S2 [2, 5] = 4; S2 [2, 6] = 13 ; S2 [2, 7] = 1; S2 [2, 8] = 5; S2 [2, 9] = 8; S2 [2, 10] = 12; S2 [2, 11] = 6; S2 [2, 12 ] = 9; S2 [2, 13] = 3; S2 [2, 14] = 2; S2 [2, 15] = 15; S2 [3, 0] = 13; S2 [3, 1] = 8; S2 [3, 2] = 10; S2 [3, 3] = 1; S2 [3, 4] = 3; S2 [3, 5] = 15; S2 [3, 6] = 4; S2 [3, 7] = 2; S2 [3, 8] = 11; S2 [3, 9] = 6; S2 [3, 10] = 7; S2 [3, 11] = 12; S2 [3, 12] = 0; S2 [3, 13] = 5; S2 [3, 14] = 14; S2 [3, 15] = 9; S3 [0, 0] = 10; S3 [0, 1] = 0; S3 [0, 2] = 9; S3 [0, 3] = 14; S3 [0, 4] = 6; S3 [0, 5 ] = 3; S3 [0, 6] = 15; S3 [0, 7] = 5; S3 [0, 8] = 1; S3 [0, 9] = 13; S3 [0, 10] = 12; S3 [0, 11] = 7; S3 [0, 12] = 11; S3 [0, 13] = 4; S3 [0, 14] = 2; S3 [0, 15] = 8; S3 [1, 0] = 13; S3 [1, 1] = 7; S3 [1, 2] = 0; S3 [1, 3] = 9; S3 [1, 4] = 3; S3 [1, 5] = 4; S3 [ 1, 6] = 6; S3 [1, 7] = 10; S3 [1, 8] = 2; S3 [1, 9] = 8; S3 [1, 10] = 5; S3 [1, 11] = 14; S3 [1, 12] = 12; S3 [1, 13] = 11; S3 [1, 14] = 15; S3 [1, 15] = 1; S3 [2, 0] = 13; S3 [2 1] = 6; S3 [2, 2] = 4; S3 [2, 3] = 9; S3 [2, 4] = 8; S3 [2, 5] = 15; S3 [2, 6] = 3 ; S3 [2, 7] = 0; S3 [2, 8] = 11; S3 [2, 9] = 1; S3 [2, 10] = 2; S3 [2, 11] = 12; S3 [2, 12 ] = 5; S3 [2, 13] = 10; S3 [2, 14] = 14; S3 [2, 15] = 7; S3 [3, 0] = 1; S3 [3, 1] = 10; S3 [3, 2] = 13; S3 [3, 3] = 0; S3 [3, 4] = 6; S3 [3, 5] = 9; S3 [3, 6] = 8; S3 [3, 7] = 7; S3 [3, 8] = 4; S3 [3, 9] = 15; S3 [3, 10] = 14; S3 [3, 11] = 3; S3 [3, 12] = 11; S3 [3, 13] = 5; S3 [3, 14] = 2; S3 [3, 15] = 12; S4 [0, 0] = 7; S4 [0, 1] = 13; S4 [0, 2] = 14; S4 [0, 3] = 3; S4 [0, 4] = 0; S4 [0, 5 ] = 6; S4 [0, 6] = 9; S4 [0, 7] = 10; S4 [0, 8] = 1; S4 [0, 9] = 2; S4 [0, 10] = 8; S4 [0, 11] = 5; S4 [0, 12] = 11; S4 [0, 13] = 12; S4 [0, 14] = 4; S4 [0, 15] = 15; S4 [1, 0] = 13; S4 [1, 1] = 8; S4 [1, 2] = 11; S4 [1, 3] = 5; S4 [1, 4] = 6; S4 [1, 5] = 15; S4 [ 1, 6] = 0; S4 [1, 7] = 3; S4 [1, 8] = 4; S4 [1, 9] = 7; S4 [1, 10] = 2; S4 [1, 11] = 12; S4 [1, 12] = 1; S4 [1, 13] = 10; S4 [1, 14] = 14; S4 [1, 15] = 9; S4 [2, 0] = 10; S4 [2 1] = 6; S4 [2, 2] = 9; S4 [2, 3] = 0; S4 [2, 4] = 12; S4 [2, 5] = 11; S4 [2, 6] = 7 ; S4 [2, 7] = 13; S4 [2, 8] = 15; S4 [2, 9] = 1; S4 [2, 10] = 3; S4 [2, 11] = 14; S4 [2, 12 ] = 5; S4 [2, 13] = 2; S4 [2, 14] = 8; S4 [2, 15] = 4; S4 [3, 0] = 3; S4 [3, 1] = 15; S4 [3, 2] = 0; S4 [3, 3] = 6; S4 [3, 4] = 10; S4 [3, 5] = 1; S4 [3, 6] = 13; S4 [3, 7] = 8; S4 [3, 8] = 9; S4 [3, 9] = 4; S4 [3, 10] = 5; S4 [3, 11] = 11; S4 [3, 12] = 12; S4 [3, 13] = 7; S4 [3, 14] = 2; S4 [3, 15] = 14; S5 [0, 0] = 2; S5 [0, 1] = 12; S5 [0, 2] = 4; S5 [0, 3] = 1; S5 [0, 4] = 7; S5 [0, 5 ] = 10; S5 [0, 6] = 11; S5 [0, 7] = 6; S5 [0, 8] = 8; S5 [0, 9] = 5; S5 [0, 10] = 3; S5 [0, 11] = 15; S5 [0, 12] = 13; S5 [0, 13] = 0; S5 [0, 14] = 14; S5 [0, 15] = 9; S5 [1, 0] = 14; S5 [1, 1] = 11; S5 [1, 2] = 2; S5 [1, 3] = 12; S5 [1, 4] = 4; S5 [1, 5] = 7; S5 [ 1, 6] = 13; S5 [1, 7] = 1; S5 [1, 8] = 5; S5 [1, 9] = 0; S5 [1, 10] = 15; S5 [1, 11] = 10; S5 [1, 12] = 3; S5 [1, 13] = 9; S5 [1, 14] = 8; S5 [1, 15] = 6; S5 [2, 0] = 4; S5 [2 1] = 2; S5 [2, 2] = 1; S5 [2, 3] = 11; S5 [2, 4] = 10; S5 [2, 5] = 13; S5 [2, 6] = 7 ; S5 [2, 7] = 8; S5 [2, 8] = 15; S5 [2, 9] = 9; S5 [2, 10] = 12; S5 [2, 11] = 5; S5 [2, 12 ] = 6; S5 [2, 13] = 3; S5 [2, 14] = 0; S5 [2, 15] = 14; S5 [3, 0] = 11; S5 [3, 1] = 8; S5 [3, 2] = 12; S5 [3, 3] = 7; S5 [3, 4] = 1; S5 [3, 5] = 14; S5 [3, 6] = 2; S5 [3, 7] = 13; S5 [3, 8] = 6; S5 [3, 9] = 15; S5 [3, 10] = 0; S5 [3, 11] = 9; S5 [3, 12] = 10; S5 [3, 13] = 4; S5 [3, 14] = 5; S5 [3, 15] = 3; S6 [0, 0] = 12; S6 [0, 1] = 1; S6 [0, 2] = 10; S6 [0, 3] = 15; S6 [0, 4] = 9; S6 [0, 5 ] = 2; S6 [0, 6] = 6; S6 [0, 7] = 8; S6 [0, 8] = 0; S6 [0, 9] = 13; S6 [0, 10] = 3; S6 [0, 11] = 4; S6 [0, 12] = 14; S6 [0, 13] = 7; S6 [0, 14] = 5; S6 [0, 15] = 11; S6 [1, 0] = 10; S6 [1, 1] = 15; S6 [1, 2] = 4; S6 [1, 3] = 2; S6 [1, 4] = 7; S6 [1, 5] = 12; S6 [ 1, 6] = 9; S6 [1, 7] = 5; S6 [1, 8] = 6; S6 [1, 9] = 1; S6 [1, 10] = 13; S6 [1, 11] = 14; S6 [1, 12] = 0; S6 [1, 13] = 11; S6 [1, 14] = 3; S6 [1, 15] = 8; S6 [2, 0] = 9; S6 [2 , 1] = 14; S6 [2, 2] = 15; S6 [2, 3] = 5; S6 [2, 4] = 2; S6 [2, 5] = 8; S6 [2, 6] = 12 ; S6 [2, 7] = 3; S6 [2, 8] = 7; S6 [2, 9] = 0; S6 [2, 10] = 4; S6 [2, 11] = 10; S6 [2, 12 ] = 1; S6 [2, 13] = 13; S6 [2, 14] = 11; S6 [2, 15] = 6; S6 [3, 0] = 4; S6 [3, 1] = 3; S6 [3, 2] = 2; S6 [3, 3] = 12; S6 [3, 4] = 9; S6 [3, 5] = 5; S6 [3, 6] = 15; S6 [3, 7] = 10; S6 [3, 8] = 11; S6 [3, 9] = 14; S6 [3, 10] = 1; S6 [3, 11] = 7; S6 [3, 12] = 6; S6 [3, 13] = 0; S6 [3, 14] = 8; S6 [3, 15] = 13; S7 [0, 0] = 4; S7 [0, 1] = 11; S7 [0, 2] = 2; S7 [0, 3] = 14; S7 [0, 4] = 15; S7 [0, 5 ] = 0; S7 [0, 6] = 8; S7 [0, 7] = 13; S7 [0, 8] = 3; S7 [0, 9] = 12; S7 [0, 10] = 9; S7 [0, 11] = 7; S7 [0, 12] = 5; S7 [0, 13] = 10; S7 [0, 14] = 6; S7 [0, 15] = 1; S7 [1, 0] = 13; S7 [1, 1] = 0; S7 [1, 2] = 11; S7 [1, 3] = 7; S7 [1, 4] = 4; S7 [1, 5] = 9; S7 [ 1, 6] = 1; S7 [1, 7] = 10; S7 [1, 8] = 14; S7 [1, 9] = 3; S7 [1, 10] = 5; S7 [1, 11] = 12; S7 [1, 12] = 2; S7 [1, 13] = 15; S7 [1, 14] = 8; S7 [1, 15] = 6; S7 [2, 0] = 1; S7 [2 1] = 4; S7 [2, 2] = 11; S7 [2, 3] = 13; S7 [2, 4] = 12; S7 [2, 5] = 3; S7 [2, 6] = 7 ; S7 [2, 7] = 14; S7 [2, 8] = 10; S7 [2, 9] = 15; S7 [2, 10] = 6; S7 [2, 11] = 8; S7 [2, 12 ] = 0; S7 [2, 13] = 5; S7 [2, 14] = 9; S7 [2, 15] = 2; S7 [3, 0] = 6; S7 [3, 1] = 11; S7 [3, 2] = 13; S7 [3, 3] = 8; S7 [3, 4] = 1; S7 [3, 5] = 4; S7 [3, 6] = 10; S7 [3, 7] = 7; S7 [3, 8] = 9; S7 [3, 9] = 5; S7 [3, 10] = 0; S7 [3, 11] = 15; S7 [3, 12] = 14; S7 [3, 13] = 2; S7 [3, 14] = 3; S7 [3, 15] = 12; S8 [0, 0] = 13; S8 [0, 1] = 2; S8 [0, 2] = 8; S8 [0, 3] = 4; S8 [0, 4] = 6; S8 [0, 5 ] = 15; S8 [0, 6] = 11; S8 [0, 7] = 1; S8 [0, 8] = 10; S8 [0, 9] = 9; S8 [0, 10] = 3; S8 [0, 11] = 14; S8 [0, 12] = 5; S8 [0, 13] = 0; S8 [0, 14] = 12; S8 [0, 15] = 7; S8 [1, 0] = 1; S8 [1, 1] = 15; S8 [1, 2] = 13; S8 [1, 3] = 8; S8 [1, 4] = 10; S8 [1, 5] = 3; S8 [ 1, 6] = 7; S8 [1, 7] = 4; S8 [1, 8] = 12; S8 [1, 9] = 5; S8 [1, 10] = 6; S8 [1, 11] = 11; S8 [1, 12] = 0; S8 [1, 13] = 14; S8 [1, 14] = 9; S8 [1, 15] = 2; S8 [2, 0] = 7; S8 [2 1] = 11; S8 [2, 2] = 4; S8 [2, 3] = 1; S8 [2, 4] = 9; S8 [2, 5] = 12; S8 [2, 6] = 14 ; S8 [2, 7] = 2; S8 [2, 8] = 0; S8 [2, 9] = 6; S8 [2, 10] = 10; S8 [2, 11] = 13; S8 [2, 12 ] = 15; S8 [2, 13] = 3; S8 [2, 14] = 5; S8 [2, 15] = 8; S8 [3, 0] = 2; S8 [3, 1] = 1; S8 [3, 2] = 14; S8 [3, 3] = 7; S8 [3, 4] = 4; S8 [3, 5] = 10; S8 [3, 6] = 8; S8 [3, 7] = 13; S8 [3, 8] = 15; S8 [3, 9] = 12; S8 [3, 10] = 9; S8 [3, 11] = 0; S8 [3, 12] = 3; S8 [3, 13] = 5; S8 [3, 14] = 6; S8 [3, 15] = 11; // from clear text Enter the value of the S-box j = mi [0] * 2 mi [5]; k = mi [1] * 8 mi [2] * 4 mi [3] * 2 mi [4]; OUTPUT [0] = S1 [J, K]; OUTPUT [1] = S2 [J, K]; OUTPUT [2] = S3 [J, K]; OUTPUT [3] = S4 [J, K]; OUTPUT [4 ] = S5 [J, K]; OUTPUT [5] = S6 [J, K]; OUTPUT [6] = S7 [J, K]; OUTPUT [7] = S8 [J, K]; Return Output [i - 1];} // Enter 16 key and clear text calculation des public int [] des (int [] keys, char [] r) {// 2 enrollment graphics group Li Ri int [] l0 = new int int int INT [32]; int [] r0 = new int [32]; int [] l1 = new int [32]; int [] r1 = new int [32]; int [] l2 = new int [32]; int [ ] R2 = new int [32]; int [] l3 = new int [32]; int [] R3 = new int [32]; int [] L4 = new int [32]; int [] r4 = new int = 32]; int [] l5 = new int [32]; int te ] R5 = new int [32]; int [] l6 = new int [32]; int [] r6 = new int = new int = new int [32]; int [] r7 = new int = new int = 32]; int []; int [] r8 = new int [32]; int [] l9 = new int [32]; int [] r9 = new int [32]; int [] L10 = new int [32]; int [] r10 = new int [32]; int [] l11 = new int [32]; int [] r11 = new int [32]; int [] L12 = new int [32 ]; int [] r12 = new int [32]; int [] l13 = new int [32]; int [] r13 = new int [32]; int [] L14 = new int [32]; int [] r14 = new int [32]; int []; int [] r15 = new int [32]; int [] l16 = new int [32]; int [] R16 = New INT [32]; int [] afterg = new int [32]; // Get 2 enrollment after the IP replacement result int [] instue = IP (r); int [] final = new int [64]; int [] final = new int [64]; int [] final = new int = [] Temp = new int [64]; // Get l0 r0 for (INT i = 0; I <32; i ) {l0 [i] = afterip [i]; r0 [i] = afterip [i 32] ;} // uses R0 and the first key to perform G functions Afterg = g (R0, Keys [0]); for (int i = 0; i <32; i ) {IF (l0 [i]! = afterg [i]) R1 [i] = 1; // l0 R1 different or} L1 = R0; // First weight Afterg = g (R1, Keys [1]); for (int i = 0; i <32; i ) {IF (L1 [i]! = afterg [i]) R2 [i] = 1;} L2 = R1 ; // Second Afterg = G (R2, Keys [2]); for (int i = 0; i <32; i ) {IF (L2 [i]! = Afterg [i]) R3 [i] = 1;} L3 = R2; // 3rd AFTERG = G (R3, Keys [3]); for (int i = 0; i <32; i ) {IF (L3 [i]! = Afterg [i] R4 [i] = 1;} L4 = R3; // Double AFTERG = G (R4, Keys [4]); for (INT I = 0; I <32; I ) {IF (L4 [i] ! = afterg [i]) R5 [i] = 1;} L5 = R4; // 5th afterg = g (R5, Keys [5]); for (int i = 0; i <32; i ) { IF (l5 [i]! = afterg [i]) R6 [i] = 1;} l6 = r5; // 6th afterg = g (R6, Keys [6]); for (int i = 0; i < 32; i ) {IF (L6 [i]! = Afterg [i]) R7 [i] = 1;} L7 = R6; // 7th afterg = g (R7, Keys [7]); for (int i = 0; i <32; i ) {IF (l7 [i]! = afterg [i]) R8 [i] = 1;} L8 = r7; // 8th afterg = g (R8, Keys [8 ]); For (int i = 0; i <32; i ) {IF (L8 [i]! = Afterg [i]) R9 [i] = 1;} L9 = R8; // 9th afterg = g (R9, Keys [9]); for (int i = 0; i <32; i ) {IF (L9 [i]! = Afterg [i]) R10 [i] = 1 } L10 = r9; // 10th afterg = g (R10, Keys [10]); for (int i = 0; i <32; i ) {ix (l10 [i]! = Afterg [i]) R11 [i] = 1;} L11 = r10; // 11th refterg = g (R11, Keys [11]); for (int i = 0; i <32; i ) {IF (L11 [i]! = Afterg [I]) R12 [i] = 1;} L12 = R11; // 12th AFTERG = G (R12, Keys [12]); for (INT i = 0; i <32; i ) {IF (L12 [i]! = Afterg [i]) R13 [i] = 1;} L13 = R12; // 13th afterg = g (R13, Keys [13]); for (int i = 0; i < 32; i ) {IF (L13 [i]! = Afterg [i]) R14 [i] = 1;} L14 = R13; // 14th afterg = G (R14, Keys [14]); for (int i = 0; i <32; i ) {IF (L14 [i]! = AfTerg [i]) R15 [i] = 1;} L15 = R14; // 15th afterg = G (R15, Keys [15]); for (int i = 0; i <32; i ) {= (l15 [i]! = Afterg [i]) R16 [i] = 1 } L16 = r15; // 16th // Missing L16 and R16 FOR (INT I = 0; I <32; I ) {TEMP [I] = R16 [I]; TEMP [i 32] = L16 [i];} // }文 i i i Replacement output final = IP_1 (TEMP); RETURN Final; } // 16 key reverse input calculation DES reverse function, principle is approximately the same as the same public int [] des_1 (int [] [] keys, char [] r) {int [] l0 = new int = new int [32]; INT [] r0 = new int [32]; int []; int [] r1 = new int [32]; int [] l2 = new int [32]; int [] r2 = new Int [32]; int []; int [] r3 = new int [32]; int [] l4 = new int [32]; int [] r4 = new int [32]; int [= new int = [] L5 = new int [32]; int [] r5 = new int [= new int [] l6 = new int [32]; int [] r6 = new int [32]; int [] l7 = new int = [32]; int [] r7 = new int [32]; int [] l8 = new int [32]; int [] r8 = new int [32]; int [] l9 = new int [32]; int [= ] R9 = new int [32]; int [] l10 = new int [32]; int [] r10 = new int [32]; int [] l11 = new int [32]; int [] r11 = new int = 32]; int [] l12 = new int [32]; int [] R12 = new int [32]; int [] L13 = new int [32]; int [] R13 = new int [32]; int [] L14 = new int [32]; int [] r14 = new int = int [] l15 = new int [32]; int [= new int [32]; int [] l16 = new int [32]; int [] r16 = new int [32]; int [] AfTERG = New INT [32]; int [] final = IP (r); int [] final = new int [64]; int [] temp = new int [64]; for (int i = 0; i <32; i ) {L0 [i] = afterip [i]; r0 [i] = afterip [i 32]; AfTerg = G (R0, Keys [15]); for (int i = 0; i <32; i ) {= (l0 [i]! = afterg [i]) R1 [i] = 1;} L1 = r0 ; // AfTerg = G (R1, Keys [14]); for (int i = 0; i <32; i ) {IF (L1 [i]! = afterg [i]) R2 [i] = 1;} L2 = R1 ; // Second Afterg = G (R2, Keys [13]); for (int i = 0; i <32; i ) {IF (L2 [i]! = Afterg [i]) R3 [i] = 1;} L3 = R2; // 3rd anfterg = g (R3, Keys [12]); for (int i = 0; i <32; i ) {ix (l3 [i]! = Afterg [i] R4 [I] = 1;} L4 = R3; // Double Afterg = G (R4, Keys [11]); for (int i = 0; i <32; i ) {IF (L4 [i] ! = afterg [i]) R5 [i] = 1;} L5 = R4; // 5th afterg = g (R5, Keys [10]); for (int i = 0; i <32; i ) { IF (l5 [i]! = afterg [i]) R6 [i] = 1;} l6 = r5; // 6th afterg = g (R6, Keys [9]); for (int i = 0 i <32; i ) {IF (L6 [i]! = afterg [i]) R7 [i] = 1;} L7 = R6; // Seventh Afterg = G (R7, Keys [8]); For (int i = 0; i <32; i ) {if (L7 [i]! = afterg [i]) R8 [i] = 1;} L8 = r7; // 8th afterg = g (R8, Keys [7]); for (int i = 0; i <32; i ) {IF (L8 [i]! = afterg [i]) r9 [i] = 1;} l9 = r8; // 9th afterg = g (R9, Keys [6]); for (int i = 0; i <32; i ) {= (L9 [i]! = Afterg [i]) R10 [i] = 1 } L10 = r9; // 10th afterg = g (R10, Keys [5]); for (int i = 0; i <32; i ) {IF (L10 [i]! = Afterg [i]) R11 [i] = 1;} L11 = r10; // 11th heavy Afterg = g (R11, Keys [4]); for (int i = 0; i <32; i ) {= (L11 [i]! = Afterg [i]) R12 [i] = 1;} L12 = R11; // 12th heavy AFTERG = G (R12, Keys [3]); for (int i = 0; i <32; i ) {IF (L12 [i]! = Afterg [i]) R13 [i] = 1;} L13 = R12; // 13th refterg = g (R13, Keys [2]); for (int i = 0; i < 32; i ) {IF (L13 [i]! = Afterg [i]) R14 [i] = 1;} L14 = R13; // 14th afterg = g R14, Keys [1]); for (int i = 0; i <32; i ) {IF (L14 [i]! = AfTerg [i]) R15 [i] = 1;} L15 = R14; // 15 heavy afterg = g (R15, Keys [0]); for (int i = 0; i <32; i ) {IF (L15 [i]! = Afterg [i]) R16 [i] = 1;} L16 = R15; // 16th For (int i = 0; i <32; i ) {temp [i] = r16 [i]; TEMP [i 32] = L16 [i];} final = IP_1 (TEMP); Return Final;} }