BlueHeighliner.Msmt 0.3.0

dotnet add package BlueHeighliner.Msmt --version 0.3.0
                    
NuGet\Install-Package BlueHeighliner.Msmt -Version 0.3.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlueHeighliner.Msmt" Version="0.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlueHeighliner.Msmt" Version="0.3.0" />
                    
Directory.Packages.props
<PackageReference Include="BlueHeighliner.Msmt" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BlueHeighliner.Msmt --version 0.3.0
                    
#r "nuget: BlueHeighliner.Msmt, 0.3.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BlueHeighliner.Msmt@0.3.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BlueHeighliner.Msmt&version=0.3.0
                    
Install as a Cake Addin
#tool nuget:?package=BlueHeighliner.Msmt&version=0.3.0
                    
Install as a Cake Tool

Msmt

NuGet License: MIT Build Coverage

A C# implementation of the Mercury Secure Message Transport (MSMT) standard - an open, standards-based interface for secure message transport over IP networks, defined by MITRE's Mercury Secure Message Transport Interface Control Document (ICD). MSMT is a fixed, narrowly pinned configuration of TLS 1.3 paired with a thin, standardized message-framing API; this library implements that interface end to end on top of BouncyCastle's TLS engine.

Installing

dotnet add package BlueHeighliner.Msmt

Getting started

A peer sends messages directly to targets and receives them directly from targets, in message mode or message-with-rekeying mode:

using BlueHeighliner.Msmt;

MsmtCredentials credentials = MsmtCredentials.FromPemFiles("identity.pem", "identity.key", "ca.pem");

// RequireFullyQualifiedHostname is disabled here only because this example connects by loopback IP
// address rather than a real DNS hostname; leave it enabled (the default) whenever a hostname is used.
IMsmtMessagePeer peer = new IMsmtMessagePeer.Factory().Create(new MsmtMessagePeerOptions { Credentials = credentials, RequireFullyQualifiedHostname = false });

// The handler owns payload and must dispose it; responder is null because this message never requested an acknowledgement.
peer.Receiver = (source, identity, payload, responder) =>
{
    using (payload)
    {
        Console.WriteLine(Encoding.UTF8.GetString(payload.Memory.Span));
    }
};

peer.StartListener(port: 5000);
peer.Send(new MsmtTarget { Host = "127.0.0.1", Port = 5000 }, "hello"u8.ToArray());

A session peer listens for and opens session connections, which are bidirectional: both sides send and receive over the same connection object.

IMsmtSessionPeer listening = new IMsmtSessionPeer.Factory().Create(new MsmtSessionPeerOptions { Credentials = credentials, RequireFullyQualifiedHostname = false });
listening.Receiver = (connection, payload, responder) =>
{
    Console.WriteLine($"got {payload.Memory.Length} bytes");
    payload.Dispose();
    responder?.Accept(); // non-null only for a message sent with Request, which must be answered, once
};
listening.Connected.Subscribe(connection => connection.Send("welcome"u8.ToArray())); // the listening side can send too
listening.StartListener(port: 5000);

IMsmtSessionPeer connecting = new IMsmtSessionPeer.Factory().Create(new MsmtSessionPeerOptions { Credentials = credentials });
connecting.Receiver = (connection, payload, responder) =>
{
    Console.WriteLine("connecting side got a message");
    payload.Dispose();
    responder?.Accept();
};
IMsmtConnection connection = connecting.Connect(new MsmtNameTarget { Host = "127.0.0.1", Port = 5000, ServerName = "127.0.0.1" });
await connection.Wait(); // still Connecting until this resolves
MsmtResponse response = await connection.Request("hello"u8.ToArray());

Documentation

File Covers
Docs/Api.md The public API's design and flow: IMsmtMessagePeer and IMsmtSessionPeer with its connections
Docs/Usage.md Usage examples for common scenarios
Docs/Architecture.md The high-level design decisions behind the library
Docs/Components/ Design/implementation detail for individual complex components, one file each
Docs/ICD.md Full Markdown transcription of the Mercury Secure Message Transport Interface Control Document (v1.2)
Docs/Project.md This repository's own tooling and workflow: Scripts/, publishing, CI
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on BlueHeighliner.Msmt:

Package Downloads
BlueHeighliner.Comlink

A peer-to-peer messaging engine built on the Mercury Secure Message Transport (MSMT) protocol, with a built-in Avalonia desktop GUI. Avalonia is a required dependency of this package, not optional — it can be run headless (no window shown), but the GUI layer and its dependencies are always present.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.0 88 9/30/2026
0.2.0 97 9/27/2026
0.1.5 128 9/12/2026