LibWeb: Implement key generation for ML-KEM algorithms

This commit is contained in:
Tete17
2025-11-28 18:04:13 +01:00
committed by Shannon Booth
parent 336929c5a3
commit 013cf34d1b
Notes: github-actions[bot] 2025-12-30 13:18:16 +00:00
4 changed files with 100 additions and 2 deletions

View File

@@ -707,6 +707,19 @@ private:
}
};
class MLKEM : public AlgorithmMethods {
public:
virtual WebIDL::ExceptionOr<Variant<GC::Ref<CryptoKey>, GC::Ref<CryptoKeyPair>>> generate_key(AlgorithmParams const&, bool, Vector<Bindings::KeyUsage> const&) override;
static NonnullOwnPtr<AlgorithmMethods> create(JS::Realm& realm) { return adopt_own(*new MLKEM(realm)); }
private:
explicit MLKEM(JS::Realm& realm)
: AlgorithmMethods(realm)
{
}
};
struct EcdhKeyDeriveParams : public AlgorithmParams {
virtual ~EcdhKeyDeriveParams() override;