Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrAesSIVGeneric indicates a generic error with AesSIV ErrAesSIVGeneric = errors.New("AES SIV Generic error: Something went wrong") //ErrSivWrapGeneric indicates that an error occurred during the Wrap() function of AesSIV ErrSivWrapGeneric = errors.New("Siv Wrap error: error wrapping the message") //ErrSivWrapUnsupportedPlaintext indicates that the plaintext supplied to the AesSIV wrap() function is longer than supported (size is platform specific) ErrSivWrapUnsupportedPlaintext = errors.New("Siv Wrap error: plaintext size is longer than supported") //ErrSivWrapUnsupportedAdditionalData indicates that the additionalData elements supplied exceed the maximum number supported ErrSivWrapUnsupportedAdditionalData = errors.New("Siv Wrap error: additionalData elements more than than supported") //ErrSivUnwrapGeneric indicates that an error occurred during unwrap() function of AesSIV ErrSivUnwrapGeneric = errors.New("Siv Unwrap error: error unwrapping the ciphertext") //ErrFailSivUnwrap indicates that the AesSIV unwrap() function failed for the combination of key, ciphertext and additionalData ErrFailSivUnwrap = errors.New("Siv Unwrap: Unwrapping the ciphertext failed") //ErrSivUnWrapSizeUnsupportedCiphertext indicates that the ciphertext supplied to the AesSIV unwrap() function is longer than supported (size is platform specific) ErrSivUnWrapSizeUnsupportedCiphertext = errors.New("Siv Unwrap error: ciphertext size is longer than supported") //ErrSivUnWrapUnsupportedAdditionalData indicates that the additionalData elements supplied exceed the maximum number supported ErrSivUnWrapUnsupportedAdditionalData = errors.New("Siv Unwrap error: additionalData elements more than than supported") //ErrSivUnWrapShortCipherLength indicates that the cipher text is too short ErrSivUnWrapShortCipherLength = errors.New("Siv Unwrap error: ciphertext is too short") )
View Source
var ( //ErrAesSIVinitKeySize indicates that the key supplied to create an AesSIVBlockPair is in unsupported ErrAesSIVinitKeySize = errors.New("Aes SIV Init error: Key size is unsupported") //ErrAesSIVinitGeneric indicates that an error occurred initiating an AesSIVBlockPair ErrAesSIVinitGeneric = errors.New("AES SIV Init error: Initializing AES SIV block failed") )
View Source
var ( //ErrAesSIVs2v indicates that the AesSIVs2v routine failed ErrAesSIVs2v = errors.New("AES SIV s2v error: s2v routine failed") )
View Source
var ErrSiv = errors.New("NewSIV() error: error returning a new SIV implementation")
ErrSiv indicates that NewSIV() failed to return an SIV implementation
Functions ¶
func NewAesSIVBlockPair ¶
NewAesSIVBlockPair function takes a 256, 384 or 512 bit key and returns an AesSIVBlockPair.
Types ¶
type SIV ¶
type SIV interface { //Wrap encrypts and authenticates the plaintext using SIV mode // Wrap (destination, plaintext, ...additionalData) (cipherText, error) Wrap(plaintext []byte, additionalData ...[]byte) ([]byte, error) //Unwrap //Unwrap(destination, ciphertext, ...associatedData) (plaintext, error) Unwrap(ciphertext []byte, additionalData ...[]byte) ([]byte, error) //KeySize() returns the key size of the SIV mode CMACBlockSize() int CTRBlockSize() int }
SIV is the SIV operation mode for SIV proposed by Phil Rogaway and Thomas Shrimpton standardized as https://tools.ietf.org/html/rfc5297
Click to show internal directories.
Click to hide internal directories.