All Projects → certusone → Yubihsm Go

certusone / Yubihsm Go

Licence: apache-2.0
A Go client for the yubihsm2 binary protocol and connector service

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Yubihsm Go

W25qxx
w25qxx SPI FLASH driver for stm32 HAL
Stars: ✭ 211 (+1010.53%)
Mutual labels:  library, driver
tarantool.ex
Tarantool client library for Elixir projects
Stars: ✭ 26 (+36.84%)
Mutual labels:  connector, driver
tarantool rs
Sync/Async tarantool database connector. WORK IN PROGRESS. DON'T SHARE THIS REPO
Stars: ✭ 14 (-26.32%)
Mutual labels:  connector, driver
System.js
The library System.js designed to improve the quality of writing JavaScript source code. It contains features that allow you refactor source code. Thanks to the clear and readable functions, the code will be good understood and supported accordingly.
Stars: ✭ 6 (-68.42%)
Mutual labels:  library
Arma3launcherlib
Simple .NET library containing everything needed for a custom Arma 3 launcher.
Stars: ✭ 7 (-63.16%)
Mutual labels:  library
Minifuture
A monadic Future design pattern implementation in Swift
Stars: ✭ 16 (-15.79%)
Mutual labels:  library
Node Ntfs
Windows NT File System (NTFS) file system driver
Stars: ✭ 18 (-5.26%)
Mutual labels:  driver
Tfidf
Simple TF IDF Library
Stars: ✭ 6 (-68.42%)
Mutual labels:  library
Coord Rs
[deprecated] A simple, ergonomic vector mathematics crate for Rust
Stars: ✭ 18 (-5.26%)
Mutual labels:  library
Shpref Library
💾 Android Kotlin library. Shared preferences wrapper. (2020)
Stars: ✭ 16 (-15.79%)
Mutual labels:  library
Elongation Preview
ElongationPreview is an elegant UI push-pop style view controller. iOS library made by @Ramotion
Stars: ✭ 888 (+4573.68%)
Mutual labels:  library
Greedo Layout For Ios
Full aspect ratio grid layout for iOS
Stars: ✭ 837 (+4305.26%)
Mutual labels:  library
Scalable Image Matching
This is a image matching system for scalable and efficient matching of images from a large database. The basic idea is to compute perceptural hash value for each image and compare the similarity based on the pHash computed. Searching are scalable with the elasticsearch as the backend database.
Stars: ✭ 17 (-10.53%)
Mutual labels:  library
Sumologic Python
Sumologic's python api library
Stars: ✭ 6 (-68.42%)
Mutual labels:  library
B24
Bitrix24 Client Library
Stars: ✭ 18 (-5.26%)
Mutual labels:  library
Experiment
🔬 Elixir Library for carefully refactoring critical paths by performing experiments.
Stars: ✭ 6 (-68.42%)
Mutual labels:  library
Styledecorator
Easy string decoration with styles
Stars: ✭ 17 (-10.53%)
Mutual labels:  library
Matter
Material Design Components in Pure CSS. Materializing HTML at just one class per component 🍰
Stars: ✭ 888 (+4573.68%)
Mutual labels:  library
Storagedb
MongoDB-like API for HTML5 Storage (localStorage and sessionStorage)
Stars: ✭ 16 (-15.79%)
Mutual labels:  library
Galgo Ios
When you want your logs to be displayed on screen
Stars: ✭ 16 (-15.79%)
Mutual labels:  library

yubihsm-go

Yubihsm-go is a minimal implementation of the securechannel and connector protocol of the YubiHSM2.

It also implements a simple SessionManager which keeps connections alive and swaps them if the maximum number of messages is depleted.

Currently the following commands are implemented:

  • Reset
  • GenerateAsymmetricKey
  • SignDataEddsa
  • PutAsymmetricKey
  • GetPubKey
  • DeriveEcdh
  • Echo
  • ChangeAuthenticationKey
  • Authentication & Session related commands

Implementing new commands is really easy. Please consult commands/constructors.go and commands/response.go for reference.

Please submit a PR if you have implemented new commands or extended existing constructors.

Example of usage

c := connector.NewHTTPConnector("localhost:1234")
sm, err := yubihsm.NewSessionManager(c, 1, "password", 2)
if err != nil {
	panic(err)
}

echoMessage := []byte("test")

command, err := commands.CreateEchoCommand(echoMessage)
if err != nil {
	panic(err)
}

resp, err := sm.SendEncryptedCommand(command)
if err != nil {
	panic(err)
}

parsedResp, matched := resp.(*commands.EchoResponse)
if !matched {
	panic("invalid response type")
}

if bytes.Equal(parsedResp.Data, echoMessage) {
	println("successfully echoed data")
} else {
	panic(errors.New("echoed message did not equal requested message"))
}

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].