Data decrypted, but unwanted characters in the beginning

I am a bit new at cryptography, I tried to recover data from an old app database, I got the key and the type of encryption, it says "AES/CBC/PKCS5Padding", I used this online tool http://8gwifi.org/CipherFunctions.jsp to decrypt some strings, it decrypted but I got some characters at the beginning of my data, for example:

2cjABhgd?????samsung

?9??kj?D g?GALAXY S5
`

In that case I should only get "samsung" and "GALAXY S5", but for some reason I get characters at the beginning. I want to know why this happens and how can I automatically get rid off those characters of the beginning, because I have hundreds of lines of data that decrypts like this.

If the data at the beginning is exactly 16 characters long every time, then it is certainly the initialization value for the CBC mode, and you can simply cut them off and output the valid data starting at byte 17.

My guess is that because that web decoder provides no specific input for the IV, it does not attempt to truncate the prefix itself, and simply outputs all the data, letting you decide what to do with it.

• To be precise, we're talking about 16 bytes of IV, since characters can have variable length in certain encodings. – CodesInChaos Dec 13 '16 at 10:30