Skip to content

RsaHashedKeyGenParams publicExponent is not normalized to Uint8Array #59535

@panva

Description

@panva

Subsystem

Web Cryptography API

What steps will reproduce the bug?

const kp = await crypto.subtle.generateKey({
  name: 'RSA-PSS',
  hash: 'SHA-256',
  modulusLength: 2048,
  publicExponent: Buffer.from([1, 0, 1])
}, true, ['sign', 'verify']);

kp.publicKey.algorithm

// {
//   name: 'RSA-PSS',
//   modulusLength: 2048,
//   publicExponent: <Buffer 01 00 01>,
//   hash: { name: 'SHA-256' }
// }

What is the expected behavior? Why is that the expected behavior?

It is expected that publicExponent is normalized from Buffer to Uint8Array

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions