This may be a basic question but bear with me.
I started encrypting a text with aes 256 cbc mode generating a random iv of 16 bytes and a key.
text = 'hi I am learning encryption.';
Then I created another random iv and tried to decrypt the encrypted text. ( I know we are supposed to use the same iv we used for encryption to decrypt the ciphered text).
The result came as
(some rubbish text) encryption.
Then I padded the main text with 16 random characters, encrypted it and decrypted it I get my actual text padded with some junk text at the start.
I am unable to figure out why it messes with the first 16 bytes of text and then successfully extracts the remaining.
Can you explain?