Finding the kind of encryption used - encryption

I am trying to work out what kind of encryption and / or encoding is used on some data.
At first I thought it was some kind of AES CFB encryption but I can't seem to extract anything meaningful by decrypting that way.
Was wondering if anyone knows any way to find out?
Encrypted Data
EScRJxEnEScRJxEnEScRJ+UqFRTlKhUU5SoVFOUqFRTlKhUU5SoVFOUqFRTlKhUU5SoVFOUqFRTlKhUU5SoVFOUqFRTlKhUU5SoVFOUqFRTlKhUU5SoVFOUqFRTlKhUU5SoVFOUqFRTlKhUU5SoVFOUqFRTlKhUU5SoVFOUqFRTlKhUU5SoVFOUqFRTlKhUU5SoVFOUqFRTlKhUU5SoVFOUqFRTlKhUU5SoVFOUqFRTlKhUU5SoVFOUqFRTlKhUU5SoVFOUqFRTlKhUU5SoVFOUqFRTlKhUU5SoVFOUqFRTlKhUU5SoVFOUqFRQNKwsUhStHFBEslxTjLPsUfS6vFZUvExZnME8WOTF3FtkxnxYVMp8WKTKfFj0ynxY9Mp8WPTKfFj0ynxY9Mp8WPTKfFj0ynxY9Mp8WPTKfFj0ynxY9Mp8WPTKfFj0ynxY9Mp8WPTKfFj0ynxY9MoEWPTJjFj0yYxY9MkUWPTJFFj0yRRY9MkUWPTJFFj0yRRY9MkUWPTJFFj0yRRY9MkUWPTJFFj0yRRY9MkUWPTJFFj0yRRY9MkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWHzJFFh8yRRYfMkUWH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ygFAUcoyQBHKMkARyirAEcoqwBHKKsAWyirAIMolwBVKdMAlSo3AVcswwFLLk8C2y/HAokxUwMFM8sDgTRhBIk2MwWROL8FhToPBpM7XQZtPI0Gtzy1BvM8PQe2PaAHPz7+B7w+MQj/Pj4IED9TCA0/UwgNP3sINT+rCu1A+w/BRGccv0vaLLNNDT1bRwxHfz2zS6I0Vk3lLt9NjCseTg8oH05LJhlOiyUSTuskA04MJANODCQDTgwkA04MJANODCQDTgwkA04MJANODCQDTgwkA04MJGNNdSJFTREiRU0RIkVNESJFTeMiAE4/KnBLUDXlRQ8/skCMRJ4+O0atPetGmT36RtY9z0YtPo9Gez5WRuA+CUYZP91Fjj+ARR1AC0WQQKlE60BZRHlB2kP9QV9Dl0LJQhxDQkK2Q6BBf0TAQJNFKz8fRtM8M0aLOa1E1zPrQtsvZUELLdU/bSr7PBcmDTrVIQ==
Seed
f206d6a4-b0f2-4352-ad72-7780da90f4e1

Related

Finding key of weak crypto

i'm a novice and trying the security shepard project where you have to pass challenges. https://www.owasp.org/index.php/OWASP_Security_Shepherd
I did all of the challenges but one that i have a really a hard time with.
To complete this challenge you have to find the key to an encryption method.
They just give you an application that can decrypt encrypted text.
IAAAAEkQBhEVBwpDHAFJGhYHSBYEGgocAw== gives This crypto is not strong.
Unlike other challenges there is no information in the source code.
I don't understand how I'm supposed to proceed.
Thanks
Instead of trying to find the algo, just try to find the algos which are most unlikely to be possible. for a instant, this is not a classic mono-alphabetic or key-less transposition cipher. On the other hand compare input and output bit sizes. Narrow down your possibilities like that and it will helps you to decide which cryptanalysis method to be used.
This may be not the perfect approach, but sure it's a start.

How to decrypt a string with unknow encryption algorithm, help me?

How to decrypt a string with unknow encryption algorithm?
There is a string:
AgF8ZSL8gPMgnjRt/2MQYmvTdDRxP/z0Rdt0a/2kNGhRldJcvwmShr2HtVW5nrUO8ZMqQDJhL5rpSc6xzqS7uZ42 rr9Tt5XCGMUswTKWxOlOUQ==
and
gH7PoV9ADLnysp1cLW+GJA8NfXebOkIseAUJtxaIiTD+T7eGX VXYzWw+wfFpksRWrTtMo98lm/064Zv3ZggISVzrspZpV3faC+jW82Tg3ywnrZCHihy2lub30XjH 9kT3R47gufHCPkZrBVIcaA1Nmm4uDmJLzC0FfItid2jyMiOGiW illHVBZ7HhOjFOuBlvRJwtOit801BFeqMD5kdnuon4KufDVy8N Sww0hTIxXfJmDeF/3Ks/Guu1pmj0UXnbollE5UsqqqP1HIMwdDqY/FP
I don't know the encryption algorithm. How to decrypt it?
To analyze and solve this problem, what should I learn?
If you are able to have a look at the code, that would be the easiest way. I assume that is not possible so it will probably end up in educated guessing.
However, there is a large conversation about that topic here:
https://security.stackexchange.com/questions/3989/how-to-determine-what-type-of-encoding-encryption-has-been-used
First steps would probably be to find out if it is a hash or not and if it is salted. If you were able to hash/encrypt data and look at the results, try to hash/encrypt the same data twice. If the result differs, there is probably a salt used.
Hope that helps a little.

Encryption using SHA1

I am developing a large application and i need encryption when a data is traveling between two machines in different continents. I have never worked on encryption. I want a simple encryption which can be handled in PHP / Ruby / Python without any dependencies.
So i decided to use HMAC SHA1.
$pad=hash_hmac("sha1","The quick brown....","mykey");
This is what i found out after some research on the internet.
How hard it is to decrypt it if someone doesn't know the key? Also, any alternatives to this?
UPDATE - thanks for all the responses. Problem solved.
It's impossible to decrypt it, even if you know the key. HMAC SHA1 is a keyed hash algorithm, not encryption.
A hash is a cryptographic one-way function that always generates a value of the same length (I think SHA1 is 128-bits) regardless of the length of the input. The point of a hash is that, given the output value, it's computationally infeasible to find an input value to produce that output. A keyed hash is used to prevent rainbow table attacks. Even if you know the key you can't reverse the hash process.
For encryption you want to look at AES.
SHA1 is a one-way-hash function, by definition it is not decryptable by anyone. The question becomes if you have a plaintext T that hashes to H. How hard is it to find another T which also hashes to H.
According to Wikipedia, for SHA1, the best known brute force attack would take 2^51 evlautions to find a plain text that matches.
If you need actual encryption where you can reverse the process, you should take a look at AES256.
See:
http://en.wikipedia.org/wiki/Cryptographic_hash_function
For a general discussion on this.
Like Andrew said SHA1 is an hash algorithm and cannot be used for encryption (since you cannot get back the original value). The digest it produce can be used to validate the integrity of the data.
An HMAC is a construct above an hash algorithm that accept a key. However it's not for meant for encryption (again it can't be decrypted) but it allows you to sign the data, i.e. with the same key you'll be able to ensure the data was not tampered with during it's transfer.
Foe encryption you should look at using AES or, if applicable to your application, HTTPS (which will deal with more issues than you want to know about ;-)
SHA-1 , MD-5 are all one way Hashing algorithms.
They just generate a lengthy string. Each and every string when subjected to these functions will yield you a lengthy string which cannot be retained back.
They are far from encryptions.
If you are looking for encryption algorithms , go for AES (Advanced Encryption Standard) , DES (Data Encryption Standard) Algorithms.
As I say, this is a hash, so not an encryption/decryption problem. If you want to implement a straightforward encryption algorithm, I would recommend looking into XOR encryption. If the key is long enough (longer than the message) and your key sharing policy is suitably secure, this is a one time pad; otherwise, it can potentially be broken using statistical analysis.

Improving cipher's properties sanity check

I am reading about cryptography I was thinking about these properties of AES (that I use):
same message = same ouput
no message length secrecy
possible insecurity if you know the messages (does this actually apply to AES?)
I hear that AES is secure, but what if I want to theoritcaly improve these properties?
I was thinking I could do this:
apply encryption algorithm A
XOR with random data D (making sure the output looks random in case of any cipher)
generate random data that are longer than the original message
use hashing function F to allocate slots in random data (this scrambles the order bytes)
Inputs: Encryption algorith A, Data to XOR with D and a hashing function F
My questions are
does the proposed solution theoreticaly help with my concerns?
is this approach used somewhere?
Possible enhancements to this approach
I could also say that the next position chosen by hashing function will be altered using a checksum of the last decoded byte after the XOR step (that way the message has to be decoded from beginning to end)
If I was to use this to have conversation with someone, the data to XOR with could be the last message from the other person, but thats probably a vulnerability.
I am looking forward to your thoughts!
(This is only theoretical, I am not in need of more secure encryption, just trying to learn from you guys.)
Yeah.
Look. If you want to learn about cryptography, I suggest you read Applied Cryptography. Really, just do it. You will get some nice definitive learnings, and get an understanding of what is appropriate and what is not. It specifically talks about implementation, which is what you are after.
Some rules of thumb:
Don't make up your own scheme. This is almost universally true. There may be exceptions, but it's fair to say that you should only invent your own scheme if you've thoroughly reviewed all existing schemes and have specific quantifiable reasons for them not being good enough.
Model your attacker. Find out what scenarios you are intending to protect against, and structure your system so that it works to mitigate the potential attacks.
Complexity is your enemy. Don't make your system more complex then it needs to be.
Stay up to date. You can find a few mailing lists related to cryptography and (and hashing) join them. From there you will learn interesting implementation details, and be aware of the latest attacks.
As for specifically addressing your question, well, it's confusing. I don't understand your goal, nor do I understand steps 3 and 4. You might like to take a quick look here to gain an understanding of the different ways you can use a given encryption algorithm.
Hope this helps.
You assumptions are incorrect.
same message != same output
The output will not be the same if you encrypt the same message twice.
This is because you are suppsed to use different IVs'.
Message length can be hidden by adding random data to the plaintext.
Attacks have been demonstrated against AES with lesser number of rounds.
Full-round AES has not been compromised in any way.
Other than that I suggest you follow Noon Silks recommendation and read Applied Cryptography.
What's the point of the random data XOR? If it's truly random, how will you ever decrypt it? If you're saying the random data is part of the key, you might as well drop AES and use only the truly random key - as long as it's the same length (or longer than) the data and is never used more than once to encrypt. It's called a one-time pad, the only theoretically unbreakable encryption algorithm I know about.
If the random bits are pseudo-randomly generated, it's highly unlikely that your efforts will yield added security. Consider how many talented mathematicians were involved in designing AES...
EDIT: And I too highly recommend Applied Cryptography, it's an actually very readable and interesting book, not as dry as it may sound.

How to prove inconstructable cryptographic scheme?

I realize this question might not be that programming related, and that it by many will sound like a silly question due to the intuitive logical fault of this idéa.
My question is: is it provable impossible to construct a cryptographic scheme (implementable with a turing-complete programming language) where the encrypted data can be decrypted, without exposing a decryption key to the decrypting party?
Of course, I can see the intuitive logical fault to such a scheme, but as so often with formal logic and math, a formal proof have to be constructed before assuming such a statement. Is such a proof present, or can it easely be constructed?
Thank you for advice on this one!
Edit: Thank you all for valuable input to this discussion!
YES!!! This already exists and are called zero knowledge protocols and zero knowledge proofs.
See http://en.wikipedia.org/wiki/Zero-knowledge_proof
However, you have to have a quite a good background in mathematics and crypto to understand the way it works and why it works.
One example of a zero knowledge protocol is Schnorr's ZK protocol
No; but I'm not sure you're asking what you want to be asking.
Obviously any person who is decrypting something (i.e. using a decryption key) must, obviously, have the key, otherwise they aren't decrypting it.
Are you asking about RSA, which has different keys for decrypting and encrypting? Or are you asking about a system where you may get a different (valid) result, based on the key you use?
If by "decrypted" you just mean arrive at the clear text in some way, then it is certainly possible to create such a cryptographic scheme. In fact it already exists:
Take an asymmetric encryption scheme, eg: RSA where you have the public key but not the private key. Now we get a message that's been encrypted with the public key (and therefore needs the private key to decrypt it). We can get the original message by "brute force" (yes, this'll take an enormously long time given a reasonable key/block size) going through all possible candidates and encrypting them ourselves until we get the same encrypted text. Once we get the same encrypted text we know what the decrypted text would be without ever having discovered the private key.
Yes.
Proof: Encryption can be considered as a black box, so you get an input and an output and you have no idea how the black box transforms the input to get the output.
To reverse engineer the black box, you "simply" need to enumerate all possible Turing machines until one of them does produce the same result as the one you seek.
The same applies when you want to reverse the encryption.
Granted, this will take much more time than the universe will probably live, but it's not impossible that the algorithm will find a match before time runs out.
In practice, the question is how to efficiently find the key that will decode the output. This is a much smaller problem (since you already know the algorithm).
It's called encoding.
But everyone with the encoding algorithm can "decrypt" the message. This is the only way of keyless encryption.

Resources