I'm trying to use WebCrypto to sign a token with RSA-PSS, but I keep getting the error:  DataError: Data provided to an operation does not meet requirements   at crypto.subtle.importKey.  This is my JavaScript code:  function signToken(token, key...
I've managed to encrypt some data with AES-GCM using IE 11 on Windows 10 but I can't get decryption to work. Example encryption JS code:  let plainText = new Uint8Array([1]); let key; let keyBuf = window.msCrypto.getRandomValues(new Uint8Arra...
I have the following code to test WebCrypto API. It works in Firefox and Chrome and I am trying to make it work in Safari.    function ab2str(buf) {       return String.fromCharCode.apply(null, new Uint16Array(buf));     }  //converts a forge 0.6.x s...
On MS Edge following unwrapping code works:  window.crypto.subtle.unwrapKey(                                 "raw",                                 wrappedKey,                                 derivedKey,                                 { "...
I'm trying to sign data using the WebCrypto API, but instead of creating a private/public  key and exporting it to pkcs#1 or 8, I would really like to use a user's PKCS#12 to sign data. I've read the W3C spec, but cannot make much of it a...
I have a web server that allows access only using X509 authentication. Works like a charm. Now I want to extend the use of the X509 certificates (which are stored in the user's browser keystore) to   Sign data before it is sent to the server (usi...
I want to use Web Cryptography API on an already existing project.  To encrypt and decrypt something I have to use an CryptoKey, but when I save to CryptoKey into localStorage it only saves the String (CryptoKey) instead of the object.  Is it possibl...
Using JavaScript and WebCrypto API (without any external library), what is the best way to encrypt a string using a key derived from a user-submitted password?  Here's some code where the key is not derived but simply generated by the generatekey...
I am evaluating how WebCrypto performance compares to third-party crypto libraries SJCL and Forge. I would expect WebCrypto to be much faster since it is a native browser implementation. This has also been benchmarked before and has shown such.  I ha...
It is surprisingly difficult to set the entropy, or seed, for the Web Crypto API in javascript.   Why is this the case? Is it to make things difficult for developers?  Setting seeds allows you to deterministically run on sample data. The Web Crypto A...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.