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

  • SEARCH
  • Home
  • 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 6609991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:47:02+00:00 2026-05-25T19:47:02+00:00

I’ve been given an encrypted file where the plaintext has a common (but not

  • 0

I’ve been given an encrypted file where the plaintext has a “common (but not extremely common these days)” format. ~80000 bytes
It has been encrypted with what I would describe as a Vigenere cipher with modified encryption table. One byte of the key and one byte of the plaintext map to one byte of the ciphertext.
The keystring has a certain length, so the key character used for encryption cycles through the keystring.
The key contains only alphanumeric characters.

So far I’ve determined that the keylength is 30/60 by finding the least common divisor of the start position of repeated triples in the ciphertext. Pretty standard for Vigenere.

Now, I’ve been guessing at possible characters for the key by observing what the decrypted bytes would be and eliminating possibilities if they fall outside of acceptable ranges (since 32-126 are visible, no values between 16-31, etc.)
This worked for the first part, which had a small key and the plaintext was straight ASCII.

When I try it for the larger file and “new file format” it rejects all possible characters.
This eliminates ASCII, Ascii85, Base64, windows-1252, utf-7, QP and uuencode as they all rely on the ASCII character set. I’ve also made filters for EBCDIC and ISO8859-1 which rejected all keys. Utf-8 also failed because no key would make all bytes begin with either 0,10,110,1110,11110,111110 or 1111110.

The remaining character encodings I haven’t tried that I suspect are UTF-16,32,1 which I’m unsure of how to filter.

My questions are:

  • are there other character encodings that I am forgetting?
  • Is it possible that I’m filtering out too much and that some out of bound characters should be allowed to slide through?
  • Could file format mean something other than character encoding? if so, how do I reconcile that with the filter still breaking on ASCII characters?
  • What if the file format means compressed or archived?

Here is the filtering code I use, the filter is variable depending on what I’m trying to sift out.

void guessCrypt(string fileName, int keyLength, int index)
{
    byte[] file = cast(byte[])read(fileName);
    foreach(key;ValidKeyChars)
    {
        bool work = true;
        for(int x = index; x < file.length-10; x+=keyLength)
        {
            byte single = file[x];
            int res = sdecrypt(single,key);
            if ((res < 32 && res > 15) || res > 126) //FILTER - this one ASCII
            {
                work = false;
                break;
            }
        }
        if (work == true)
        {
            writefln("\nwork: %s",key);
        }
    }

}
  • 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-25T19:47:03+00:00Added an answer on May 25, 2026 at 7:47 pm

    I would suggest not even bothering with existing encodings; treat it as another layer of a substitution cipher, and work out based on letter frequencies what maps to what. If the characters are, in fact, contiguous, that will only help your analysis. And once you know what they really map to, you can work from there to find what character set it, in fact, was.

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

Sidebar

Related Questions

I want to count how many characters a certain string has in PHP, but
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I need to clean up various Word 'smart' characters in user input, including but
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
i want to parse a xhtml file and display in UITableView. what is the

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.