Documentation ¶
Index ¶
- func HashSafeForSignature(hashAlg string) error
- func NewRSASSAPKCS1SignerTpmKeyManager(rwr io.ReadWriteCloser, ac common.AuthCallback) *tpmRSASSAPKCS1SignerKeyManager
- func NewRSASSAPKCS1VerifierTpmKeyManager(rwr io.ReadWriteCloser, ac common.AuthCallback) *tpmRSASSAPKCS1VerifierKeyManager
- func NewSigner(handle *keyset.Handle) (tink.Signer, error)
- func NewVerifier(handle *keyset.Handle) (tink.Verifier, error)
- func RSAValidModulusSizeInBits(m int) error
- func RSAValidPublicExponent(e int) error
- func RSA_SSA_PKCS1_2048_SHA256_F4_Key_Template() *tinkpb.KeyTemplate
- func RSA_SSA_PKCS1_3072_SHA256_F4_Key_Template() *tinkpb.KeyTemplate
- func RSA_SSA_PKCS1_3072_SHA256_F4_RAW_Key_Template() *tinkpb.KeyTemplate
- func RSA_SSA_PKCS1_4096_SHA512_F4_Key_Template() *tinkpb.KeyTemplate
- func RSA_SSA_PKCS1_4096_SHA512_F4_RAW_Key_Template() *tinkpb.KeyTemplate
- func Validate_RSA_SSA_PKCS1(km tpmRSASSAPKCS1SignerKeyManager, hashAlg string, privKey keyfile.TPMKey) error
- type RSA_SSA_PKCS1_TPM_Signer
- type RSA_SSA_PKCS1_TPM_Verifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashSafeForSignature ¶
HashSafeForSignature checks whether a hash function is safe to use with digital signatures that require collision resistance.
func NewRSASSAPKCS1SignerTpmKeyManager ¶
func NewRSASSAPKCS1SignerTpmKeyManager(rwr io.ReadWriteCloser, ac common.AuthCallback) *tpmRSASSAPKCS1SignerKeyManager
func NewRSASSAPKCS1VerifierTpmKeyManager ¶
func NewRSASSAPKCS1VerifierTpmKeyManager(rwr io.ReadWriteCloser, ac common.AuthCallback) *tpmRSASSAPKCS1VerifierKeyManager
func NewVerifier ¶
NewVerifier returns a Verifier primitive from the given keyset handle.
func RSAValidModulusSizeInBits ¶
RSAValidModulusSizeInBits the size in bits for an RSA key.
func RSAValidPublicExponent ¶
RSAValidPublicExponent validates a public RSA exponent.
func RSA_SSA_PKCS1_2048_SHA256_F4_Key_Template ¶
func RSA_SSA_PKCS1_2048_SHA256_F4_Key_Template() *tinkpb.KeyTemplate
RSA_SSA_PKCS1_2048_SHA256_F4_Key_Template is a KeyTemplate that generates a new RSA SSA PKCS1 private key with the following parameters:
- Modulus size in bits: 3072.
- Hash function: SHA256.
- Public Exponent: 65537 (aka F4).
- OutputPrefixType: TINK
func RSA_SSA_PKCS1_3072_SHA256_F4_Key_Template ¶
func RSA_SSA_PKCS1_3072_SHA256_F4_Key_Template() *tinkpb.KeyTemplate
RSA_SSA_PKCS1_3072_SHA256_F4_Key_Template is a KeyTemplate that generates a new RSA SSA PKCS1 private key with the following parameters:
- Modulus size in bits: 3072.
- Hash function: SHA256.
- Public Exponent: 65537 (aka F4).
- OutputPrefixType: TINK
func RSA_SSA_PKCS1_3072_SHA256_F4_RAW_Key_Template ¶
func RSA_SSA_PKCS1_3072_SHA256_F4_RAW_Key_Template() *tinkpb.KeyTemplate
RSA_SSA_PKCS1_3072_SHA256_F4_RAW_Key_Template is a KeyTemplate that generates a new RSA SSA PKCS1 private key with the following parameters:
- Modulus size in bits: 3072.
- Hash function: SHA256.
- Public Exponent: 65537 (aka F4).
- OutputPrefixType: RAW
func RSA_SSA_PKCS1_4096_SHA512_F4_Key_Template ¶
func RSA_SSA_PKCS1_4096_SHA512_F4_Key_Template() *tinkpb.KeyTemplate
RSA_SSA_PKCS1_4096_SHA512_F4_Key_Template is a KeyTemplate that generates a new RSA SSA PKCS1 private key with the following parameters:
- Modulus size in bits: 4096.
- Hash function: SHA512.
- Public Exponent: 65537 (aka F4).
- OutputPrefixType: TINK
func RSA_SSA_PKCS1_4096_SHA512_F4_RAW_Key_Template ¶
func RSA_SSA_PKCS1_4096_SHA512_F4_RAW_Key_Template() *tinkpb.KeyTemplate
RSA_SSA_PKCS1_4096_SHA512_F4_RAW_Key_Template is a KeyTemplate that generates a new RSA SSA PKCS1 private key with the following parameters:
- Modulus size in bits: 4096.
- Hash function: SHA512.
- Public Exponent: 65537 (aka F4).
- OutputPrefixType: RAW
Types ¶
type RSA_SSA_PKCS1_TPM_Signer ¶
type RSA_SSA_PKCS1_TPM_Signer struct {
// contains filtered or unexported fields
}
RSA_SSA_PKCS1_Signer is an implementation of Signer for RSA-SSA-PKCS1.
func New_RSA_SSA_PKCS1_Signer ¶
func New_RSA_SSA_PKCS1_Signer(km tpmRSASSAPKCS1SignerKeyManager, hashAlg string, privKey keyfile.TPMKey) (*RSA_SSA_PKCS1_TPM_Signer, error)
New_RSA_SSA_PKCS1_Signer creates a new intance of RSA_SSA_PKCS1_Signer.
type RSA_SSA_PKCS1_TPM_Verifier ¶
type RSA_SSA_PKCS1_TPM_Verifier struct {
// contains filtered or unexported fields
}
RSA_SSA_PKCS1_Verifier is an implementation of Verifier for RSA-SSA-PKCS1.
func New_RSA_SSA_PKCS1_Verifier ¶
func New_RSA_SSA_PKCS1_Verifier(hashAlg string, pubKey rsa.PublicKey) (*RSA_SSA_PKCS1_TPM_Verifier, error)
New_RSA_SSA_PKCS1_Verifier creates a new intance of RSASSAPKCS1Verifier.
func (*RSA_SSA_PKCS1_TPM_Verifier) Verify ¶
func (v *RSA_SSA_PKCS1_TPM_Verifier) Verify(signature, data []byte) error
Verify verifies whether the given signaure is valid for the given data. It returns an error if the signature is not valid; nil otherwise.