Cyphera 0.0.1-alpha.1

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

Cyphera

CI NuGet NuGet Downloads License

Data protection SDK for .NET — format-preserving encryption (FF1/FF3), data masking, and hashing.

dotnet add package Cyphera

Usage

using Cyphera;

// Auto-discover: checks CYPHERA_POLICY_FILE env, ./cyphera.json, /etc/cyphera/cyphera.json
var c = Cyphera.Load();

// Or load from a specific file
var c = Cyphera.FromFile("./config/cyphera.json");

// Or inline config
var json = JsonDocument.Parse(@"{
  ""policies"": {
    ""ssn"": { ""engine"": ""ff1"", ""key_ref"": ""my-key"", ""tag"": ""T01"" }
  },
  ""keys"": {
    ""my-key"": { ""material"": ""2B7E151628AED2A6ABF7158809CF4F3C"" }
  }
}");
var c = Cyphera.FromConfig(json.RootElement);

// Protect
var encrypted = c.Protect("123-45-6789", "ssn");
// → "T01i6J-xF-07pX" (tagged, dashes preserved)

// Access (tag-based, no policy name needed)
var decrypted = c.Access(encrypted);
// → "123-45-6789"

Engines

Engine Reversible Description
ff1 Yes NIST SP 800-38G FF1 format-preserving encryption
ff3 Yes NIST SP 800-38G Rev 1 FF3-1 format-preserving encryption
mask No Simple pattern masking (last4, first1, full, etc.)
hash No SHA-256/384/512, HMAC when key provided

Policy File (cyphera.json)

{
  "policies": {
    "ssn": { "engine": "ff1", "key_ref": "my-key", "tag": "T01" },
    "cc": { "engine": "ff1", "key_ref": "my-key", "tag": "T02" },
    "ssn_mask": { "engine": "mask", "pattern": "last4", "tag_enabled": false }
  },
  "keys": {
    "my-key": { "material": "2B7E151628AED2A6ABF7158809CF4F3C" }
  }
}

Cross-Language Compatible

All six SDKs produce identical output for the same inputs:

Input:       123-45-6789
Java:        T01i6J-xF-07pX
Rust:        T01i6J-xF-07pX
Node:        T01i6J-xF-07pX
Python:      T01i6J-xF-07pX
Go:          T01i6J-xF-07pX
.NET:        T01i6J-xF-07pX

Status

Alpha. API is unstable. Cross-language test vectors validated against Java, Rust, Node, Python, and Go implementations.

License

Apache 2.0 — Copyright 2026 Horizon Digital Engineering LLC

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.
  • net8.0

    • No dependencies.

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.0.1-alpha.1 35 4/8/2026