Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 965331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:58:46+00:00 2026-05-16T01:58:46+00:00

I have been trying to solve Project Euler’s problem #59 for a while, and

  • 0

I have been trying to solve Project Euler’s problem #59 for a while, and I am having trouble because some of it seems somewhat more ambiguous than previous problems.

As background, the problem says that the given text file is encrypted text with the ASCII codes saved as numbers. The encryption method is to XOR 3 lowercase letters cyclically with the plaintext (so it is reversible). The problem asks for the key that decrypts the file to English text. How should I restrict the character set of my output to get the answer, without trying to sift through all possible plaintexts (26^3)?

I have tried restricting to letters, spaces, and punctuation, and that did not work.

To clarify: I want to determine, out of all printable ASCII characters, which ones I can probably discard and which ones I can expect to be in the plaintext string.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T01:58:47+00:00Added an answer on May 16, 2026 at 1:58 am

    Have you tried two of the most “basic” and common tools in analyzing the algorithm used?

    1. Analyze the frequency of the characters and try to match it against English letter frequency
    2. Bruteforce using keys from a wordlist, most often common words are used as keys by “dumb” users

    To analyze the frequency for this particular problem you would have to split the string every third element since the key is of length 3, you should now be able to produce three columns:

    79  59  12
    2   79  35
    8   28  20
    2   3   68
    ...
    

    you have to analyse the frequency for each column, since now they are independent of the key.

    Ok, actually took my time and constructed the 3 complete columns and counted the frequency for each of the columns and got the two most frequent item or each column:

    Col1  Col2  Col3
    71    79    68
    2     1     1
    

    Now if you check for instance: http://en.wikipedia.org/wiki/Letter_frequency
    You have the most frequent letters, and don’t forget you have spaces and other characters which is not present on that page, but I think you can assume that space is the most frequent character.

    So now it is just a matter of xor:ing the most frequent characters in the table I provided with the most frequent characters in English language, and see if you get any lowercase characters, I found a three letter word which I think is the answer with only this data.

    Good luck and by the way, it was a nice problem!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to solve this problem for a while, but couldn't with
During last three days I have been trying to solve Project Euler 15 in
I have been trying to find ways to solve the problem. Firebug said syntax
I have an interesting problem here I've been trying to solve for the last
I have been hearing a lot about Project Euler so I thought I solve
I have been trying to solve this problem for three days now, it's really
I have been searching the internet for days trying to solve this problem. I
I have been trying to solve this problem for several weeks now and it
I have been trying for hours to find a way to solve the issue,
I have been to the end of the internet and back trying to solve

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.