1

I've looked on this site and on SE. but I couldn't get a handle on this. Is there a way to find what type of encoding (and/or encode key) is being used? For example, I am testing a web application(PHP) which will encode the links before it will be showed to the end-user.

For example, the source link is: https://www.amazon.com/gp/drive/share?s=OUhODh-US9cj1EVKlakRWw

Then the encoded output the link will be: Wkt6OVpIeHBLR0J1Umx6TkdVRWRlZm03MExydXhnTTI4UEUvTGN1YkM1VW5Ma2JkQUJ4T3hMNDNhWjREZ3ZoNlUyd1lETmRoRlZlRFZlRVdNVzY0OGc9PQ==

Is there a way to find out which encode method was used and the passkey (the string that was used to mix/replace the input string to produce the output string).

Aside from just trying a bunch of common hashing/encoding sequences on the original strings and hoping to stumble across a matching output? If I have a lot of input strings and output hashes does that help in any way for analysis?

  • The padding at the end makes me think of Base64. – user42178 May 16 '14 at 19:03
1

First, a definition. In computer science, an "encoding" is an alternate way of representing data, without any effort being made to disguise the data (ASCII, EBCDIC, and ISO-8859-1 are all examples of text encodings, while base64 and uuencoding are examples of binary-to-text encodings). On the other hand, "encryption" is a method of masking the nature and value of the data (AES, DES, and RC4 are all examples of encryption, as is the much older Caesar cypher).

Figuring out what type of encryption was used to encrypt something is a form of distinguishing attack, a type of analysis encryption schemes are designed to resist. Identifying an encoding, on the other hand, can often be done through statistical or heuristic analysis.

In your case, the data is almost certainly an encoding, base64, which is simply a way of representing binary data within the limits of a system designed to handle text. Specifically, it appears to be a block of 64 bytes of binary data that has been base64-encoded twice (the double equals sign on the end is strongly reminiscent of base64, as is the general pattern of upper- and lower-case letters).

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.