Skip to content

Commit

Permalink
Remove key material from error messages.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 616060223
Change-Id: I7a67f771e8e08d6bddfc78380ceed195b9510910
  • Loading branch information
chuckx authored and copybara-github committed Mar 15, 2024
1 parent f78423f commit 8828c3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions daead/subtle/aes_siv.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func NewAESSIV(key []byte) (*AESSIV, error) {
k2 := key[32:]
c, err := aes.NewCipher(k1)
if err != nil {
return nil, fmt.Errorf("aes_siv: aes.NewCipher(%s) failed, %v", k1, err)
return nil, fmt.Errorf("aes_siv: aes.NewCipher() failed: %v", err)
}

block := make([]byte, aes.BlockSize)
Expand Down Expand Up @@ -161,7 +161,7 @@ func (asc *AESSIV) ctrCrypt(siv, in, out []byte) error {

c, err := aes.NewCipher(asc.K2)
if err != nil {
return fmt.Errorf("aes_siv: aes.NewCipher(%s) failed, %v", asc.K2, err)
return fmt.Errorf("aes_siv: aes.NewCipher() failed: %v", err)
}

steam := cipher.NewCTR(c, iv)
Expand Down

0 comments on commit 8828c3c

Please sign in to comment.