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

AES-GCM Using IE 11 window.msCrypto.subtle

$
0
0

I have developed an experimental web application for decrypting records using the W3C's draft web cryptography API. Since browser support is limited, I have been using the NfWebCrypto polyfill. Decryption works fine after I patched the source to allow varying IV sizes (96bits in my case, as to follow the NIST specification). 

Yesterday I discovered that IE 11 has draft web cryptography support (way to go IE)! The code I had written previously followed object oriented principles, so supporting IE was fairly simple. However, AES-GCM decryption is failing. I was curious, perhaps in my tired frustration, if anyone had any insight as to what IV sizes are supported? Additionally, what is the best way to debug the webcryptography code? I attempted using the IE debugger... but that hung up (crashed) on me with probability 1. Using the NfWebCrypto plugin I could debug the CPP source and inspect the errors.

I have included a snippet of my method, if that might help.  

	_AESGCM_decrypt:function(callback, key, ciphertext, iv, aad, tag_length, time, cryptoSubtle) {
		var decryptOp = cryptoSubtle.decrypt(
			{
				name: "AES-GCM",
				iv: iv,
				additionalData: aad,
				tagLength: tag_length
			}, 
			key, 
			ciphertext
		);
	    decryptOp.onerror = function (e) {
	    	console.log("Decryption failed.", e.target.result);
	    };
	    decryptOp.oncomplete = function (e) {
	    	var plaintext = e.target.result;
			var time_ns = (performance.now()-time);
			callback(plaintext, time_ns);
	    };		
	},



Viewing all articles
Browse latest Browse all 3527

Trending Articles



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