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...
I would like to call methods of SubtleCrypto from a worker. Usually, it is possible via the Crypto.subtle properties available in a window context :   Eg: window.crypto.subtle.encrypt()  In a worker, window is not available, but crypto can still be a...
I am using WebCrypto with RSASSA-PKCS1-v1_5 (https://github.com/diafygi/webcrypto-examples#rsassa-pkcs1-v1_5---sign) and I need to export the public key to PEM format using javascript code.  The documentation says that is possible to export the key i...
I was wondering how do I solve this problem. I generate RSA-OAEP keypair using WebCrypto API, then I export private key in pkcs8 from the keypair which exports as ArrayBuffer and I want to encode this ArrayBuffer into base64 so I can store it as a PE...
Suppose I wanted to add client-side encryption to a web application using the JavaScript Web Crypto API. The client side of my application would encrypt each user's data using their key before sending the encrypted data to the server, and decrypt...
I was wondering how to encrypt and decrypt a video with WebCrypto API using AES and a custom key. I have only found this code and only indicates how to encrypt the video but not how to decrypt it, also uses a random key. Thank you in advance.    func...
I have an application where I generate a username & a password for each user.  Since these two are generated directly after each other, can an attacker know the password from the username?  I'm asking because the username & password are n...
I have the following code to decrypt AES encrypted data with the Javascript Webcrypto-API, but it results in an "OperationError" with the message "The operation failed for an operation-specific reason":    function loadHexToArrybuffer...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.