82284

Encryption/Encoding Algorithm

Question:

I have an unencrypted/unencoded string - "565040574". I also have the encrypted/encoded string for this string - "BSubW2AUWrSCL7dk9ucoiA==".

It looks like this string has been Base64ed after encryption, but I don't know which encryption algorithm has been used. If I convert "BSubW2AUWrSCL7dk9ucoiA==" string to bytes using Convert.FromBase64String("BSubW2AUWrSCL7dk9ucoiA=="), I get 16 bytes.

Is there anything using which I can know what type of encryption has been used to encrypt the "565040574" to "BSubW2AUWrSCL7dk9ucoiA=="?

Answer1:

No, there is nothing to tell you how it was encrypted. If you don't have the key to decrypt it then you will be out of luck anyway.

If the plan was to save this to a file or send it in email then it would be base-64 encoded, so that was a good guess.

You may be able to narrow down what it is not by looking at the fact that you have 7 bytes of padding perhaps, but whether it was IDEA or Blowfish or AES, there is no way to know.

Answer2:

Looking at it, from the top of my head I would say AES and more specifically Rijndael.

EDIT:

Just to add, as I said in my comment, without the key you will never know what this is. I am taking it on a best guess scenario, also based on implementations that could be termed "more common", which could also be a complete oversight from me.

Remember that if you can ever outright say what algorithm a ciphertext is in, never, ever use that algorithm.

Answer3:

What can you tell from the data you have? Well, the most concrete bit of information you have is that 9 bytes of cleartext encrypts to 16 bytes of ciphertext. Since it is unlikely that a data compression algorithm is being used on such a small chunk of data, this means we can make an educated guess that:

<ul><li>

It is encrypted with a block cipher, with a block size <= 128 bits.

</li> <li>

The encryption mode is ECB, since there is no room for an IV.

</li> </ul>

Recommend

  • Javascript variables for Get http
  • How do I make openssl_encrypt pad the input to the required block size?
  • Specify regression line intercept (R & ggplot2)
  • How to read data from a text file if the file location is not known in c#?
  • How to customize whisker lines on a geom_box plot differently than the lines of the box itself
  • View/Download Pdf Files in React - Router 4
  • C++/CLI Thread synchronization including managed and unmanaged code
  • Is is safe to use HSQLDB for production? (JBoss AS5.1)
  • ggplot2: make the points on the line a darker color than the line color
  • C#: Import/Export Settings into/from a File
  • In matplotlib, how do you change the fontsize of a single figure?
  • netsh acl setting (need alternative method - registry settings?)
  • how to set variables in a php include file?
  • Spring: No transaction manager has been configured
  • android google indoor map
  • accepts_nested_attributes_for practical form use for in Rails 3
  • Object and struct member access and address offset calculation
  • How can I set a binding to a Combox in a UserControl?
  • How do I access an unhandled exception in an MVC Error view?
  • AJAX Html Editor Extender upload image appearing blank
  • Display images in Django
  • Word Open XML Mail Merge
  • Email verification using google app script and google forms
  • Recording logins for password protected directories
  • Email format validation in mvc3 view
  • C# - Is there a limit to the size of an httpWebRequest stream?
  • Different response to non-authenticated users and AJAX calls
  • C# - Serializing and deserializing static member
  • Updating server-side rendering client-side
  • Incrementing object id automatically JS constructor (static method and variable)
  • sending/ receiving email in Java
  • In LanguageTool, how do you create a dictionary and use it for spell checking?
  • Do create extension work in single-user mode in postgres?
  • How to pass list parameters for each object using Spring MVC?
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • Load html files in TinyMce
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • coudnt use logback because of log4j
  • Exception on Android 4.0 `android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode)`
  • sending mail using smtp is too slow