Open rimifon opened 3 years ago
You are so lucky. I'm currently working on implementing AES-GCM and will release after a few hours. https://github.com/Hinaser/jscrypto
Please be patient.
So lucky!!!
You are so lucky. I'm currently working on implementing AES-GCM and will release after a few hours. https://github.com/Hinaser/jscrypto
Please be patient.
10 hours left ...
Hi I've just released jscrypto 0.2.0, which implements AES-GCM/GMAC! :tada::tada:
Please read README on my repository in order to understand how to use it.
Here is a summary.
Galois Counter Mode for authenticated encryption.
////////////////////////////////////////////////////////////////////////////////////////
// Authenticated encryption by AES-GCM
////////////////////////////////////////////////////////////////////////////////////////
var key = JsCrypto.Hex.parse("0123456789ABCDEF11113333555577770123456789ABCDEF1111333355557777");
var msg = JsCrypto.Hex.parse("00000000000000000000000000000000");
var iv = JsCrypto.Hex.parse("000000000000000000000000"); // 96bit(12byte) iv is recommended.
var authData = JsCrypto.Utf8.parse("some plain text data for authentication. This will not be encrypted.");
var encryptedData = JsCrypto.AES.encrypt(msg, key, { iv, mode: JsCrypto.mode.GCM, authData });
// Encrypted message
var cipherText = encryptedData.cipherText;
// Authentication Tag
var authTag = encryptedData.authTag;
var decryptedData = JsCrypto.AES.decrypt(encryptedData, key, { iv, mode: JsCrypto.mode.GCM, authData });
// Encrypt/Decrypt as usual
decryptedData.toString() === msg.toString(); // true
// Verify authentication code as well as HMAC
authTag.toString() === JsCrypto.mode.GCM.hash(JsCrypto.AES, key, iv, authData, encryptedData.cipherText).toString(); // true
How to make it work in ASP or WSF ?
I can use window.crypto object in bownser. but I expect to use it in ASP. ``
what i can do ?