Vso-hash-cuda - CUDA implementation of the BuildXL paged hash (a.k.a. VSO-Hash)

Overview

vso-hash-cuda

Golang implementation of the BuildXL paged hash function (a.k.a. VSO-Hash)

See https://github.com/microsoft/BuildXL/blob/master/Documentation/Specs/PagedHash.md for more information about the function in general.

See https://github.com/peterebden/vso-hash for a CPU-based implementation.

Building

I (unsurprisingly) recommend building this with Please. It should be as simple as ./pleasew run //cmd:go_main to run the Go version of it. You will obviously have to have the CUDA tools installed (nvidia-cuda-toolkit etc) for anything to work.

If you want to build it using go build, you will have to manually invoke nvcc first:

nvcc --shared --compiler-options='-fPIC' -o libsha256.so sha256.cu
go build

Unfortunately go test doesn't work. It's also unlikely to ever be go get-able since there's no way of scripting that nvcc invocation. See the link above for more details on plz which can do that!

Notes

Currently this is (sadly) losing to the CPU version in terms of performance, although does have the advantage that most of your CPU cores are still available for doing other things. Most likely it is limited by something else at this point, e.g. CPU, memory bandwidth or general implementation tomfoolery. Since it's mostly a learning project at the moment I'm not highly motivated to dig into the details of exactly what is going wrong.

The Sequential0 test is not working; no doubt there is some silly edge case that isn't being handled correctly (I've already fixed one of these but when it didn't immediately fix the problem I gave up).

The contents of sha256.cu are heavily based on https://github.com/B-Con/crypto-algorithms/blob/master/sha256.c by Brad Conte.

You might also like...
`age-plugin-yubikey` implementation, encrypt things with a Yubikey/any PIV card

This is an age plugin for PIV cards/Yubikey. Your secret is kept safe on the tamperproof hardware, while letting you use the age command-line.

Interblockchain communication protocol (IBC) implementation in Golang.

ibc-go Interblockchain communication protocol (IBC) implementation in Golang built as a SDK module. Components Core The core/ directory contains the S

Implementation of the Filecoin protocol, written in Go
Implementation of the Filecoin protocol, written in Go

Project Lotus - 莲 Lotus is an implementation of the Filecoin Distributed Storage Network. For more details about Filecoin, check out the Filecoin Spec

Go implementation of Ethereum proof of stake

Prysm: An Ethereum Consensus Implementation Written in Go This is the core repository for Prysm, a Golang implementation of the Ethereum Consensus spe

Pure Go implementation of the NaCL set of API's

go-nacl This is a pure Go implementation of the API's available in NaCL: https://nacl.cr.yp.to. Compared with the implementation in golang.org/x/crypt

Go implementation of the Data At Rest Encryption (DARE) format.

Secure IO Go implementation of the Data At Rest Encryption (DARE) format. Introduction It is a common problem to store data securely - especially on u

Celer cBridge relay node implementation in Golang

cBridge Relay Node Official implementation of cBridge relay node in Golang. Prerequisites Prepare Machine To run a cBridge relay node, it is recommend

A simple implementation of SHA-256 Algorith in Go Language

SHA-256 in Go This is not a serious/efficient implementation of SHA-256 in Go. You can use the official package for that. This is just for learning pu

Go Implementation of the Spacemesh protocol full node. 💾⏰💪
Go Implementation of the Spacemesh protocol full node. 💾⏰💪

A Programmable Cryptocurrency go-spacemesh 💾 ⏰ 💪 Thanks for your interest in this open source project. This repo is the go implementation of the Spa

Owner
Peter Ebden
Peter Ebden
A drop-in replacement to any Writer type, which also calculates a hash using the provided hash type.

writehasher A drop-in replacement to any Writer type, which also calculates a hash using the provided hash type. Example package main import ( "fmt"

Max 0 Jan 10, 2022
Go implementation of BLAKE2 (b) cryptographic hash function (optimized for 64-bit platforms).

Go implementation of BLAKE2b collision-resistant cryptographic hash function created by Jean-Philippe Aumasson, Samuel Neves, Zooko Wilcox-O'Hearn, an

Dmitry Chestnykh 90 Jul 11, 2022
Go language implementation of a blockchain based on the BDLS BFT protocol. The implementation was adapted from Ethereum and Sperax implementation

BDLS protocol based PoS Blockchain Most functionalities of this client is similar to the Ethereum golang implementation. If you do not find your quest

Yongge Wang 1 Oct 14, 2022
Hashkill - A fast hash decryptor with golang

Hashkill ♻️ Changelog v0.2 Added timing Fixed running, the program breaks if all

null 5 Mar 24, 2022
A tool that creates requests with the given urls and converts its response to md5 hash.

Response Converter A tool that creates requests with the given urls and converts its response to md5 hash. Prerequisites Before you begin you must hav

Ali 0 Nov 20, 2022
An implementation of JOSE standards (JWE, JWS, JWT) in Go

Go JOSE Package jose aims to provide an implementation of the Javascript Object Signing and Encryption set of standards. This includes support for JSO

Square 2k Jan 8, 2023
Go implementation of SipHash-2-4, a fast short-input PRF created by Jean-Philippe Aumasson and Daniel J. Bernstein.

SipHash (Go) Go implementation of SipHash-2-4, a fast short-input PRF created by Jean-Philippe Aumasson and Daniel J. Bernstein (http://131002.net/sip

Dmitry Chestnykh 248 Dec 25, 2022
A simplified blockchain implementation in Golang

A simplified blockchain implementation in Golang

Ivan Kuznetsov 3.7k Dec 31, 2022
A full node Bitcoin (BSV) implementation written in Go

bsvd bsvd is a full node Bitcoin (BSV) implementation written in Go (golang). This project is a port of the bchd codebase to Bitcoin (BSV). It provide

null 42 Dec 25, 2022
Merchant API reference implementation

mAPI More details available in the BRFC Spec for Merchant API. The old golang (v1.1) implementation is no longer being maintained and has been moved t

Bitcoin SV 21 Dec 14, 2022