Skip to content

Commit

Permalink
Add Signature size for HMAC_SHA256 and HMAC_SHA384
Browse files Browse the repository at this point in the history
Added new signature sizes for encryption types (19 and 20)
which are common in modern KDC installations.
Values are taken from rfc8009
https://datatracker.ietf.org/doc/html/rfc8009#section-7
  • Loading branch information
gokrokve authored and jcmturner committed May 6, 2023
1 parent f8771d3 commit 855dbc7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pac/signature_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ func (k *SignatureData) Unmarshal(b []byte) (rb []byte, err error) {
c = 12
case uint32(chksumtype.HMAC_SHA1_96_AES256):
c = 12
case uint32(chksumtype.HMAC_SHA256_128_AES128):
c = 16
case uint32(chksumtype.HMAC_SHA384_192_AES256):
c = 24
}
k.Signature, err = r.ReadBytes(c)
if err != nil {
Expand Down
4 changes: 4 additions & 0 deletions v8/pac/signature_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ func (k *SignatureData) Unmarshal(b []byte) (rb []byte, err error) {
c = 12
case uint32(chksumtype.HMAC_SHA1_96_AES256):
c = 12
case uint32(chksumtype.HMAC_SHA256_128_AES128):
c = 16
case uint32(chksumtype.HMAC_SHA384_192_AES256):
c = 24
}
k.Signature, err = r.ReadBytes(c)
if err != nil {
Expand Down

0 comments on commit 855dbc7

Please sign in to comment.