Dp9ik.Tls 0.3.0

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

dp9ik.net

9front's dp9ik authentication for .NET, in managed code.

Package Contents
Dp9ik passtokey, AuthPAK (SPAKE2-EE over Ed448-Goldilocks with Decaf and Elligator 2), form 1 (ChaCha20-Poly1305) and form 0 (DES) tickets and authenticators, ticket requests, and the dp9ik session secret
Dp9ik.P9Auth The server side of the p9any/dp9ik exchange over a Stream
Dp9ik.Tls TLS 1.2 PSK keyed by the session secret, as tlssrv and tlsclient -a use it

The cryptography uses BouncyCastle. No native code, OpenSSL or helper processes are involved.

Compatibility

Message formats and key derivations follow 9front libauthsrv (passtokey.c, authpak.c, form1.c, convT2M.c, convM2T.c, convM2TR.c) and factotum's dp9ik session secret. The tests compare every primitive with a reference built from drawterm's libauthsrv.

As in 9front:

  • user names hold at most 27 bytes and the auth domain 47, leaving room for the C terminator (ANAMELEN, DOMLEN);
  • received tickets and ticket requests have their names terminated;
  • a dp9ik server refuses form 0 tickets;
  • the TLS channel offers only TLS_PSK_WITH_CHACHA20_POLY1305_SHA256, TLS_PSK_WITH_AES_128_CBC_SHA256 and TLS_PSK_WITH_AES_128_CBC_SHA with PSK identity p9secret.

Use

Authenticate a client on a server whose key is registered with the auth server for its domain, then open the encrypted channel:

using Dp9ik.P9Auth;
using Dp9ik.Tls;

var config = new AuthServerConfig(Domain: "example.org", User: "bootes", Password: serverPassword);
P9AuthResult result = await P9AuthProtocol.AuthenticateAsync(stream, config, cancellationToken);
Stream channel = await P9PskTls.AcceptAsync(stream, result.Secret, cancellationToken);
// result.User is the authenticated client user.

License

MIT. See LICENSE.

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.3.0 94 10/2/2026
0.2.0 98 10/2/2026
0.1.0 94 10/1/2026