问题是我有11个加密字符串,每个字符串大约有100个字符。我不是在这里写字符串,因为我不想要完整的解决方案,我只需要我应该遵循的方式。
11个字符串与密钥字符串异或。我不知道加密密钥,但我应该能够解密其中一个。我可以用java或C编写它。大写字母可能会提供有关空格的一些信息。 (如果你用空格xor小写它将是大写的,反之亦然。)
我应该遵循哪种方式?你有什么建议吗?
答案 0 :(得分:0)
没有人回答我的问题所以我正在回答我自己的问题。这里:这使答案可读,你可以猜出密码丢失的部分。
public class ThisIsTheOne {
public static void main(String[] args){
char [][] strings = {{0x31,0x5c,0x4e,0xea,0xa8,0xb5,0xf8,0xaa,0xf9,0x17,0x41,0x45,0xbf,0x43,0xe1,0x78,0x4b,0x8f,0xa0,0x0d,0xc7,0x1d,0x88,0x5a,0x80,0x4e,0x5e,0xe9,0xfa,0x40,0xb1,0x63,0x49,0xc1,0x46,0xfb,0x77,0x8c,0xdf,0x2d,0x3a,0xff,0x02,0x1d,0xff,0xf5,0xb4,0x03,0xb5,0x10,0xd0,0xd0,0x45,0x54,0x68,0xae,0xb9,0x86,0x22,0xb1,0x37,0xda,0xe8,0x57,0x55,0x3c,0xcd,0x88,0x83,0xa7,0xbc,0x37,0x52,0x0e,0x06,0xe5,0x15,0xd2,0x2c,0x95,0x4e,0xba,0x50,0x25,0xb8,0xcc,0x57,0xee,0x59,0x41,0x8c,0xe7,0xdc,0x6b,0xc4,0x15,0x56,0xbd,0xb3,0x6b,0xbc,0xa3,0xe8,0x77,0x43,0x01,0xfb,0xca,0xa3,0xb8,0x3b,0x22,0x08,0x09,0x56,0x09,0x87,0x81,0x5f,0x65,0x28,0x67,0x64,0x70,0x3d,0xe0,0xf3,0xd5,0x24,0x40,0x0a,0x19,0xb1,0x59,0x61,0x0b,0x11,0xef,0x3e},
{0x23,0x4c,0x02,0xec,0xbb,0xfb,0xaf,0xa3,0xed,0x18,0x51,0x0a,0xbd,0x11,0xfa,0x72,0x4f,0xcd,0xa2,0x01,0x8a,0x1a,0x83,0x42,0xcf,0x06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,0x20,0x70},
{0x32,0x51,0x0b,0xfb,0xac,0xfb,0xb9,0xbe,0xfd,0x54,0x41,0x5d,0xa2,0x43,0xe1,0x69,0x5e,0xca,0xbd,0x58,0xc5,0x19,0xcd,0x4b,0xd2,0x06,0x1b,0xbd,0xe2,0x4e,0xb7,0x6a,0x19,0xd8,0x4a,0xba,0x34,0xd8,0xde,0x28,0x7b,0xe8,0x4d,0x07,0xe7,0xe9,0xa3,0x0e,0xe7,0x14,0x97,0x9c,0x7e,0x11,0x23,0xa8,0xbd,0x98,0x22,0xa3,0x3e,0xca,0xf5,0x12,0x47,0x2e,0x8e,0x8f,0x8d,0xb3,0xf9,0x63,0x5c,0x19,0x49,0xe6,0x40,0xc6,0x21,0x85,0x4e,0xba,0x0d,0x79,0xec,0xcf,0x52,0xff,0x11,0x12,0x84,0xb4,0xcc,0x61,0xd1,0x19,0x02,0xae,0xbc,0x66,0xf2,0xb2,0xe4,0x36,0x43,0x4e,0xac,0xc0,0xab,0xa9,0x38,0x22,0x0b,0x08,0x48,0x00,0xc2,0xca,0x4e,0x69,0x35,0x22,0x64,0x35,0x73,0xb2,0xc4,0xce,0x35,0x05,0x0b,0x0c,0xf7,0x74,0x20,0x1f,0x0f,0xe5,0x2a,0xc9,0xf2,0x6d,0x71,0xb6,0xcf,0x61,0xa7,0x11,0xcc,0x22,0x9f,0x77,0xac,0xe7,0xaa,0x88,0xa2,0xf1,0x99,0x83,0x12,0x2b,0x11,0xbe,0x87,0xa5,0x9c,0x35,0x5d,0x25,0xf8,0xe4},
{0x32,0x51,0x0b,0xfb,0xac,0xfb,0xb9,0xbe,0xfd,0x54,0x41,0x5d,0xa2,0x43,0xe1,0x69,0x5e,0xca,0xbd,0x58,0xc5,0x19,0xcd,0x4b,0xd9,0x0f,0x1f,0xa6,0xea,0x5b,0xa4,0x7b,0x01,0xc9,0x09,0xba,0x76,0x96,0xcf,0x60,0x6e,0xf4,0x0c,0x04,0xaf,0xe1,0xac,0x0a,0xa8,0x14,0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0xba,0x41,0x0e,0x9a,0xa2,0xca,0x24,0xc5,0x47,0x4d,0xa2,0xf2,0x76,0xba,0xa3,0xac,0x32,0x59,0x18,0xb2,0xda,0xad,0xa4,0x3d,0x67,0x12,0x15,0x04,0x41,0xc2,0xe0,0x4f,0x65,0x65,0x51,0x7f,0x31,0x7d,0xa9,0xd3},
{0x27,0x19,0x46,0xf9,0xbb,0xb2,0xae,0xad,0xec,0x11,0x18,0x41,0xa8,0x1a,0xbc,0x30,0x0e,0xca,0xa0,0x1b,0xd8,0x06,0x9d,0x5c,0xc9,0x10,0x05,0xe9,0xfe,0x4a,0xad,0x6e,0x04,0xd5,0x13,0xe9,0x6d,0x99,0xde,0x25,0x69,0xbc,0x5e,0x50,0xee,0xec,0xa7,0x09,0xb5,0x0a,0x8a,0x98,0x7f,0x42,0x64,0xed,0xb6,0x89,0x6f,0xb5,0x37,0xd0,0xa7,0x16,0x13,0x2d,0xdc,0x93,0x8f,0xb0,0xf8,0x36,0x48,0x0e,0x06,0xed,0x0f,0xcd,0x6e,0x97,0x59,0xf4,0x04,0x62,0xf9,0xcf,0x57,0xf4,0x56,0x41,0x86,0xa2,0xc1,0x77,0x8f,0x15,0x43,0xef,0xa2,0x70,0xbd,0xa5,0xe9,0x33,0x42,0x1c,0xbe,0x88,0xa4,0xa5,0x22,0x22,0x19,0x0f,0x47,0x1e,0x9b,0xd1,0x5f,0x65,0x2b,0x65,0x3b,0x70,0x71,0xae,0xc5,0x9a,0x27,0x05,0x08,0x1f,0xfe,0x72,0x65,0x1d,0x08,0xf8,0x22,0xc9,0xed,0x6d,0x76,0xe4,0x8b,0x63,0xab,0x15,0xd0,0x20,0x85,0x73,0xa7,0xee,0xf0,0x27},
{0x46,0x6d,0x06,0xec,0xe9,0x98,0xb7,0xa2,0xfb,0x1d,0x46,0x4f,0xed,0x2c,0xed,0x76,0x41,0xdd,0xaa,0x3c,0xc3,0x1c,0x99,0x41,0xcf,0x11,0x0a,0xbb,0xf4,0x09,0xed,0x39,0x59,0x80,0x05,0xb3,0x39,0x9c,0xcf,0xaf,0xb6,0x1d,0x03,0x15,0xfc,0xa0,0xa3,0x14,0xbe,0x13,0x8a,0x9f,0x32,0x50,0x3b,0xed,0xac,0x80,0x67,0xf0,0x3a,0xdb,0xf3,0x57,0x5c,0x3b,0x8e,0xdc,0x9b,0xa7,0xf5,0x37,0x53,0x05,0x41,0xab,0x0f,0x9f,0x3c,0xd0,0x4f,0xf5,0x0d,0x66,0xf1,0xd5,0x59,0xba,0x52,0x0e,0x89,0xa2,0xcb,0x2a,0x83},
{0x32,0x51,0x0b,0xa9,0xba,0xbe,0xbb,0xbe,0xfd,0x00,0x15,0x47,0xa8,0x10,0xe6,0x71,0x49,0xca,0xee,0x11,0xd9,0x45,0xcd,0x7f,0xc8,0x1a,0x05,0xe9,0xf8,0x5a,0xac,0x65,0x0e,0x90,0x52,0xba,0x6a,0x8c,0xd8,0x25,0x7b,0xf1,0x4d,0x13,0xe6,0xf0,0xa8,0x03,0xb5,0x4f,0xde,0x9e,0x77,0x47,0x2d,0xbf,0xf8,0x9d,0x71,0xb5,0x7b,0xdd,0xef,0x12,0x13,0x36,0xcb,0x85,0xcc,0xb8,0xf3,0x31,0x5f,0x4b,0x52,0xe3,0x01,0xd1,0x6e,0x9f,0x52,0xf9,0x04}};
char[][] answer = new char [11][83];
int k=0, l=0;
int i = 0, j=0;
int count = 0;
for (i=0; i<=10; i++){
for (j=0; j<=82; j++){
if (j>82 || l>82) break;
count = 0;
l=j;
for (k=0;k<=10;k++) {
if (i==k){
k++;
}
if (j>82 || l>82 || i >10 || k>10) break;
char temp = (char) (strings [i][j] ^ strings[k][l]);
if (temp == 32 || (temp > 64 && temp <91) || (temp >96 && temp <123) ) {
count++;
if (count>4)
answer[i][j] = ' ';
else
answer[i][j] = (char) (temp ^ ' ');
}
}
}
}
for (i=0; i<=10; i++){
System.out.print("\nString "+ i+"- ");
for (j=0; j<=82; j++) {
l = j;
System.out.print(answer[i][j]);
}
}
}
}