Files
tubestation/dom/mls/MLSTransactionMessage.h
Benjamin Beurdouche ee87d439fe Bug 1900537 - Part 3: Web API for MLS. r=webidl,ipc-reviewers,smaug,nika
This patch contains an experimental Web API for the Messaging Layer Security (RFC 9420) protocol.
The API allows to securely generate cryptographic material and build large dynamic groups with state-of-the-art security.

The state (both public and secret) is stored in the profile and isolated by origin within dedicated databases.
No secret can be exfiltrated through the API, and privacy risks are minimized due to the selected isolation.

Differential Revision: https://phabricator.services.mozilla.com/D210568
2024-12-06 20:50:42 +00:00

53 lines
2.1 KiB
C++

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_MLSTransactionMessage_h
#define mozilla_dom_MLSTransactionMessage_h
#include "nsTArray.h"
#include "ipc/IPCMessageUtilsSpecializations.h"
#include "mozilla/security/mls/mls_gk_ffi_generated.h"
#include "ipc/EnumSerializer.h"
#include "ipc/IPCMessageUtils.h"
using namespace mozilla::security::mls;
namespace IPC {
template <>
struct ParamTraits<mozilla::security::mls::GkReceived::Tag>
: public ContiguousEnumSerializerInclusive<
mozilla::security::mls::GkReceived::Tag,
mozilla::security::mls::GkReceived::Tag::None,
mozilla::security::mls::GkReceived::Tag::CommitOutput> {};
template <>
struct ParamTraits<mozilla::security::mls::GkReceived> {
using paramType = mozilla::security::mls::GkReceived;
static void Write(MessageWriter* aWriter, const paramType& aValue);
static bool Read(MessageReader* aReader, paramType* aResult);
};
DEFINE_IPC_SERIALIZER_WITH_FIELDS(mozilla::security::mls::GkGroupIdEpoch,
group_id, group_epoch);
DEFINE_IPC_SERIALIZER_WITH_FIELDS(mozilla::security::mls::GkMlsCommitOutput,
commit, welcome, group_info, ratchet_tree,
identity);
DEFINE_IPC_SERIALIZER_WITH_FIELDS(mozilla::security::mls::GkClientIdentifiers,
identity, credential);
DEFINE_IPC_SERIALIZER_WITH_FIELDS(mozilla::security::mls::GkGroupMembers,
group_id, group_epoch, group_members);
DEFINE_IPC_SERIALIZER_WITH_FIELDS(mozilla::security::mls::GkExporterOutput,
group_id, group_epoch, label, context,
exporter);
}; // namespace IPC
#endif // mozilla_dom_MLSTransactionMessage_h