DataProofsDotnet.Rdfc 2.0.0

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

dataproofs-dotnet

Securing mechanisms for documents and credentials in .NET — the single home for both proof families defined by the W3C and IETF securing-mechanism landscape.

Package What it gives you
DataProofsDotnet.Core W3C VC Data Integrity 1.0: proof model, add/verify pipeline, cryptosuite registry, JCS suites (eddsa-jcs-2022, ecdsa-jcs-2019), verification-method resolver abstraction
DataProofsDotnet.Jose JWS, JWE, JWT, JWK; SD-JWT (RFC 9901) with Key Binding; SD-JWT VC; VC-JOSE-COSE (JOSE half)
DataProofsDotnet.Cose COSE_Sign1 (RFC 9052), CWT (RFC 8392), VC-JOSE-COSE (COSE half)
DataProofsDotnet.Rdfc JSON-LD / RDFC-1.0 canonicalization, offline-default document loader, RDFC suites (eddsa-rdfc-2022, ecdsa-rdfc-2019), bbs-2023 selective disclosure
DataProofsDotnet.Legacy Pre–Data-Integrity Linked-Data-Signature suites (Ed25519Signature2020, EcdsaSecp256r1Signature2019), JCS + RDFC variants — opt-in, for interop with existing corpora only
DataProofsDotnet.Extensions.DependencyInjection AddDataProofs(...) composition

All cryptography routes through NetCrypto; all multiformats (multibase, multicodec, Multikey) and JCS through NetCid. Keys held in a NetCrypto IKeyStore are never exported — signing accepts an ISigner or key-store alias, and JWE ECDH key agreement accepts an opaque IEcdhKey, never raw private bytes.

Getting started

git clone https://github.com/moisesja/dataproofs-dotnet.git
cd dataproofs-dotnet
dotnet build DataProofsDotnet.sln
dotnet test DataProofsDotnet.sln

Runnable, narrated examples for every feature live under samples/ — each doubles as a CI smoke test. Start with samples/README.md.

RDFC canonicalization fails closed on data loss

JSON-LD processing drops what it cannot turn into RDF, and whatever it drops is not signed. So the RDFC suites (eddsa-rdfc-2022, ecdsa-rdfc-2019, bbs-2023, and the Legacy RDFC variant) refuse such input instead of signing less than the document says (VC Data Integrity 1.0 §2.4.3):

  • Creating a proof throws ProofGenerationException with an inner JsonLdDataLossException.
  • Verification fails with DATA_LOSS_DETECTION_ERROR. A Legacy suite reports that code only when constructed with LegacyVariantVerification.ConstructedVariantOnly. By default it also tries the JCS variant, and it reports PROOF_VERIFICATION_ERROR or PROOF_TRANSFORMATION_ERROR.

Typical causes:

  • A term no @context defines. credentials/v2 has no @vocab. Define your terms, or list https://www.w3.org/ns/credentials/undefined-terms/v2 last, as VCDM 2.0 §5.2 requires. The offline loader bundles that context.
  • Proof terms no @context defines. A credentials/v1 document also needs https://w3id.org/security/data-integrity/v2. The Legacy RDFC variant needs https://w3id.org/security/suites/ed25519-2020/v1. Both are bundled.
  • An IRI that is not well formed. Examples: ?filter[id]=1, a second #, a space, a relative IRI.
  • An IRI the canonical form would respell. Examples: /a/../b, %41, HTTPS://HOST, :443. Relative IRIs resolved against an @base are respelled too, so they are refused.
  • Distinct IRIs dotNetRDF treats as one. Example: https://host next to https://host/. Their statements would merge.
  • A boolean or number with @direction. dotNetRDF types it as an XSD literal and drops the direction.

A string's base direction is carried, not refused. {"@value":"x","@language":"ar","@direction":"rtl"} is signed as "x"^^<https://www.w3.org/ns/i18n#ar_rtl>, the JSON-LD 1.1 rdfDirection: i18n-datatype representation that the reference Data Integrity implementations (jsonld-signatures and the cryptosuites built on it) sign with; the Data Integrity specifications name none. Flipping the direction breaks the proof. A verifier whose JSON-LD processor drops direction, the JSON-LD default, does not verify these proofs, as it does not verify theirs. The canonical form is byte-identical with jsonld.js for the VCDM 2.0 value-object shapes. The CHANGELOG lists the three differences on its side; the one to know is that jsonld.js drops a context-level default @direction from a credentials/v2 credential, so write the direction on the value object.

RDFC uses a local corrected copy of dotNetRDF's canonicalizer for tied blank nodes (dotnetrdf/dotnetrdf#917), with work/depth guards and Unicode code-point ordering. The committed 1,870-case corpus matches rdf-canonize 5.0.0; that implementation's UTF-16 ordering nevertheless differs from the standard when supplementary characters compete with U+E000–U+FFFF characters. This library follows the standard in that case, so those proofs do not cross-verify with that version. The CHANGELOG explains the affected old proofs and issuer-driven reissuance requirements.

An RDFC or bbs-2023 proof verifies only if the proof options the library reads (expires, domain, challenge, proofPurpose, …) are what the issuer signed, whatever @context says. That does not reach what the library does not read: @context is not signed, so an application acting on a document claim or an unmodeled proof member must pin its contexts.

ProofVerificationOptions.KnownContexts is a URI allowlist, not content authentication. Use it with approved immutable offline contexts or a loader that checks approved hashes of context content and its dependencies. Validate any stricter context-order/nesting profile separately. See the BBS service admission example for concrete request/shape/proof/concurrency limits; the library's canonicalizer work budget does not cover JSON-LD expansion or native BBS verification.

Native AOT and trimming

All six packages declare IsAotCompatible: they build with zero trim, single-file and AOT analyzer warnings, and every System.Text.Json (de)serialization uses source-generated metadata, so they work in trimmed and native-AOT applications and in .NET 10 file-based apps. CI job ac-12 runs tasks/aot-smoke, which exercises every package, under JIT, with reflection-based serialization disabled, as a file-based app and as a native-AOT binary, and requires byte-identical output from all four. As a consumer:

  • DataProofsJsonOptions.Default serializes the library's own types through source-generated metadata in every host. For your types it falls back to reflection only where the host enables it. In a trimmed or AOT application, or any project with PublishAot, register them in your own JsonSerializerContext.
  • DataIntegrityProof can be listed in your own context directly ([JsonSerializable(typeof(DataIntegrityProof))]); its previousProof converter is public for that reason.
  • Publishing Rdfc, Legacy or the DI package with native AOT surfaces warnings from Newtonsoft.Json, dotNetRdf.Core's dependency, for dynamic support the RDFC path never reaches (IL2104/IL3053). Under TreatWarningsAsErrors they fail the publish; to keep them visible but not fatal, add <WarningsNotAsErrors>$(WarningsNotAsErrors);IL2104;IL3053</WarningsNotAsErrors>. That makes every dependency's collapsed trim/AOT warnings non-fatal, not only Newtonsoft.Json's, so check that each IL2104/IL3053 in your publish log names Newtonsoft.Json and nothing else. Core, Jose and Cose produce no IL warnings.

Design documents

License

Apache-2.0. 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 (4)

Showing the top 4 NuGet packages that depend on DataProofsDotnet.Rdfc:

Package Downloads
ZcapLd.Core

.NET implementation of W3C ZCAP-LD for creating, delegating, and verifying authorization capabilities.

DataProofsDotnet.Legacy

Legacy Linked-Data-Signature cryptosuites for W3C Data Integrity: Ed25519Signature2020 and EcdsaSecp256r1Signature2019, JCS (default) and RDFC-1.0 variants, byte-compatible with zcap-dotnet's 2020-era JCS-nested wire convention. All cryptography via NetCrypto; multiformats/JCS via NetCid; RDFC via DataProofsDotnet.Rdfc.

Credentials.Rdfc

Opt-in RDFC-1.0 Data Integrity cryptosuites (eddsa-rdfc-2022, ecdsa-rdfc-2019) for credentials-dotnet. Reference this package only if you need the RDF-Dataset-Canonicalization suites: it pulls in dotNetRDF (and its transitive Newtonsoft.Json), which the System.Text.Json-only default deliberately avoids (NFR-002).

DataProofsDotnet.Extensions.DependencyInjection

Dependency-injection composition for DataProofsDotnet: AddDataProofs(...) builder-style registration of the proof pipeline, cryptosuite registry, per-package suite registrations (JCS, RDFC, bbs-2023, JOSE, COSE), and caller-supplied verification-method resolvers.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 623 11/2/2026
1.5.0 170 10/28/2026
1.4.0 127 10/28/2026
1.3.0 442 8/5/2026
1.2.1 157 8/5/2026
1.2.0 147 8/5/2026
1.1.1 5,124 7/28/2026
1.1.0 1,474 6/22/2026
1.0.1 341 6/16/2026
1.0.0 197 6/15/2026
0.1.0-preview.2 98 6/14/2026
0.1.0-preview.1 95 6/13/2026