Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
107 views

I have the following code that should encrypt a string with a password in nodeJS. You can find an example here: https://jsfiddle.net/ujr4gev3/1/ I have also tried the approach here: https://gist....
user31167817's user avatar
0 votes
2 answers
194 views

I want to find out if the 2 methods shown below achieve the same level of entropy. For this first secure method, a 32 byte / 256 bit key and a 12 byte / 96 bit nonce are generated using the JavaScript ...
suchislife's user avatar
  • 5,034
1 vote
1 answer
197 views

I have a sample client-side HTML webpage that allows a user to upload a file to a NodeJS file storage server. When a user uploads a file from the webpage, the client's browser encrypts the file with a ...
Samor1922's user avatar
0 votes
1 answer
111 views

The web crypto API defines two different KDF utilities, namely deriveBits and deriveKey. While the former allows you to specify the desired output length (RFC 5869 calls this parameter L), the latter ...
Sebastian S's user avatar
  • 4,762
0 votes
1 answer
334 views

I use @azure/msal-browser in my project. Account information are stored in the local storage and they were exploitable until recently. But it changed in their v4 release: if you are using the ...
fservantdev's user avatar
0 votes
0 answers
82 views

I'm working on a client-certificate based authentication of users for a website. The server configuration part is OK (Apache server, keywords: SSLCACertificateFile / SSLVerifyDepth / SSLVerifyClient ...
fpierrat's user avatar
  • 818
0 votes
1 answer
55 views

I want to use one public key to wrap another public key. Almost everything works right up until the unwrapKey step. It throws an opaque DataError with no further information about what is wrong. ...
Jonah's user avatar
  • 10.1k
0 votes
1 answer
132 views

My application calls for encrypting one public key with another public key. I can generate both keys, but calling wrapKey throws an OperationError with no details regarding why it is failing. const {...
Jonah's user avatar
  • 10.1k
1 vote
1 answer
343 views

I am using node.js 22. The secure curves in webcrypto spec (scroll down to 'Export Key') says raw is a supported export format for Ed25519: import { webcrypto } from "node:crypto"; const ...
mikemaccana's user avatar
0 votes
1 answer
336 views

I'm using the webcrypto API and have a valid Ed25519 private key stored as a UInt8Array. I would like to use the private key in KeyPair. Here's my attempt so far: import { webcrypto } from "node:...
mikemaccana's user avatar
0 votes
1 answer
230 views

how to use the pbkdf2 derivation function in the (firefox) browser's webcrypto api to obtain the same result as the sjcl.misc.pbkdf2 function (stanford javascript crypto library) or the “derive pbkdf2 ...
Patatetom's user avatar
0 votes
1 answer
99 views

I am developing a session encryption scheme, but when I try to decrypt the session key using the private key, I receive an OperationError. // This method generates the keys static async ...
Daniel Moreira's user avatar
0 votes
1 answer
97 views

I created ECDSA key pair using openssl openssl ecparam -name prime256v1 -genkey -noout -out ecdsa_private_key.pem openssl ec -in ecdsa_private_key.pem -pubout -out ecdsa_public_key.pem and using ...
vanilla's user avatar
  • 145
0 votes
1 answer
144 views

I am using @peculiar/webcrypto 1.5.0.(node v18.18.2) To test my logic, I need crypto.subtle. Below is simple test code in my jest.setup.js. const { Crypto } = require('@peculiar/webcrypto'); global....
Juneyoung Oh's user avatar
  • 7,734
0 votes
1 answer
469 views

I am trying to encrypt a string using RSA-OAEP-SHA-512 in the WebCrypto API (client side) and then I want to decrypt the string again using Java (server side). However, the server side decryption ...
Roggab32's user avatar
0 votes
1 answer
119 views

I'm using the k6 JavaScript API to run tests, k6 is very limited when it comes to using libraries, so to do EC cryptography I'm using k6/experimental/webcrypto: import { crypto } from "k6/...
HapaxLegomenon's user avatar
0 votes
1 answer
1k views

I have been playing with WebCrypto, building a little Astro site with an encoded block that is decoded using it (I know this wouldn't be particularly secure, it's not going to be used for anything ...
Phillip Gooch's user avatar
0 votes
1 answer
1k views

I'm having a security requirement not to send data as plain-text to the server and the credentials shouldn't be visible in the network tab of the browser. I could have used hashing but the catch is we ...
Aditya's user avatar
  • 56
0 votes
1 answer
175 views

I've been developing an app with TIDAL's auth web sdk. In it, they call SubtleCrypto's wrapKey function using parameters nearly identical to those in the example in the MDN docs. const wrapCryptoKey = ...
SlippStream's user avatar
0 votes
1 answer
212 views

I am trying to verify a ECDSA, SHA-256 key. But i am unable to do so with the web crypto API. My code looks like this- export async function verifySignature( requestData: string, ...
Suman Maharjan's user avatar
0 votes
1 answer
178 views

I am trying to authenticate a CloudKit web services request using the Web Crypto API. I already have authentication using the node crypto API, and have verified this works: import Crypto from 'crypto' ...
Finn Voorhees's user avatar
0 votes
1 answer
314 views

I have the following task. I have to generate ECDSA key pair. Sign data with the private key and verify the signature in PHP. For some unknown for me reason i am unable to verify the data successfuly. ...
David Pankov's user avatar
0 votes
1 answer
356 views

I have some code in JavaScript running inside the browser using WebCrypto. It uses AES-GCM to encrypt some data. I generate a key and then export it to hex, then generate an initialization vector, and ...
xrd's user avatar
  • 4,091
0 votes
0 answers
207 views

I have a message encrypted in PHP like this: function encode(string $input): string { return base64EncodeSafe(encodeOpenSsl($input)); } function encodeOpenSsl(string $string): string { if (!...
Haidrex's user avatar
  • 33
0 votes
1 answer
387 views

I have some code to encrypt text in PHP, it looks like this: $key = '1234aaaff80b56233525ac2355ac3456'; // something like this $utf16Content = \mb_convert_encoding('Some text', 'UTF-16LE'); $cipher = '...
RobertC's user avatar
  • 37
0 votes
1 answer
992 views

Here's my code: var key = 'aaaaaaaaaaaaaaaa' var iv = 'bbbbbbbbbbbbbbbb'; var ciphertext = '10f42fd95857ed2775cfbc4b471bc213'; // from https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/...
neubert's user avatar
  • 17k
0 votes
0 answers
240 views

I’m currently facing a challenge with the Web Crypto API. While attempting to perform decryption, I’ve noticed that it functions as expected when the ionic application is in the foreground. However, ...
Staha's user avatar
  • 9
1 vote
1 answer
499 views

I have generated a private key as follows: openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048 openssl rsa -pubout -in private_key.pem -out public_key.pem openssl pkcs8 ...
ibrahim tanyalcin's user avatar
2 votes
1 answer
365 views

I can perform verification in Node Crypto without problem and it outputs true, but when i tried with Web Crypto it outputs false without any errors but both using same variables. I can't use Node ...
James's user avatar
  • 21
3 votes
1 answer
7k views

I'm trying to use crypto.subtle.digest() as part of a checksum function for a file upload project I'm working on but for some reason I keep getting the following error: upload-form.tsx:129 Uncaught ...
davidguy's user avatar
0 votes
0 answers
663 views

Here is the minimum code needed to replicate the issue, the error I'm getting is generic and not descriptive at all DOMException: The operation failed for an operation-specific reason in short it ...
Jason 'Slingshot' Miller's user avatar
2 votes
2 answers
521 views

I have a simple string of text that needs to be signed inside a Javascript and verified on the server (PHP). To start my test I first created a key pair: // Function to generate a new RSA key pair ...
Jason 'Slingshot' Miller's user avatar
0 votes
1 answer
96 views

As a part of my JS code, using web crypto, I wanted to sign a string, serialize it and later deserialize it and verify it. For this I created these custom functions createHexTokenFromStrClaim and ...
Anurag Vohra's user avatar
  • 2,033
0 votes
1 answer
120 views

I'm trying to sign a text using WEB Crypto API. I'm depending on a 3rd party to extract the certificate from a smart card, which returns a Base64 string representation of it. As far as I understand, ...
watermelonCode's user avatar
0 votes
1 answer
2k views

It might be a little problem but I'm neither getting any specific error nor getting any solution. I am building a full stack project. In here I need a condition where I have to encrypt a content in ...
MD DANISH's user avatar
0 votes
1 answer
251 views

I'm using the Web Crypto API in an Angular (v15) application to decrypt a hex-encoded string encrypted with AES/CBC/PKCS7Padding. The implementation works as expected when served in the development ...
sriyanjith's user avatar
1 vote
1 answer
308 views

This is a follow-up question to a previous one, trying to get a working decryption of NDEF URLs from an NXP NTAG424 tag according to this documentation from NXP (4.4.2.1). I've put together an initial ...
BarakChamo's user avatar
  • 3,595
1 vote
1 answer
243 views

I m trying to encrypt file in browser uisng webcrypto api. I m using chunking mechanism too so that i can encrypt and decrypt large files without crashing browser. My provided code is working if i m ...
bulsaka's user avatar
  • 21
0 votes
1 answer
194 views

I've generated 2 sets of private/public keys and exported to pem, now I'm trying to import them into both Swift & a JS script but they seem to be generating different shared keys so swift can't ...
eskimo's user avatar
  • 356
0 votes
0 answers
165 views

I'm developing an E2EE web chat app to learn more about encryption. I'm using WebCrypto API and hash-wasm for encryption, and Firebase to store data such as encrypted keypairs and messages. When a ...
natsume's user avatar
-1 votes
1 answer
709 views

I've been trying to run this system where I can encrypt in blazor webassembly (server side) and decrypt it in client side using JSInterop, but I can't figure out the error "OperationError" ...
Jake Rebullo's user avatar
1 vote
1 answer
196 views

I need to achieve what is done here using java: import javax.crypto.*; import java.security.*; import java.util.*; .... // Generate a random salt byte[] salt = Base64.getDecoder().decode(&...
Timmy's user avatar
  • 11
1 vote
1 answer
117 views

I'm trying to use SubtleCrypto (interface of the Web Crypto API) to generate an RSA private key. But in the validation step, the manually calculated public exponent differs from JWK.e in 50% of cases. ...
Andrey Brill's user avatar
1 vote
0 answers
272 views

Problem I getting a strange errors when export a RSA-PSS public key from node with SPKI DER and import them with importKey of webcrypto.subtle to simulate the in-broweser context inside tests. Key ...
Kote Isaev's user avatar
1 vote
1 answer
633 views

Is there a way to generate truly random bitcoin private key without relying on 3rd party libraries like ECPair nor tiny-secp256k1? As a recommended approach to generate secure random key is to use ...
Maksim Shamihulau's user avatar
0 votes
1 answer
170 views

Is it possible to create a TypeScript assertion function that asserts the type of something other than the arguments passed to it – a global, for instance: // Pseudo-code function ...
steveluscher's user avatar
  • 4,228
1 vote
0 answers
470 views

I am creating PublicKey and PrivateKey to sign and verify data in in .net core with below code. ECDsa ecDsaVerify = ECDsa.Create(ECCurve.NamedCurves.nistP384); byte[] publicKey = ecDsaVerify....
Tech Yogesh's user avatar
2 votes
0 answers
154 views

I am currently utilizing the WebCrypto API, specifically SubtleCrypto. I store CryptoKey in IndexedDB and call it as needed. As far as I know, IndexedDB is a serialized database. If I can access ...
YGK's user avatar
  • 21
3 votes
1 answer
445 views

Setup: I generate a key-encryption-key (kek, AES-GCM, 256) I generate a RSA-OAEP keypair I wrap the generated private key with the kek using AES-GCM-256 and a random iv, exported as pkcs8 I try to ...
shilomig's user avatar
1 vote
1 answer
1k views

When using the browser built in Crypto Subtle in Javascript to sign a message, do we need to sign the hash of the encoded message or the encoded message itself? The reason I ask is because as per the ...
sudoExclamationExclamation's user avatar

1
2 3 4 5
7