Documentation
¶
Overview ¶
Package kmssig provides functionality for signing and verifying files using AWS's Key Management Service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidSignature is returned when the signature for the given data is // invalid. ErrInvalidSignature = errors.New("signature is invalid") )
Functions ¶
func Sign ¶
Sign creates a signature for the given data.
It first hashes the data using SHA-512, then encrypts that hash using the given KMS client. The resulting ciphertext is the signature. If any bit of either the data, the context, or the signature are changed, the signature will be invalid.
func Verify ¶
Verify verifies a signature for the given data.
It first hashes the data using SHA-512 then decrypts the signature using the given KMS client. The resulting plaintext is compared in constant time to the SHA-512 hash. If any bit of either the data, the context, or the signature are changed, Verify will return ErrInvalidSignature. If the signature is valid, Verify will return the key ID the signature was created with.
Types ¶
type KeyManagement ¶
type KeyManagement interface { Encrypt(*kms.EncryptInput) (*kms.EncryptOutput, error) Decrypt(*kms.DecryptInput) (*kms.DecryptOutput, error) }
Directories
¶
Path | Synopsis |
---|---|
Godeps
|
|
_workspace/src/github.com/awslabs/aws-sdk-go/aws
Package aws provides core functionality for making requests to AWS services.
|
Package aws provides core functionality for making requests to AWS services. |
_workspace/src/github.com/awslabs/aws-sdk-go/service/kms
Package kms provides a client for AWS Key Management Service.
|
Package kms provides a client for AWS Key Management Service. |
_workspace/src/github.com/docopt/docopt-go
Package docopt parses command-line arguments based on a help message.
|
Package docopt parses command-line arguments based on a help message. |
_workspace/src/github.com/vaughan0/go-ini
Package ini provides functions for parsing INI configuration files.
|
Package ini provides functions for parsing INI configuration files. |
cmd
|
|