is there any decryption algorithm that uses a dictionary to decrypyt an encrypted file?
-
well I have been working on an assigment and it states:: A program has to be developed, and coded in C language, to decipher a document written in Italian that is encoded using a secret key. The secret key is obtained as random permutation of all the uppercase letters, lowercase letters, numbers and blank space. As an example, let us consider the following two strings: Plain: “ABCDEFGHIJKLMNOPQRSTUVXWYZabcdefghijklmnopqrstuvwxyz0123456789 ” Code: “BZJ9y0KePWopxYkQlRjhzsaNTFAtM7H6S24fC5mcIgXbnLOq8Uid 3EDv1ruVGw” The secret key modifies only letters, numbers, and spaces of the original document, while the remaining characters are left unchanged. The document is stored in a text file whose length is unknown. The program has to read the document, find the secret key (which by definition is unknown; the above table is just an example and it is not the key used for preparing the sample files available on the web course) using a suitable decoding algorithm, and write the decoded document to a new text file. And I know that I have to upload an English dictionary into the program but I don't why it has been asked.(may be not in that statement but I have to dO THAT). My question is , while I can do that program using simple encryption/decryption algorithm then what's the use of uploading the english dictionary in our program? So is there any decryption algorithm that uses a dictionary to decrypt an encrypted file? or can somebody tell me what approach or algorithm should I use to solve that problem??? An early reply (and also authentic one) will be highly appreciated from you. Thank you guys.
-
well I have been working on an assigment and it states:: A program has to be developed, and coded in C language, to decipher a document written in Italian that is encoded using a secret key. The secret key is obtained as random permutation of all the uppercase letters, lowercase letters, numbers and blank space. As an example, let us consider the following two strings: Plain: “ABCDEFGHIJKLMNOPQRSTUVXWYZabcdefghijklmnopqrstuvwxyz0123456789 ” Code: “BZJ9y0KePWopxYkQlRjhzsaNTFAtM7H6S24fC5mcIgXbnLOq8Uid 3EDv1ruVGw” The secret key modifies only letters, numbers, and spaces of the original document, while the remaining characters are left unchanged. The document is stored in a text file whose length is unknown. The program has to read the document, find the secret key (which by definition is unknown; the above table is just an example and it is not the key used for preparing the sample files available on the web course) using a suitable decoding algorithm, and write the decoded document to a new text file. And I know that I have to upload an English dictionary into the program but I don't why it has been asked.(may be not in that statement but I have to dO THAT). My question is , while I can do that program using simple encryption/decryption algorithm then what's the use of uploading the english dictionary in our program? So is there any decryption algorithm that uses a dictionary to decrypt an encrypted file? or can somebody tell me what approach or algorithm should I use to solve that problem??? An early reply (and also authentic one) will be highly appreciated from you. Thank you guys.
Piece of cake. There are only 63 factorial different permutations possible, so try each one and see what comes out. OBTW 63 factorial is only 2.0*10^87 and as I remember, there are only 10^80 elementary particles in the known universe, but who's counting. Dave. PS: I do love a mystery and cyphers, this being the only reason that I responded to a homework question. If they had writen the message in English, then I could see the English dictionary - a way to see what the possibilities were. But written in Italian? Why just an English dictionary? An English/Italian dictionary, maybe, but English? I don't know enough about Italian to know is there is a possessive usage or about contractions thus "'s " or "'t " may or may not be useful in determining what the blank might be. Once you can split words up, things get a bit easier. Just as a wild off the wall guess, have you tried Caesar's cypher?
-
Piece of cake. There are only 63 factorial different permutations possible, so try each one and see what comes out. OBTW 63 factorial is only 2.0*10^87 and as I remember, there are only 10^80 elementary particles in the known universe, but who's counting. Dave. PS: I do love a mystery and cyphers, this being the only reason that I responded to a homework question. If they had writen the message in English, then I could see the English dictionary - a way to see what the possibilities were. But written in Italian? Why just an English dictionary? An English/Italian dictionary, maybe, but English? I don't know enough about Italian to know is there is a possessive usage or about contractions thus "'s " or "'t " may or may not be useful in determining what the blank might be. Once you can split words up, things get a bit easier. Just as a wild off the wall guess, have you tried Caesar's cypher?
quite helpful it is Dave. yeah the blank is represented by w as I have figured it out. so between two w there is a word. And accept my apology, actually the project is same but in 2 languages. so I have to upload an English dictionary if the text is in English and Italian dictionary if the text is in Italian. But I mixed up 2 different things. So how can I proceed with that?? should I use all the permutations on each word separately??? How can Caesar cipher be helpful in that case? Actually I am a C programmer but don't know much about cryptography, that's why I am seeking help here. I would be thankful to you if you explain me things how to do it in a simple and detailed way. Thank you Dave. HA Lee
-
quite helpful it is Dave. yeah the blank is represented by w as I have figured it out. so between two w there is a word. And accept my apology, actually the project is same but in 2 languages. so I have to upload an English dictionary if the text is in English and Italian dictionary if the text is in Italian. But I mixed up 2 different things. So how can I proceed with that?? should I use all the permutations on each word separately??? How can Caesar cipher be helpful in that case? Actually I am a C programmer but don't know much about cryptography, that's why I am seeking help here. I would be thankful to you if you explain me things how to do it in a simple and detailed way. Thank you Dave. HA Lee
HA, Well, you have cut that permutation count down to 62 factorial. Good luck. As with any decryption, you need to know the language it was written in in order to see if the proposed decryption makes any sense. This is why encrypting something twice, with two different algos, is such a bitch to decrypt. The first decryption will give you an intermediate text that is still encrypted so you don't know if the first decrypted correctly until you try to decrypt the second time. Dave.
-
quite helpful it is Dave. yeah the blank is represented by w as I have figured it out. so between two w there is a word. And accept my apology, actually the project is same but in 2 languages. so I have to upload an English dictionary if the text is in English and Italian dictionary if the text is in Italian. But I mixed up 2 different things. So how can I proceed with that?? should I use all the permutations on each word separately??? How can Caesar cipher be helpful in that case? Actually I am a C programmer but don't know much about cryptography, that's why I am seeking help here. I would be thankful to you if you explain me things how to do it in a simple and detailed way. Thank you Dave. HA Lee