How to start reverse engineering a algorithm by key [closed] - algorithm

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I have a set of keys e.g (IENDKCAGI, RZRLBYBFH) and now I want to find the algorithm of it. I allready know the basics of cryptography but I don't know how to start reverse engeneering the algorithm.
I don't search a certain algorithm, I'm just interested how the process would look like.
cheers
EDIT: I don't want to crack any key!!! I buy the software I need!
I'm just interested in the approach of reengeneering a checksum from the result, thats my conceptual formulation, without knowing the algorythm. This topic is more theorethical, but in my opinion it has a certain relevancy also for stackoverflow

You can analyze it to some degree, at least enough to rule out several possibilities. You say you have a set of keys, and I'm not sure what you mean by that, so pretend for discussion that the left value is the plaintext and the right value is the encrypted equivalent.
You can determine that the left value has only one repeating character, "I", and that the right value has two, "R" and "B". From that you can rule out a simple substitution cipher, even one with characters rearranged.
Both values appear to have only characters in the range [A-Z] (a larger sample would help confirm), so you can rule out encryption techniques that yield binary results, like most block and stream ciphers. In fact, use of such a limited character set implies that it was designed for use by people rather than machines. That would imply a relatively simple cipher technique, but may also involve an additional key to which you do not have access.

Related

Strong encryption done by hand [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
One of the distinguishing features of a good encryption algorithm, is that it is easy to encrypt, and hard to crack. Are there any that are easy enough for average folk to remember, and calculate by hand, and still stand up to brute force attacks on a computer.
Imagine, a prisoner (with pen and paper) sending a message to another inmate, and the guards seize the handwritten message - and put their prison-crypto-cracking department on it.
Currently, I am thinking TEA is the best candidate, but pretty hard to remember I think.
Yes, there are examples of strong cryptographic algorithms which can be implemented by hand. For example, in Neal Stephenson's classic - the Cryptonomicon, there's an algorithm called Solitaire (or Pontifex) developed by Bruce Schneier for use with a deck of playing cards. Here is Wikipedia's explanation, and here is the description from the author's home page.
One-time pads are do-able by hand and impossible to crack, unless the opponent gets hold of the one-time pad. Have each prisoner make up a bunch of one-time pads, number them according to some scheme, have them exchange the pads, then when transmitting the message have a set of cues as to which pad will be used, e.g. if you hand it at this part of the prison or with this gesture then use this pad, etc.
Bruce Schneier's solitaire cipher is designed to be operated by hand using only a deck of cards. There is also the VIC cipher actually used by a Soviet spy in the 1950s. Both are cumbersome to actually operate by hand, though it is possible.

Naive approaches to detecting plagiarism? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Let's say you wanted to compare essays by students and see if one of those essays was plagiarized. How would you go about this in a naive manner (i.e. not too complicated approach)? Of course, there are simple ways like comparing the words used in the essays, and complicated ways like using compressing functions, but what are some other ways to check plagiarism without too much complexity/theory?
There are several papers giving several approaches, I recommend reading this
The paper shows an algorithm based on an index structure
built over the entire file collection.
So they say their algorithm can be used to find similar code fragments in a large software system. Before the index is built, all the files in the
collection are tokenized. This is a simple parsing problem, and can be solved in
linear time. For each of the N files in the collection, The output of the tokenizer
for a file F_i is a string of n_i tokens.
here is other paper you could read
Other good algorithm is a scam based algorithm that consists on detecting plagiarism by making comparison on a set of words that are common between test document
and registered document. Our plagiarism detection system, like many Information Retrieval systems, is evaluated with metrics of precision and recall.
You could take a look at Dick Grune's similarity comparator, which claims to work on natural language texts as well (I've only tried it on software). The algorithms are described as well. (By the way, his book on parsing is really good, in my opinion.)

Tricky Encryption Algorithm Design [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Bob and Alice each have a bit string they want to keep private. They each want to know what the logical AND of their two bit strings would be without telling the other or anyone else their actual bit strings... how can they do this? Keep in mind that even once they both hold the AND of their two bit strings, they should still not be able to calculate the other person's string exactly (unless of course one of their strings was all 1s).
I know that I have seen something similar before in some sort of key system/voting system but I couldn't remember the details. It has to be something like make a private random key, xor it and use that somehow... but I couldn't work out the details. Any clever encryption people out there?
I think that you are looking for homomorphic encryption systems, in which it's possible to do computation on encrypted values without ever exposing what those encrypted values are. This encompasses a far more general set of problems than simply computing bitwise AND.
Hope this helps!

Challenging Problems Involving Stacks (Data Structures) [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Does anyone know where I can get lots of challenging programming problems that involve the use of stacks? I'll like to challenge myself with super hard problems.
My Favorite
Convert Prefix expression to Postfix using stack
Implement a stack with O(1) for access to max element
Implement tower of hanoi without
recursion. :)
Take any damn recursive program , which is recursive by intuition, and try to implement it iteratively. Every recursive has a iterative solution.
That should keep you busy for a while. :)
BTW,
Why dont you buy/borrow "Data Structures Using C and C++" by langsam/tennenbaum ?
YOu will get sufficient problem for a week. :)
A Google search for stack data structure problems turns up lots of interesting stuff. Here are a few interesting ones (from easier to harder, in my judgment):
Check for balanced parentheses, braces, and other paired delimiters in text.
Write a postfix calculator. (So 1 3 2 4 + * - should calculate 1 - (3 * (2+4)).)
Use stacks to solve the "N queens" problem. (Place N queens on an N x N chess board so that no two queens are on the same row, column, or diagonal.)
Cracking the Coding Interview, Fourth Edition: 150 Programming Interview Questions and Solutions:
http://www.amazon.com/Cracking-Coding-Interview-Fourth-Programming/dp/145157827X
Chapter 3 is dedicated to stacks and queues questions. Here is a sample question:
How would you design a stack which, in addition to push and pop, also has a function min which returns the minimum element? Push, pop and min should all operate in O(1) time.
You could learn a stack-based language, like Forth, or a stack virtual machine, like MS's CIL VM. Either one will force you to reconsider how you implement anything you write in it to make use of stacks.
Go to the library and look at textbooks on data structures. They should all be shelved together, so you can always just find the call number for your current textbook and the others will be right nearby.
I'd expect most would have chapters specifically on stacks, with end-of-chapter problems. There will be a lot of overlap, but you should be able to get a good selection of problems of varying difficulty, along with a range of different explanations for standard problems.

Simple random english sentence generator [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I need a simple random English sentence generator. I need to populate it with my own words, but it needs to be capable of making longer sentences that at least follow the rules of English, even if they don't make sense.
I expect there are millions of them out there, so rather than re-inventing the wheel, I'm hoping you know of a source for one, or a resource that will give me enough information that I don't have to hunt down my rusty English skills.
You're looking for an implementation of markov chains for English sentences.
A quick Google search for "markov chain sentence generator" returned:
http://www.jwz.org/dadadodo/
http://code.google.com/p/lorem-ipsum-generator/
http://kartoffelsalad.googlecode.com/svn-history/r9/trunk/lib/markov.py
I know this is an old question, but as I found it via Google I think it's worth mentioning something like Context Free Grammars in addition to Markov Chains.
My understanding of Markov Chains is that they create the "next" item probabilistically only according to what the "current" item is. Perhaps I'm mistaken, but I don't see how this would ensure that the result would follow grammatical rules.
For instance, I usually see Markov Chains suggested as a way of creating "English sounding" words. If you create a Markov chain using letters from a dataset of English words, the output would be a word that sounds English, but it wouldn't necessarily be a real word. I believe the same would be true of sentences- you can generate something which may sound ok, but it may not be a grammatically correct sentence.
Context Free Grammars (or possibly also Regular Grammars?) might be a better candidate, since they generate sentences according to a defined ruleset. And it would be easy to populate it with your own words, as the original question requests. The downside is that you need to define these rules yourself, rather than relying on a dataset. It's been a long time since I've used a grammar to generate an English sentence, so I don't remember how hard it was to get good / varied responses.
You might be able to use/modify part of the CS Paper Generator.

Resources