package rfc3961
Import Path
github.com/jcmturner/gokrb5/v8/crypto/rfc3961 (on go.dev)
Dependency Relation
imports 9 packages, and imported by one package
Involved Source Files
Package rfc3961 provides encryption and checksum methods as specified in RFC 3961
keyDerivation.go
nfold.go
Package-Level Functions (total 12)
DeriveKey derives a key from the protocol key based on the usage and the etype's specific methods.
DeriveRandom implements the RFC 3961 defined function: DR(Key, Constant) = k-truncate(E(Key, Constant, initial-cipher-state)).
key: base key or protocol key. Likely to be a key from a keytab file.
usage: a constant.
n: block size in bits (not bytes) - note if you use something like aes.BlockSize this is in bytes.
k: key length / key seed length in bits. Eg. for AES256 this value is 256.
e: the encryption etype function to use.
DES3DecryptData decrypts the data provided using DES3 and methods specific to the etype provided.
DES3DecryptMessage decrypts the message provided using DES3 and methods specific to the etype provided.
The integrity of the message is also verified.
DES3EncryptData encrypts the data provided using DES3 and methods specific to the etype provided.
DES3EncryptMessage encrypts the message provided using DES3 and methods specific to the etype provided.
The encrypted data is concatenated with its integrity hash to create an encrypted message.
DES3RandomToKey returns a key from the bytes provided according to the definition in RFC 3961 for DES3 etypes.
DES3StringToKey returns a key derived from the string provided according to the definition in RFC 3961 for DES3 etypes.
Nfold expands the key to ensure it is not smaller than one cipher block.
Defined in RFC 3961.
m input bytes that will be "stretched" to the least common multiple of n bits and the bit length of m.
PseudoRandom function as defined in RFC 3961
RandomToKey returns a key from the bytes provided according to the definition in RFC 3961.
VerifyIntegrity verifies the integrity of cipertext bytes ct.
![]() |
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |