Skip to content

Crypto Service SDK for .NET

A typed, async .NET client for the Crypto Service REST API (crypto-server v2): hashing, authenticated encryption, signatures, post-quantum KEM and signatures, HPKE and KMS calls from C#, F# or any .NET language. The server holds the keys and does the cryptography; this package turns its JSON into typed calls, and crypto-service's conformance kit proves it against a live server in CI.

using CryptoService.Sdk;

await using var client = new CryptoServiceClient(new CryptoServiceClientOptions
{
    BaseUrl = new Uri("http://127.0.0.1:3000"),
    ApiKey = Environment.GetEnvironmentVariable("CRYPTO_SERVICE_API_KEY"),
});
HashResult digest = await client.HashAsync(new HashRequest { Algorithm = "sha256", Data = "hello" });
Console.WriteLine(digest.Digest);

In this manual