The Wayback Machine - https://web.archive.org/web/20200906082420/https://github.com/google/tink/pull/322
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PKCS11 KMSClient #322

Open
wants to merge 12 commits into
base: master
from
Open

Add PKCS11 KMSClient #322

wants to merge 12 commits into from

Conversation

@solcates
Copy link

solcates commented Mar 15, 2020

This PR adds a PKCS11 KMSClient to tink using AES256GCM for those that would like to leverage an HSM for their key management and key entropy.

It uses the crypto11 library to expose simple Go crypto interfaces to a PKCS11 device (HSM, Token, SoftHSM, etc...)

The keyURI introduced is pkcs11://KeyID in where KeyID is a unique ID in your device (ID only, labels currently not allowed).

The README.md goes into some details about the 2 modes of operation, as well as some basic benchmarks using both HSM and Wrapped keys as your tink.AEAD.

P.S. - I have struggled to get Bazelisk to build the project, so hopefully the bazel modifications work for someone with a working Bazel environment.

@googlebot googlebot added the cla: yes label Mar 15, 2020
@thaidn thaidn requested a review from sophieschmieg Mar 20, 2020
@rbroggi
Copy link

rbroggi commented Mar 21, 2020

Nice one 👍 . To be discussed as a bigger initiative for support for all of the languages featured.

@solcates
Copy link
Author

solcates commented Mar 21, 2020

For sure. Happy to toss in a few other languages, but Go is my language of choice these days :)

@thaidn thaidn mentioned this pull request Mar 21, 2020
Copy link
Contributor

Baha-sk left a comment

It's nice to see HSM support for Tink. Looking forward for this change to be included!

go/integration/pkcs11kms/README.md Outdated Show resolved Hide resolved
go/integration/pkcs11kms/key.go Show resolved Hide resolved
go/integration/pkcs11kms/key_test.go Outdated Show resolved Hide resolved
go/integration/pkcs11kms/pkcs11_aead.go Outdated Show resolved Hide resolved
go/integration/pkcs11kms/pkcs11_aead_test.go Outdated Show resolved Hide resolved
go/integration/pkcs11kms/pkcs11_client.go Outdated Show resolved Hide resolved
go/integration/pkcs11kms/pkcs11_client_test.go Outdated Show resolved Hide resolved
solcates added 2 commits Mar 21, 2020
go/WORKSPACE Show resolved Hide resolved
go/go.sum Show resolved Hide resolved
@solcates
Copy link
Author

solcates commented Apr 21, 2020

Sorry for the delayed clean up, just got a chance to get back to this.

solcates added 2 commits Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.