Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Algorithms
  4. is there any decrpting algorithm that uses a dictionary to decrypt an encrypted file?

is there any decrpting algorithm that uses a dictionary to decrypt an encrypted file?

Scheduled Pinned Locked Moved Algorithms
questionalgorithmssecurityhelp
3 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Ha lee
    wrote on last edited by
    #1

    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.

    R M 2 Replies Last reply
    0
    • H Ha lee

      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.

      R Offline
      R Offline
      riced
      wrote on last edited by
      #2

      I don't know why it's wanted in your program, but have a look at this. http://en.wikipedia.org/wiki/Dictionary_attack[^] Found by googling 'dictionary attack' - easy isn't it! :)

      Regards David R --------------------------------------------------------------- "Every program eventually becomes rococo, and then rubble." - Alan Perlis

      1 Reply Last reply
      0
      • H Ha lee

        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.

        M Offline
        M Offline
        Mark Churchill
        wrote on last edited by
        #3

        ETOALIN.... The encryption algorithm is very weak, and you are expected to attack it using letter-frequency analysis. For example, in an substitution cipher for english the most common letter would correspond to E. I'd assume that they have given you an Italian dictionary text file to use. I guess they want you to try with the English dictionary to see it not work (or maybe work), so you can discuss it.

        Mark Churchill Director, Dunn & Churchill Pty Ltd Free Download: Diamond Binding: The simple, powerful, reliable, and effective data layer toolkit for Visual Studio.
        Entanglar: .Net game engine featuring automatic networking and powerful HLSL gfx binding.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups