CryptoHives.Foundation.Threading.Debug 0.2.31-preview

This is a prerelease version of CryptoHives.Foundation.Threading.Debug.
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package CryptoHives.Foundation.Threading.Debug --version 0.2.31-preview
                    
NuGet\Install-Package CryptoHives.Foundation.Threading.Debug -Version 0.2.31-preview
                    
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="CryptoHives.Foundation.Threading.Debug" Version="0.2.31-preview" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CryptoHives.Foundation.Threading.Debug" Version="0.2.31-preview" />
                    
Directory.Packages.props
<PackageReference Include="CryptoHives.Foundation.Threading.Debug" />
                    
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 CryptoHives.Foundation.Threading.Debug --version 0.2.31-preview
                    
#r "nuget: CryptoHives.Foundation.Threading.Debug, 0.2.31-preview"
                    
#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 CryptoHives.Foundation.Threading.Debug@0.2.31-preview
                    
#: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=CryptoHives.Foundation.Threading.Debug&version=0.2.31-preview&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=CryptoHives.Foundation.Threading.Debug&version=0.2.31-preview&prerelease
                    
Install as a Cake Tool

πŸ›‘οΈ CryptoHives Open Source Initiative 🐝

An open, community-driven cryptography and performance library collection for the .NET ecosystem.


🐝 CryptoHives .NET Foundation Packages

The CryptoHives Open Source Initiative is a collection of modern, high-assurance libraries for .NET, developed and maintained by The Keepers of the CryptoHives. Each package is designed for security, interoperability, and clarity β€” making it easy to build secure systems for high performance transformation pipelines and for cryptography workloads without sacrificing developer experience.


πŸ“š Documentation


🐝 Available CryptoHives

Package Description NuGet Documentation
CryptoHives.Foundation.Memory Pooled buffers and streams NuGet Docs
CryptoHives.Foundation.Threading Pooled async synchronization NuGet Docs

More packages will be published under the CryptoHives.* namespace β€” see the Nuget CryptoHives for details.

🍯 CryptoHives Health

Azure DevOps Tests codecov FOSSA Status


🧬 Features and Design Principles

🧱 Orthogonal Design

  • All development is done on free and open-source tools, e.g. .NET SDK, Visual Studio Community Edition, Visual Studio Code, GitHub, Azure DevOps, etc.
  • Each package is designed to be orthogonal and composable with other CryptoHives packages to avoid deep cross dependencies
  • Dependencies on other packages are kept to a minimum and shall only include widely adopted, well-maintained libraries, e.g. the Microsoft.Extensions
  • OS and hardware dependencies are avoided wherever possible to ensure deterministic behavior across all platforms and runtimes, specifically for security implementations
  • There is no intention to replace or shadow existing .NET class libraries; instead, CryptoHives packages are designed to complement and extend existing functionality

⚑ High-Performance Primitives

  • CryptoHives provides a growing set of utilities designed to optimize high performance transformation pipelines and cryptography workloads.

πŸ› οΈ Memory Efficiency

  • ArrayPool-based allocators for common crypto and serialization scenarios
  • Pooled implementations of MemoryStream and IBufferWriter<T> for transformation pipelines
  • Primitives to handle ownership of pooled buffers using ReadOnlySequence<T> and ArrayPool<T>
  • Zero-copy, zero-allocation design for high-frequency cryptographic workloads and transformation pipelines

πŸš€ Concurrency Tools

  • Lightweight Async-compatible synchronization primitives based on ObjectPool and ValueTask<T>
  • High-performance threading helpers designed to reduce allocations of Task and TaskCompletionSource<T>

πŸ§ͺ Tests and Benchmarks

  • Comprehensive tests and benchmarks are available to evaluate performance across various scenarios.

πŸ” Clean-Room Cryptography (planned)

  • Fully managed implementations of symmetric and asymmetric algorithms
  • No dependency on OS or hardware cryptographic APIs
  • Deterministic behavior across all platforms and runtimes
  • Support for both classical and modern primitives (AES, ChaCha20, SHA-2/3, etc.)

πŸ”’ Fuzzed APIs (planned)

  • All libraries and public-facing APIs are planned to be fuzzed

🧩 Installation

Install via NuGet CLI:

dotnet add package CryptoHives.Foundation.Threading

Or using the Visual Studio Package Manager:

Install-Package CryptoHives.Foundation.Threading

🧠 Usage Examples


Here’s a minimal example using the CryptoHives.Foundation.Memory package:

using CryptoHives.Foundation.Memory;
using System;

public class ExampleWriter
{
    public string WritePooledChunk(ReadOnlySpan<byte> chunk)
    {
        // Use a MemoryStream backed by ArrayPool<byte> buffers
        using var writer = new ArrayPoolMemoryStream();

        writer.Write(chunk);
        ReadOnlySequence<byte> sequence = writer.GetReadOnlySequence();
        return Encoding.UTF8.GetString(sequence);
    }
}

Here’s a minimal example using the CryptoHives.Foundation.Threading package:

using CryptoHives.Foundation.Threading.Async.Pooled;
using System;

public class Example
{
    private AsyncLock _lock = new AsyncLock(); 

    public async Task AccessSharedResourceAsync()
    {
        // Due to the use of ValueTask and ObjectPools, 
        // this mutex is very fast and allocation free
        // Acquire the lock asynchronously
        using await _lock.ConfigureAwait(false);
        // Access shared async resource here
    }
}

πŸ§ͺ Clean-Room Policy

All code within the CryptoHives .NET Foundation is written and validated under strict clean-room conditions:

  • No reverse engineering or derived code from existing proprietary libraries
  • Implementations are verified against public specifications and test vectors
  • Review process includes formal algorithm validation and peer verification

πŸ” Security Policy

Security is our top priority.

If you discover a vulnerability, please do not open a public issue.
Instead, please follow the guidelines on the CryptoHives Open Source Initiative Security Page.


πŸ” Nuget Package Assembly Code Signing

Assemblies in our Nuget packages are currently not code signed. Once there is sufficient demand and funding available, the Keepers plan to implement code signing for all released packages.


πŸ“ No-Nonsense Matters

This project is released under the MIT License because open collaboration matters.
However, the Keepers are well aware that MIT-licensed code often gets copied, repackaged, or commercialized without giving credit.

If you use this code, please do so responsibly:

  • Give visible credit to the CryptoHives Open Source Initiative or The Keepers of the CryptoHives and refer to the original source.
  • Contribute improvements back and report issues.

Open source thrives on respect, not just permissive licenses.


βš–οΈ License

Each component of the CryptoHives Open Source Initiative is licensed under a SPDX-compatible license.
By default, packages use the following license tags:

// SPDX-FileCopyrightText: <year> The Keepers of the CryptoHives
// SPDX-License-Identifier: MIT

Some inherited components may use alternative MIT license headers, according to their origin and specific requirements those headers are retained.


🐝 About The Keepers of the CryptoHives

The CryptoHives Open Source Initiative project is maintained by The Keepers of the CryptoHives β€”
a collective of developers dedicated to advancing open, verifiable, and high-performance cryptography in .NET.


🧩 Contributing

Contributions, issue reports, and pull requests are welcome!

Please see the Contributing Guide before submitting code.


CryptoHives Open Source Initiative β€” Secure. Deterministic. Performant.

Β© 2025 The Keepers of the CryptoHives. All rights reserved.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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 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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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