Created attachment 397334 [details] Test file to reproduce decryption error When you try to decrypt a file/string with an invalid key, the method returns an error - but mobile Safari just generates a garbage file/string. You can reproduce it with the attached file: - Load the attached HTML in a browser (or use this fiddle: https://jsfiddle.net/1pxwjo5d/ ) - Enter any text to be encrypted/decrypted - Enter any passphrase - Click on "Encrypt" encrypts the text - Click on "Decrypt" decrypts the text (or displays an error if the passphrase is changed) When you use an invalid passphrase for decryption, you'll see an error below the buttons. But on mobile Safari, there's no error, but instead you will get some garbage text. Programatically you can't see any difference if the decryption was successful or not. Reproduced on: Safari 13.1, iOS 13.4, WebKit 605.1.15
<rdar://problem/62378262>
That's by design to produce garbage. Otherwise, attackers can blindly attack the algorithm.