I have developed an encryption program for android which is using a symmetric key to both encrypt and decrypt the data (AES algorithm). So I have been asked to verify that not only a reverse engineering is working correctly but also that only one key could be used to decrypt the data. One of the tests which I found is called The Known Answer Tests. So using provided encryption key and a test vector it is possible to compare the result.
AES Test Vectors: http://www.inconteam.com/software-development/41-encryption/55-aes-test-vectors
However, the problem is that provided key and provided data are in the HEX format.
So first of all I used provided key and created a string from it which did not work:
byte[] convertedKeyToByte = providedKey.getEncoded();
SecretKeySpec skeySpec = new SecretKeySpec(convertedKeyToByte , 0, convertedKeyToByte .length,
AESalgorithm);
After that I converted the string to the hex using special method which also did not work due to hex was converted to hex. In general first method should work but it does not.
Please do not yell at me if I am completely wrong because I have not done encryption before.
How is it possible to prove that AES algorithm is working as well as only one key could be used to encrypt and decrypt the data?