![]() |
VOOZH | about |
dotnet add package Azure.Security.CodeTransparency --version 1.0.0-beta.8
NuGet\Install-Package Azure.Security.CodeTransparency -Version 1.0.0-beta.8
<PackageReference Include="Azure.Security.CodeTransparency" Version="1.0.0-beta.8" />
<PackageVersion Include="Azure.Security.CodeTransparency" Version="1.0.0-beta.8" />Directory.Packages.props
<PackageReference Include="Azure.Security.CodeTransparency" />Project file
paket add Azure.Security.CodeTransparency --version 1.0.0-beta.8
#r "nuget: Azure.Security.CodeTransparency, 1.0.0-beta.8"
#:package Azure.Security.CodeTransparency@1.0.0-beta.8
#addin nuget:?package=Azure.Security.CodeTransparency&version=1.0.0-beta.8&prereleaseInstall as a Cake Addin
#tool nuget:?package=Azure.Security.CodeTransparency&version=1.0.0-beta.8&prereleaseInstall as a Cake Tool
Azure.Security.CodeTransparency is based on a managed service that complies with a draft SCITT RFC. The service stores COSE signature envelopes in the Merkle tree and issues signed inclusion proofs as receipts.
Ensure you have access to the correct NuGet feed.
Install the client library via NuGet:
dotnet add package Azure.Security.CodeTransparency --prerelease
COSE_Sign1 envelopes (see example script)We guarantee that all client instance methods are thread-safe and independent of each other (guideline). This ensures that the recommendation of reusing client instances is always safe, even across threads.
Obtain a valid bearer token if the service requires authentication (see example).
There are two main use cases: submitting a COSE signature envelope and verifying the cryptographic submission receipt, which proves that the signature file was accepted.
Before submitting the COSE file, ensure the service is configured with the appropriate policy.
Use the following code to submit the signature:
CodeTransparencyClient client = new(new Uri("https://<< service name >>.confidential-ledger.azure.com"));
FileStream fileStream = File.OpenRead("signature.cose");
BinaryData content = BinaryData.FromStream(fileStream);
Operation<BinaryData> operation = await client.CreateEntryAsync(WaitUntil.Started, content);
Then obtain the transparent statement:
Response<BinaryData> operationResult = await operation.WaitForCompletionAsync();
string entryId = CborUtils.GetStringValueFromCborMapByKey(operationResult.Value.ToArray(), "EntryId");
Console.WriteLine($"The entry ID to use to retrieve the receipt and transparent statement is {{{entryId}}}");
Response<BinaryData> transparentStatementResponse = await client.GetEntryStatementAsync(entryId);
byte[] transparentStatementBytes = transparentStatementResponse.Value.ToArray();
After obtaining the transparent statement, you can distribute it so others can verify its inclusion in the service. The verifier checks that the receipt was issued for the given signature and that its signature was endorsed by the service. Because users might not know which service instance the statement came from, they can extract that information from the receipt to create the client for verification.
try
{
var verificationOptions = new CodeTransparencyVerificationOptions
{
AuthorizedDomains = new string[] { "<< service name >>.confidential-ledger.azure.com" },
AuthorizedReceiptBehavior = AuthorizedReceiptBehavior.RequireAll,
UnauthorizedReceiptBehavior = UnauthorizedReceiptBehavior.FailIfPresent
};
CodeTransparencyClient.VerifyTransparentStatement(transparentStatementBytes, verificationOptions);
Console.WriteLine("Verification succeeded: The statement was registered in the immutable ledger.");
}
catch (Exception e)
{
Console.WriteLine($"Verification failed: {e.Message}");
}
If verification completes without exception, you can trust the signature and the receipt. You can then safely inspect the files, especially the payload embedded in the COSE signature envelope.
To learn more about other APIs, see the samples.
Client options | Accessing the response | Long-running operations | Handling failures | Diagnostics | Mocking | Client lifetime
Response values returned from client methods are Response objects, which contain information about the HTTP response such as the HTTP Status property and a Headers collection with more details.
For more extensive documentation, see the API reference documentation. You can also read more about Microsoft Research's open-source Confidential Consortium Framework.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-beta.8 | 995 | 3/2/2026 |
| 1.0.0-beta.7 | 104 | 2/17/2026 |
| 1.0.0-beta.6 | 449 | 12/17/2025 |
| 1.0.0-beta.5 | 769 | 10/23/2025 |
| 1.0.0-beta.3 | 946 | 3/31/2025 |
| 1.0.0-beta.2 | 1,361 | 3/29/2024 |
| 1.0.0-beta.1 | 180 | 3/26/2024 |