I have a little problem with encryption. I have this cipher text "AA969CF9657F77C597C8EAFF1594D59374E4977F" and i know that correspond to "http://jogos.meo.pt/". I have another samples, but i can´t find any analogy or logic, with the intuit to discover the algorithm of encryption. Can anybody help me??I really need this...!
From the samples you gave, it doesn't look like very sophisticated encryption. What you're trying to do is a Known-plaintext attack on this system.
The known-plaintext attack (KPA) is an attack model for cryptanalysis where the attacker has samples of both the plaintext (called a crib), and its encrypted version (ciphertext). These can be used to reveal further secret information such as secret keys and code books. Wikipedia entry on Known-plaintext Attacks
For example, the first
h appears to be consistently encrypted to
AA. The last example two letters
o have sequential encryptions:
94. You may be able to find other commonalities.
The odd part of this is that you have access to a lot of plain-text and cipher-text. This seems to indicate that you can encrypt what you want, or a chosen-plaintext attack. These are usually more informative than known-plaintext.
Look at the ciphertexts you have, and look for similarities. If you can find similarities, it may be a weak cipher. For example,
- your ciphertext is always twice as long as your plaintext.
- look at the characters in the ciphertext. They're hexadecimal (0-F). Two hexadecimal characters can represent one byte - one character in a computer. This matches with my previous point very nicely - each character is being encoded as a hexidecimal value
- wherever there's an 'h' in your plaintext, there's an 'AA' in your ciphertext (well, at twice the distance into the ciphertext - if 'h' is at index 5, 'AA' is at index 10).
- the '/' character always seems to encode as 7F, regardless of index in the string
This implies a simple substitution cipher with output hex encoded.