I'm helping someone that needs to send an encrypted value with AES to a customer. The customer has not specified the block cipher mode, padding or how to generate the key. They've only said this:
Then, encrypt this string using AES encryptions with a key size of 256, a vector of length zero (or length 16 byte array if in dotnet) and the key of "XXX".
Of which the XXX key is 19 characters. I'm assuming that they're using .NET since it's mentioned. Does anyone familiar with .NET know what they might be suggesting to do with just a 19 character string for the key? We're familiar with encryption and will be using Java on our side. However without a way to know how to constructor the AES key and what cipher mode and padding to use, we can't go any further. The customer is not responding very quickly to our questions, so I thought I'd try asking here. Thanks!
There's no constructor for or method in any of the Aes classes in .net that takes in a string as a key. Keys are specified as an array of bytes, such that the length of the array is equal to the key size / 8.
One would hope that they would use a common hash algorithm to generate the key from the 19 character string. Best bet would probably be a Sha256 hash of the string.
Just to give you an idea of what that would look like in .net ...