Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

Web Crypto API with IE11 (AES-GCM)

$
0
0

I'm trying to use web crypto API with IE11 and encrypt/decrypt using AES-256-GCM. Encryption works fine, but decryption with the same parameters fails, without any advice what is wrong:

// key: 32 bytes// iv: 12 bytes// auth: 16 bytes// data: tried 16-10000 bytes; result of previous encryptfunction decrypt(key, iv, auth, data, cb){var decryptOp = window.msCrypto.subtle.decrypt({
      name:"AES-GCM",
      iv: iv,
      additionalData: auth,
      tagLength:128}, key, data);

   decryptOp.onerror =function(ev){
      cb(ev);};

   decryptOp.oncomplete =function(ev){var dec = ev.target.result;
      cb(null, dec);};}

I know that IE11 has an older version of the web crypto API spec. Encryption/decryption with other browsers (tested Chrome and Firefox) with same parameters works. I can't find any examples for AES-GCM decryption with IE11 and the API documentation on https://msdn.microsoft.com/de-de/library/dn302338(v=vs.85).aspx is not detailed enough. If I use AES-CBC I can successfully encrypt/decrypt. What is wrong with AES-GCM?

Did anyone try AES-GCM with web crypto on IE11?


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>