EmuSen.Pegasus.Core 0.4.0

dotnet add package EmuSen.Pegasus.Core --version 0.4.0
                    
NuGet\Install-Package EmuSen.Pegasus.Core -Version 0.4.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="EmuSen.Pegasus.Core" Version="0.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EmuSen.Pegasus.Core" Version="0.4.0" />
                    
Directory.Packages.props
<PackageReference Include="EmuSen.Pegasus.Core" />
                    
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 EmuSen.Pegasus.Core --version 0.4.0
                    
#r "nuget: EmuSen.Pegasus.Core, 0.4.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 EmuSen.Pegasus.Core@0.4.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=EmuSen.Pegasus.Core&version=0.4.0
                    
Install as a Cake Addin
#tool nuget:?package=EmuSen.Pegasus.Core&version=0.4.0
                    
Install as a Cake Tool

EmuSen.Pegasus.Core

The vocabulary two Pegasus programs have to agree on: the wire types, the frame encoding, the sealed envelope, and identity keys.

This is not a general-purpose library. It exists because Pegasus — a CRDT-backed shared notepad — and EmuSen.Chariot — the relay it reaches peers through — have to speak the same protocol, and the alternative was two implementations of a frame format kept in step by hand. It is published so the two can be developed in separate repositories, not because it is expected to be useful on its own.

It declares one dependency, FSharp.Core, and a test keeps it that way. Nothing here merges a document and nothing here opens a window: a relay is a router and a mailbox, so a server taking this package takes no CRDT and no UI toolkit with it.

What is in it

Types Handle, PeerId, PeerInfo, the Frame union, the routing Envelope
Codec frames and envelopes to bytes and back
Crypto AES-256-GCM sealing, PBKDF2 key derivation, join codes
Identity ECDSA P-256 keypairs, fingerprints, signing and verification
Attestation the mutual identity proof — a challenge each way, a signature each way
Agreement authenticated ephemeral key agreement for a control channel
Framing the length-prefixed wire, readable two ways: whole frames if you hold the key, envelope-and-opaque-payload if you do not
Handshake the pre-shared-key challenge/response that gates a connection

The split in Framing is the design's hinge. A peer holds the join code and reads whole frames; a relay holds no join code, reads only the destination, and moves a sealed payload it could not open if it wanted to.

What the sealing is and is not

Honestly stated, because a package that ships crypto and is vague about it is worse than one that ships none. Frames are sealed with AES-256-GCM under a key derived from a short spoken join code by PBKDF2-HMAC-SHA256, with a fixed salt — both peers must reach the same key from the code alone, with no round trip in which to agree a random one. An attacker can precompute against the code space; the iteration count raises the cost without changing the shape of the problem.

This is a pre-shared key for two people on a private network. It is not protection against someone who watched the pairing, and there is no forward secrecy on that path. The full threat model is docs/Pegasus_Sync.md §5 in the Pegasus repository.

Licence

MIT, as of 0.3.0. Versions 0.2.0 through 0.2.2 were published GPL-3.0-or-later and stay that way on nuget.org — see docs/Pegasus_Design.md §14.

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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.0 104 8/11/2026
0.3.0 100 8/11/2026
0.2.2 96 8/10/2026