crypto: Support key wrap operations + AES-KW (#34262)

* Support key wrapping operations + AES-KW

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update expectations

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* tidy

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Add allow for clippy

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Add missing spec links

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Improve JWK handling

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Fix clippy warnings

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* ./mach fmt

Signed-off-by: Daniel Adams <msub2official@gmail.com>

---------

Signed-off-by: Daniel Adams <msub2official@gmail.com>
This commit is contained in:
Daniel Adams 2024-11-18 12:54:58 -10:00 committed by GitHub
parent 8c689aac67
commit 124c5bbbf3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 533 additions and 3881 deletions

View file

@ -55,17 +55,17 @@ interface SubtleCrypto {
sequence<KeyUsage> keyUsages );
Promise<any> exportKey(KeyFormat format, CryptoKey key);
// Promise<any> wrapKey(KeyFormat format,
// CryptoKey key,
// CryptoKey wrappingKey,
// AlgorithmIdentifier wrapAlgorithm);
// Promise<CryptoKey> unwrapKey(KeyFormat format,
// BufferSource wrappedKey,
// CryptoKey unwrappingKey,
// AlgorithmIdentifier unwrapAlgorithm,
// AlgorithmIdentifier unwrappedKeyAlgorithm,
// boolean extractable,
// sequence<KeyUsage> keyUsages );
Promise<any> wrapKey(KeyFormat format,
CryptoKey key,
CryptoKey wrappingKey,
AlgorithmIdentifier wrapAlgorithm);
Promise<CryptoKey> unwrapKey(KeyFormat format,
BufferSource wrappedKey,
CryptoKey unwrappingKey,
AlgorithmIdentifier unwrapAlgorithm,
AlgorithmIdentifier unwrappedKeyAlgorithm,
boolean extractable,
sequence<KeyUsage> keyUsages );
};
// AES shared