{"repo":"salrashid123/golang-jwt-tpm","free":true,"listed":false,"github":"https://github.com/salrashid123/golang-jwt-tpm","clone":"git clone https://github.com/salrashid123/golang-jwt-tpm.git","description":"Generate and verify JWT tokens with Trusted Platform Module (TPM)","language":"Go","stars":15,"topics":["golang","jwt","trusted-platform-module"],"license":"Apache-2.0","category":"auth-billing-email","readme_excerpt":"golang-jwt for Trusted Platform Module (TPM) This is just an extension for go-jwt i wrote over thanksgiving that allows creating and verifying JWT tokens where the private key is embedded inside a Trusted platform module. You can use this library to sign and verify a JWT using the standard go-jwt library semantics. Supported Key Types The following types are supported RS256 RS384 RS512 PS256 PS384 PS512 ES256 ES384 ES512 HS256 HS384 HS512 --- Other JWT generators - golang-jwt for crypto.Signer - golang-jwt for PKCS11 - golang-jwt for post quantum cryptography this repo is not supported by google --- Usage You need to first have an RSA or ECC key saved to a TPM and then specify its go-tpm/tpm2.TPMHandle with this library. In the following, the Key is referenced as a persistent or transient handle or as a PEM encoded TPM keyfile Embedding a key to a TPM is out of scope of this repo but you can use tpm2 tools as shown in the examples folder Once the key is on a TPM (in this case, at handle 0x81008001 ), usage is similar to: with PersistentHandle with KeyFile --- Setup To use this library, you need a TPM to issue a JWT (you do not need a TPM to verify; you just need the public key). A TPM-embedded key can be either - A Generated non-exportable inside the TPM itself. - B Locally imported into a TPM frmm a raw RSA ECC key - C Remotely transferred from one system to a specific TPM For simplicity, the following demonstrates ( A ) and saves the keyto persistent handle using tpm2 tools","default_branch":null,"files":null,"tree":[],"storefront":"/r/salrashid123","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/salrashid123/golang-jwt-tpm/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}