Documentation ¶
Overview ¶
Package subtle provides an implementation of PRFs like AES-CMAC.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateAESCMACPRFParams ¶
ValidateAESCMACPRFParams checks that the key is the recommended size for AES-CMAC.
func ValidateHKDFPRFParams ¶
ValidateHKDFPRFParams validates parameters of HKDF constructor.
func ValidateHMACPRFParams ¶
ValidateHMACPRFParams validates parameters of HMAC constructor.
Types ¶
type AESCMACPRF ¶
type AESCMACPRF struct {
// contains filtered or unexported fields
}
AESCMACPRF is a type that can be used to compute several CMACs with the same key material.
func NewAESCMACPRF ¶
func NewAESCMACPRF(key []byte) (*AESCMACPRF, error)
NewAESCMACPRF creates a new AESCMACPRF object and initializes it with the correct key material.
func (AESCMACPRF) ComputePRF ¶
func (a AESCMACPRF) ComputePRF(data []byte, outputLength uint32) ([]byte, error)
ComputePRF computes the AES-CMAC for the given key and data, returning outputLength bytes. The timing of this function will only depend on len(data), and not leak any additional information about the key or the data.
type HKDFPRF ¶
type HKDFPRF struct {
// contains filtered or unexported fields
}
HKDFPRF is a type that can be used to compute several HKDFs with the same key material.
func NewHKDFPRF ¶
NewHKDFPRF creates a new HKDFPRF object and initializes it with the correct key material.
type HMACPRF ¶
type HMACPRF struct {
// contains filtered or unexported fields
}
HMACPRF is a type that can be used to compute several HMACs with the same key material.
func NewHMACPRF ¶
NewHMACPRF creates a new HMACPRF object and initializes it with the correct key material.