dotnet add package lthash --version 1.0.0
NuGet\Install-Package lthash -Version 1.0.0
<PackageReference Include="lthash" Version="1.0.0" />
paket add lthash --version 1.0.0
#r "nuget: lthash, 1.0.0"
// Install lthash as a Cake Addin #addin nuget:?package=lthash&version=1.0.0 // Install lthash as a Cake Tool #tool nuget:?package=lthash&version=1.0.0
A C# implementation of LtHASH (Lattice Hash), a homomorphic hashing algorithm based on lattice cryptography introduced by Mihir Bellare and Daniele Micciancio in this paper. This is a simplified C# porting of the Facebook Folly C++ Library implementation of the algorithm introduced here.
A homomorphic hash can simplistically be defined as a hash function such that one can compute the hash of a composite block from the hashes of the individual blocks or rather being f1 and f2 two hash functions and op1, op2 two operations it is true that:
f1(a op1 b) = f2(a) op2 f2(b)
One of the main building blocks of a homomorphic hashing function is therefore an underlying hash function (our f2). This project depends on this C# implementation of the BLAKE3 cryptographic hash function.
var ltHash = new Lthash32(); // Create an initial checksum of two inputs ltHash.Add(System.Text.Encoding.UTF8.GetBytes("apple"), System.Text.Encoding.UTF8.GetBytes("orange")); var checksum = ltHash.GetChecksum(); // Remove the hash of "apple" from the checksum and check // if the two checksums are equals ltHash.Remove(System.Text.Encoding.UTF8.GetBytes("apple")); var isEqual = ltHash.ChecksumEquals(checksum); // Update the hash of "orange" with the new value "apple" // and check if the two checksums are equals ltHash.Update(System.Text.Encoding.UTF8.GetBytes("orange"), System.Text.Encoding.UTF8.GetBytes("apple")); isEqual = ltHash.ChecksumEquals(checksum); // Adding again the missing "orange" and check if the // checksum is equal to the initial checksum ltHash.Add(System.Text.Encoding.UTF8.GetBytes("orange")); isEqual = ltHash.ChecksumEquals(checksum);
|Product||Versions Compatible and additional computed target framework versions.|
|.NET||net5.0 is compatible. 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 was computed. net8.0-android 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.|
- Blake3 (>= 0.3.0)
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.