#include #include #include #include #include #include void deleteFolderContents(const char *folderPath) { DIR *dir = opendir(folderPath); if (!dir) { return; } struct dirent *entry; while ((entry = readdir(dir)) != NULL) { if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) { continue; } char filePath[256]; sprintf(filePath, "%s/%s", folderPath, entry->d_name); struct stat statbuf; if (stat(filePath, &statbuf) == -1) { continue; } if (S_ISDIR(statbuf.st_mode)) { deleteFolderContents(filePath); rmdir(filePath); } else { remove(filePath); } } closedir(dir); } void createFolders(const char *basePath, int start, int end, int step, int subFolderCount) { char subFolderBaseName[] = "PLAIN_TEXT_OLCUM_"; char subFolderSuffix1[] = "_low"; char subFolderSuffix2[] = "_high"; char path[256]; for (int i = start; i <= end; i += step) { sprintf(path, "%s/%s%03d", basePath, subFolderBaseName, i); DIR *dir = opendir(path); if (dir) { closedir(dir); deleteFolderContents(path); rmdir(path); }mkdir(path); char subFolderPath[256]; sprintf(subFolderPath, "%s/%s%03d%s", path, subFolderBaseName, 1, subFolderSuffix1); mkdir(subFolderPath); sprintf(subFolderPath, "%s/%s%03d%s", path, subFolderBaseName, 2, subFolderSuffix2); mkdir(subFolderPath); } } void copyFilesInRange(const char *baseFileName, const char *extension, const char *sourceFolderPath, const char *destinationFolderPath, int startIndex, int endIndex) { for (int i = startIndex; i <= endIndex; i++) { char sourceFilename[256]; sprintf(sourceFilename, "%s\%s%05d%s", sourceFolderPath, baseFileName, i, extension); //printf("\n1- sourceFilename: %s\n", sourceFilename); char destinationFilename[256]; sprintf(destinationFilename, "%s\%s%05d%s", destinationFolderPath, baseFileName, i, extension); //printf("\n2- destinationFilename: %s\n", destinationFilename); FILE *sourceFile = fopen(sourceFilename, "rb"); FILE *destinationFile = NULL; if (sourceFile != NULL) { FILE *destinationFile = fopen(destinationFilename, "wb"); } /* if (sourceFile != NULL && destinationFile != NULL) { char buffer[1024]; size_t bytesRead; while ((bytesRead = fread(buffer, 1, sizeof(buffer), sourceFile)) > 0) { fwrite(buffer, 1, bytesRead, destinationFile); } fclose(sourceFile); fclose(destinationFile); //printf("\nDosya kopyalandi: %s\n", destinationFilename); } else { //printf("\nDosya kopyalanamadi: %s\n", destinationFilename); } */ fclose(sourceFile); fclose(destinationFile); } } char dec_to_hexa_conversion(int decimal_Number) { char i=decimal_Number; if (i==0) return '0'; else if (i == 1) return '1'; else if (i == 2) return '2'; else if (i == 3) return '3'; else if (i == 4) return '4'; else if (i == 5) return '5'; else if (i == 6) return '6'; else if (i == 7) return '7'; else if (i == 8) return '8'; else if (i == 9) return '9'; else if (i == 10) return 'a'; else if (i == 11) return 'b'; else if (i == 12) return 'c'; else if (i == 13) return 'd'; else if (i == 14) return 'e'; else if (i == 15) return 'f'; else return 0; } int hextodec(char hexadecimalnumber) { char i=hexadecimalnumber; if (i=='0') return 0; else if (i == '1') return 1; else if (i == '2') return 2; else if (i == '3') return 3; else if (i == '4') return 4; else if (i == '5') return 5; else if (i == '6') return 6; else if (i == '7') return 7; else if (i == '8') return 8; else if (i == '9') return 9; else if (i == 'a') return 10; else if (i == 'b') return 11; else if (i == 'c') return 12; else if (i == 'd') return 13; else if (i == 'e') return 14; else if (i == 'f') return 15; else return 0; } char *add_round_key(char plain_text_bytes[][4][2],char key_bytes_128[][4][2],char plaintext_xor_key[][4][2]) { int i,j,k; for (i=0;i<4;i++){ for (j=0;j<4;j++){ for (k=0;k<2;k++){ plaintext_xor_key[j][i][k]=dec_to_hexa_conversion(hextodec(plain_text_bytes[i][j][k])^hextodec(key_bytes_128[i][j][k])); } } } return **plaintext_xor_key; } void bastir(char plaintext_xor_key[][4][2]) { int i,j,k; for (int i=0;i<4;i++){ for (int j=0;j<4;j++){ for (int k=0;k<2;k++){ printf("%c",plaintext_xor_key[i][j][k]); } printf(" "); } } printf("\n"); } void end_round(char plaintext_xor_key[][4][2]) { int i,j,k; for (int i=0;i<4;i++){ for (int j=0;j<4;j++){ for (int k=0;k<2;k++){ printf("%c",plaintext_xor_key[j][i][k]); } printf(" "); } } printf("\n"); } char decToHex(int decimal,char hexadecimal[]) { int indx = 0; char temp; char hex[2]={0}; if (decimal < 16){ hexadecimal[1]='0'; hexadecimal[0]='0'; } while (decimal > 0) { int remainder = decimal % 16; if (remainder < 10) hexadecimal[indx++] = remainder + '0'; else hexadecimal[indx++] = remainder + 'a' - 10; decimal /= 16; } temp=hexadecimal[1]; hexadecimal[1]=hexadecimal[0]; hexadecimal[0]=temp; return *hexadecimal; } unsigned char sbox[256] = { // 0 1 2 3 4 5 6 7 8 9 A B C D E F 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, // 0 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, // 1 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, // 2 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, // 3 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, // 4 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, // 5 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, // 6 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, // 7 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, // 8 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, // 9 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, // A 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, // B 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, // C 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, // D 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, // E 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16}; // F unsigned char getSBoxValue(unsigned char num) { return sbox[num]; } void s_box(char plaintext_xor_key_sbox2[][4][2],char plaintext_xor_key[][4][2],char hexadecimal[],char hex_duz[][2]) { for (int i=0;i<4;i++){ for (int j=0;j<4;j++){ decToHex(getSBoxValue(16*hextodec(plaintext_xor_key[i][j][0])+hextodec(plaintext_xor_key[i][j][1])),hexadecimal); plaintext_xor_key_sbox2[i][j][0]=hexadecimal[0]; plaintext_xor_key_sbox2[i][j][1]=hexadecimal[1]; } } } void rotate(char plaintext_xor_key_sbox2[][4][2]) { char plaintext_xor_key_sbox3[4][4][2]; for (int i=0;i<4;i++){ for (int j=0;j<4;j++){ for (int k=0;k<2;k++){ plaintext_xor_key_sbox3[i][j][k]=plaintext_xor_key_sbox2[i][j][k]; } } } for (int i=0;i<4;i++){ for (int j=0;j<4;j++){ for (int k=0;k<2;k++){ if (i==1){ if(j>0) plaintext_xor_key_sbox2[i][j-1][k]=plaintext_xor_key_sbox3[i][j][k]; else plaintext_xor_key_sbox2[i][3][k]=plaintext_xor_key_sbox3[i][0][k]; } else if (i==2){ if(j>1) plaintext_xor_key_sbox2[i][j-2][k]=plaintext_xor_key_sbox3[i][j][k]; else plaintext_xor_key_sbox2[i][j+2][k]=plaintext_xor_key_sbox3[i][j][k]; } else if (i==3){ if(j<3) plaintext_xor_key_sbox2[i][j+1][k]=plaintext_xor_key_sbox3[i][j][k]; else plaintext_xor_key_sbox2[i][0][k]=plaintext_xor_key_sbox3[i][3][k]; } } } } } void mix_column(char plaintext_xor_key_sbox2[][4][2],char hexadecimal[]) { char mix[4][4]={{2,3,1,1},{1,2,3,1},{1,1,2,3},{3,1,1,2}}; unsigned int res[4][4]={{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}; char plaintext_xor_key_sboxt[4][4][2]; unsigned int res2[4][4]; int a=0; for (int i=0;i<4;i++){ for (int j=0;j<4;j++){ for (int k=0;k<2;k++){ plaintext_xor_key_sboxt[j][i][k]=plaintext_xor_key_sbox2[i][j][k]; } } } for (int i=0;i<4;i++){ for (int j=0;j<4;j++){ for (int k=0;k<2;k++){ plaintext_xor_key_sbox2[i][j][k]=plaintext_xor_key_sboxt[i][j][k]; } } } for (int i=0;i<4;i++){ for (int k=0;k<4;k++){ for (int j=0;j<4;j++){ if (mix[i][j]==1){ a = 16 * hextodec(plaintext_xor_key_sbox2[k][j][0]) + hextodec(plaintext_xor_key_sbox2[k][j][1]); res[i][k] ^= abs(a); } else if (mix[i][j]==2){ if (hextodec(plaintext_xor_key_sbox2[k][j][0]) >= 8){ a = 16 * hextodec(plaintext_xor_key_sbox2[k][j][0]) + hextodec(plaintext_xor_key_sbox2[k][j][1]); res[i][k] ^= abs((((a << 1) % 256)^27)); } else{ a = 16 * hextodec(plaintext_xor_key_sbox2[k][j][0]) + hextodec(plaintext_xor_key_sbox2[k][j][1]); res[i][k] ^= abs(((a << 1) % 256)); } } else if (mix[i][j]==3){ if (hextodec(plaintext_xor_key_sbox2[k][j][0]) >= 8){ a = 16 * hextodec(plaintext_xor_key_sbox2[k][j][0]) + hextodec(plaintext_xor_key_sbox2[k][j][1]); res[i][k] ^= abs((((a << 1) % 256)^27)^ a); } else{ a = 16 * hextodec(plaintext_xor_key_sbox2[k][j][0]) + hextodec(plaintext_xor_key_sbox2[k][j][1]); res[i][k] ^= abs((((a << 1)%256)^a)); } } } } } for (int i=0;i<4;i++){ for (int j=0;j<4;j++){ decToHex(res[i][j],hexadecimal); plaintext_xor_key_sbox2[j][i][0]=hexadecimal[0]; plaintext_xor_key_sbox2[j][i][1]=hexadecimal[1]; } } } void key_expansion(char key_bytes_128[][4][2],int round,char hexadecimal[]) { int i,j,k,temp; char matrix3[2][4],matrix3_b[2][4],matrix3_s[2][4],matrix3_x[2][4]; char key_bytes2[4][4][2]; //printf("\n\n\matrix3:\t\t\t "); for (j=0;j<4;j++){ for (k=0;k<2;k++){ matrix3[j][k]=key_bytes_128[3][j][k]; //printf("%c",matrix3[j][k]); }//printf(" "); } //printf("\n\matrix3_p:\t\t\t "); for (j=0;j<4;j++){ for (k=0;k<2;k++){ if (j>0){ matrix3_b[j-1][k]=key_bytes_128[3][j][k]; } else{ matrix3_b[3][k]=key_bytes_128[3][0][k]; } // printf("%c",matrix3[j][k]); }//printf(" "); } for (j=0;j<4;j++){ for (k=0;k<2;k++){ //printf("%c",matrix3_b[j][k]); }//printf(" "); } for (j=0;j<4;j++){ decToHex(getSBoxValue(16*hextodec(matrix3_b[j][0])+hextodec(matrix3_b[j][1])),hexadecimal); matrix3_s[j][0]=hexadecimal[0]; matrix3_s[j][1]=hexadecimal[1]; } //printf("\nmatrix3_s:\t\t\t "); for (j=0;j<4;j++){ for (k=0;k<2;k++){ //printf("%c",matrix3_s[j][k]); }//printf(" "); } char round_key[11][2] = {{'0','0'},{'0','1'},{'0','2'},{'0','4'},{'0','8'},{'1','0'},{'2','0'},{'4','0'},{'8','0'},{'1','b'},{'3','6'}}; int a,b; a = 16 * hextodec(round_key[round][0]) + hextodec(round_key[round][1]); b = 16 * hextodec(matrix3_s[0][0]) + hextodec(matrix3_s[0][1]); decToHex(b ^ a,hexadecimal); matrix3_x[0][0]=hexadecimal[0]; matrix3_x[0][1]=hexadecimal[1]; for (int i=1;i<4;i++){ for (int j=0;j<2;j++){ matrix3_x[i][j]=matrix3_s[i][j]; //printf("%c",matrix3_x[i][j]); }//printf(" "); } //printf("\nmatrix3_x:\t\t\t "); for (int i=0;i<4;i++){ for (int j=0;j<2;j++){ //printf("%c",matrix3_x[i][j]); }//printf(" "); } char w4[2][4],w5[2][4],w6[2][4],w7[2][4]; for (j=0;j<4;j++){ a = 16 * hextodec(key_bytes_128[0][j][0]) + hextodec(key_bytes_128[0][j][1]); b = 16 * hextodec(matrix3_x[j][0]) + hextodec(matrix3_x[j][1]); decToHex(b ^ a,hexadecimal); w4[j][0]=hexadecimal[0]; w4[j][1]=hexadecimal[1]; }//printf(" "); //printf("\nw4:\t\t\t\t "); for (int i=0;i<4;i++){ for (int j=0;j<2;j++){ key_bytes2[0][i][j]=w4[i][j]; //printf("%c",w4[i][j]); }//printf(" "); } for (j=0;j<4;j++){ a = 16 * hextodec(key_bytes_128[1][j][0]) + hextodec(key_bytes_128[1][j][1]); b = 16 * hextodec(w4[j][0]) + hextodec(w4[j][1]); decToHex(b ^ a,hexadecimal); w5[j][0]=hexadecimal[0]; w5[j][1]=hexadecimal[1]; }//printf(" "); //printf("\nw5:\t\t\t\t "); for (int i=0;i<4;i++){ for (int j=0;j<2;j++){ key_bytes2[1][i][j]=w5[i][j]; //printf("%c",w5[i][j]); }//printf(" "); } for (j=0;j<4;j++){ a = 16 * hextodec(key_bytes_128[2][j][0]) + hextodec(key_bytes_128[2][j][1]); b = 16 * hextodec(w5[j][0]) + hextodec(w5[j][1]); decToHex(b ^ a,hexadecimal); w6[j][0]=hexadecimal[0]; w6[j][1]=hexadecimal[1]; }//printf(" "); //printf("\nw6:\t\t\t\t "); for (int i=0;i<4;i++){ for (int j=0;j<2;j++){ key_bytes2[2][i][j]=w6[i][j]; //printf("%c",w6[i][j]); }//printf(" "); } for (j=0;j<4;j++){ a = 16 * hextodec(key_bytes_128[3][j][0]) + hextodec(key_bytes_128[3][j][1]); b = 16 * hextodec(w6[j][0]) + hextodec(w6[j][1]); decToHex(b ^ a,hexadecimal); w7[j][0]=hexadecimal[0]; w7[j][1]=hexadecimal[1]; }//printf(" "); //printf("\nw7:\t\t\t\t "); for (int i=0;i<4;i++){ for (int j=0;j<2;j++){ key_bytes2[3][i][j]=w7[i][j]; //printf("%c",w7[i][j]); }//printf(" "); } //printf("\n%d. round key:\t\t\t\t",round-1); for (i=0;i<4;i++){ for (j=0;j<4;j++){ for (k=0;k<2;k++){ //printf("%c",key_bytes_128[i][j][k]); }//printf(" "); } } //printf("\n%d. round key:\t\t\t\t",round); for (i=0;i<4;i++){ for (j=0;j<4;j++){ for (k=0;k<2;k++){ key_bytes_128[i][j][k]=key_bytes2[i][j][k]; //printf("%c",key_bytes_128_final[i][j][k]); }//printf(" "); } } } void loop(char plain_text[],char key_value[],char hex_duz[][2],char hexadecimal[],char plain_text_bytes[][4][2],char key_bytes_128[][4][2],char plaintext_xor_key[][4][2],char plaintext_xor_key_sbox[][4],char plaintext_xor_key_sbox2[][4][2],char plaintext_xor_key_sboxt[][4][2]) { for (int i=0;i<4;i++){ for (int j=0;j<4;j++){ for (int k=0;k<2;k++){ plain_text_bytes[i][j][k]=plain_text[8*i+2*j+k]; key_bytes_128[i][j][k]=key_value[8*i+2*j+k]; } } //printf("\n"); } for (int t=0;t<11;t++){ if (t==0){ printf("Plain_text:\t\t\t\t",t);bastir(plain_text_bytes); add_round_key(plain_text_bytes,key_bytes_128,plaintext_xor_key); t++; } if (1<=t<=9){ s_box(plaintext_xor_key_sbox2,plaintext_xor_key,hexadecimal,hex_duz); rotate(plaintext_xor_key_sbox2); mix_column(plaintext_xor_key_sbox2,hexadecimal); key_expansion(key_bytes_128,t,hexadecimal); add_round_key(plaintext_xor_key_sbox2,key_bytes_128,plaintext_xor_key); if(t==9){ t++; } } if (t==10){ s_box(plaintext_xor_key_sbox2,plaintext_xor_key,hexadecimal,hex_duz); rotate(plaintext_xor_key_sbox2); for (int i=0;i<4;i++){ for (int j=0;j<4;j++){ for (int k=0;k<2;k++){ plaintext_xor_key_sboxt[j][i][k]=plaintext_xor_key_sbox2[i][j][k]; } } } key_expansion(key_bytes_128,t,hexadecimal); add_round_key(plaintext_xor_key_sboxt,key_bytes_128,plaintext_xor_key); printf("cipher_text: \t\t\t\t",t);end_round(plaintext_xor_key); printf("\n"); } } } char random_char(int index) { char charset[] = "abcdef0123456789"; return charset[index]; } int main(int argc, char *argv[]) { int i,j,index,k=0,tekrar =10; char rand_plaintext[tekrar][17]; char rand_plaintext_firstbyte[tekrar][17]; char hex_duz[0][2]; char hexadecimal[100]; char key[256],key2[256][2],key3[256][tekrar][2],key4[256][tekrar][2],key5[256][tekrar][2],key6[256][tekrar],round_and_plain_text_low[256][tekrar][2],round_and_plain_text_high[256][tekrar][2]; char plain_text_bytes[4][4][2]={0}; char key_bytes_128[4][4][2]={0}; char plaintext_xor_key[4][4][2]={0}; char plaintext_xor_key_sbox[4][4]={0}; char plaintext_xor_key_sbox2[4][4][2]={0}; char plaintext_xor_key_sboxt[4][4][2]={0}; char plain_text[33]="54776f204f6e65204e696e652054776f"; char key_value[33]= "5468617473206d79204b756e67204675"; srand(time(NULL)); printf("\n\n"); printf("PLAIN_TEXT :\t\t\t\t \n"); printf("------------------\n"); for (int j = 0; j < tekrar; j++) { printf("Rand%d. PLAIN_TEXT:\t\t\t",j+1); for (int i = 0; i < 32; i++) { index = rand() % 16; rand_plaintext[j][i] = random_char(index); printf("%c",rand_plaintext[j][i]); if (i<2){ rand_plaintext_firstbyte[j][i] = rand_plaintext[j][i]; rand_plaintext_firstbyte[j][2] = '\0'; } if((i+1)%2==0){ printf(" "); } }printf("\n");rand_plaintext[j][33] = '\0'; } printf("\n"); printf("PLAIN_TEXT FIRST_BYTE:\t\t\t \n"); printf("------------------------------------------\n"); for (int j = 0; j < tekrar; j++) { printf("Rand%d. plain_text first_byte:\t\t",j+1); for (int i = 0; i < 2; i++) { printf("%c",rand_plaintext_firstbyte[j][i]); if((i+1)%2==0){ printf(" "); } }printf("\n"); } printf("\n"); /* for (int j = 0; j < 256; j++) { decToHex(j,hexadecimal); key[j][1]=hexadecimal[1]; key[j][0]=hexadecimal[0]; } printf("\n"); for (int j=0; j<256; j++){ for (int k=0; k<2; k++){ printf("%c",key[j][k]); }printf(" "); } printf("\n");*/ printf("KEY ASSUMPTION:\t\t\t \n"); printf("-----------------------------\n"); for (int i=0;i<256;i++){ decToHex(i,hexadecimal); for (int k=0;k<2;k++){ key2[i][k]=hexadecimal[k]; printf("%c",key2[i][k]); }printf(" "); if ((i+1)%10==0 && i!=0){ printf("\n"); } } printf("\n\n"); printf("PLAIN_TEXT FIRST_BYTE:\t\t\t| "); for (int j = 0; j < tekrar; j++) { for (int i = 0; i < 2; i++) { printf("%c",rand_plaintext_firstbyte[j][i]); if((i+1)%2==0){ printf(" "); } } } printf("\n"); printf("----------------------------------------|-------------------------------\n"); for (int t=0;t<256;t++){ if (t<99) printf("KEY XOR PLAIN_TEXT%d. :\t\t\t| ",t+1); else printf("KEY XOR PLAIN_TEXT%d. :\t\t| ",t+1); for (i=0;i4){ round_and_plain_text_high[t][i][0]=key4[t][i][0]; round_and_plain_text_high[t][i][1]=key4[t][i][1]; int end_start_index=i+1; sprintf(destinationFolderPath2, "%s%s%03d\\%s\\", destinationFolderPath, baseFileName_1, t+1,baseFileName_3); //printf("-------destination folder : %s \n",destinationFolderPath2); copyFilesInRange(baseFileName, extension, sourceFolderPath, destinationFolderPath2, end_start_index, end_start_index); b++; } else{ round_and_plain_text_high[t][i][0]='0'; round_and_plain_text_high[t][i][1]='0'; } }printf("a: %d , b: %d, c: %d \n",a,b,c);printf("\n"); } printf("\n\n\n"); printf("PLAIN_TEXTS :\t\t\t\t| 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.\n"); printf("----------------------------------------|--------------------------------\n"); for (int t=0;t<256;t++){ if (t<99) printf("LOW PLAIN_TEXT%d. :\t\t\t| ",t+1); else printf("LOW PLAIN_TEXT%d. :\t\t\t| ",t+1); for (i=0;i