Miroshin Stepan

Results 356 comments of Miroshin Stepan

It's not clear which mechanism it uses. WebCrypto implements AES-CBC, AES-CTR, AES-ECB, and AES-GCM encryption mechanisms.

@a-zog Looks like `crypto-js` uses PBKDF2 mechanism for AES key derivation and use it for message encryption/decryption. But it's not clear which params and paddings it uses. If you could...

Try something like this ```js const pbkdf2Key = await crypto.subtle.importKey( "raw", passwordView, // Password in Uint8Array format "PBKDF2", false, ["deriveKey", "deriveBits"] ); const aesKey = await crypto.subtle.deriveKey( { name: "PBKDF2",...

I see `iv` and `salt` params in your script. `cipherParams.iv.toString()` and `cipherParams.salt.toString()`

SoftHSM runs `C_InitToken` for `--init-token` command. Looking through their implementation and trying to reproduce the same logic using the `graphene` module

Here is my example. It works fine with SoftHSM **TypeScript** ```ts import * as graphene from "graphene-pk11"; const soPin = "12345"; const userPin = "12345"; const label = "NodeJS slot...

Just used this page for your certificate importing. It works fine. Please try to generate a self-signed certificate using https://tools.fortifyapp.com Some PKCS#11 providers doesn't allow adding crypto objects via `C_CopyObject`...

Is it possible to enable logging for your PKCS11 library to understand which attribute is wrong? Each manufacturer of PKCS11 library allow to do it. Because PKCS11 API returns code...

> Can we specify the key of imported Cert before import? It's impossible. I think we should improve our `node-webcrypto-p11` module and make it possible to find out the existing...

Maybe the problem is in Buffer usage. Its `buffer` property is greater than init value. ```js Buffer.from("test").buffer ArrayBuffer { [Uint8Contents]: , byteLength: 8192 ``` @colourful-land Could you try updated `getCorrectBuffer`?...