package rfc4757
import "github.com/jcmturner/gokrb5/v8/crypto/rfc4757"
Package rfc4757 provides encryption and checksum methods as specified in RFC 4757
Index ¶
- func Checksum(key []byte, usage uint32, data []byte) ([]byte, error)
- func DecryptData(key, data []byte, e etype.EType) ([]byte, error)
- func DecryptMessage(key, data []byte, usage uint32, export bool, e etype.EType) ([]byte, error)
- func EncryptData(key, data []byte, e etype.EType) ([]byte, error)
- func EncryptMessage(key, data []byte, usage uint32, export bool, e etype.EType) ([]byte, error)
- func HMAC(key []byte, data []byte) []byte
- func StringToKey(secret string) ([]byte, error)
- func UsageToMSMsgType(usage uint32) []byte
- func VerifyIntegrity(key, pt, data []byte, e etype.EType) bool
Functions ¶
func Checksum ¶
Checksum returns a hash of the data in accordance with RFC 4757
func DecryptData ¶
DecryptData decrypts the data provided using the methods specific to the etype provided as defined in RFC 4757.
func DecryptMessage ¶
DecryptMessage decrypts the message provided using the methods specific to the etype provided as defined in RFC 4757. The integrity of the message is also verified.
func EncryptData ¶
EncryptData encrypts the data provided using methods specific to the etype provided as defined in RFC 4757.
func EncryptMessage ¶
EncryptMessage encrypts the message provided using the methods specific to the etype provided as defined in RFC 4757. The encrypted data is concatenated with its RC4 header containing integrity checksum and confounder to create an encrypted message.
func HMAC ¶
HMAC returns a keyed MD5 checksum of the data
func StringToKey ¶
StringToKey returns a key derived from the string provided according to the definition in RFC 4757.
func UsageToMSMsgType ¶
UsageToMSMsgType converts Kerberos key usage numbers to Microsoft message type encoded as a little-endian four byte slice.
func VerifyIntegrity ¶
VerifyIntegrity checks the integrity checksum of the data matches that calculated from the decrypted data.
Source Files ¶
checksum.go encryption.go keyDerivation.go msgtype.go
- Version
- v8.3.0
- Published
- Apr 4, 2020
- Platform
- windows/amd64
- Imports
- 12 packages
- Last checked
- 3 hours ago –
Tools for package owners.