From 08ee2ab35fb7ab60dcb4a7b6f537c482fd4b797c Mon Sep 17 00:00:00 2001 From: Wade Simmons Date: Mon, 27 Apr 2026 14:18:17 -0400 Subject: [PATCH] cleanup --- noise.go | 5 ----- noiseutil/fips140.go | 11 ----------- 2 files changed, 16 deletions(-) diff --git a/noise.go b/noise.go index eae268ed..0491da17 100644 --- a/noise.go +++ b/noise.go @@ -23,11 +23,6 @@ func NewNebulaCipherState(s *noise.CipherState) *NebulaCipherState { return &NebulaCipherState{c: x.(cipher.AEAD)} } -type cipherAEADDanger interface { - EncryptDanger(out, ad, plaintext []byte, n uint64, nb []byte) ([]byte, error) - DecryptDanger(out, ad, plaintext []byte, n uint64, nb []byte) ([]byte, error) -} - // EncryptDanger encrypts and authenticates a given payload. // // out is a destination slice to hold the output of the EncryptDanger operation. diff --git a/noiseutil/fips140.go b/noiseutil/fips140.go index a5259fa5..fb5f82f3 100644 --- a/noiseutil/fips140.go +++ b/noiseutil/fips140.go @@ -65,14 +65,3 @@ func (c aeadCipher) Encrypt(out []byte, n uint64, ad, plaintext []byte) []byte { func (c aeadCipher) Decrypt(out []byte, n uint64, ad, ciphertext []byte) ([]byte, error) { return c.Open(out, c.nonce(n), ciphertext, ad) } - -func (c aeadCipher) EncryptDanger(out, ad, plaintext []byte, n uint64, nb []byte) ([]byte, error) { - binary.BigEndian.PutUint64(nb[4:], n) - out = c.Seal(out, nb[4:], plaintext, ad) - return out, nil -} - -func (c aeadCipher) DecryptDanger(out, ad, ciphertext []byte, n uint64, nb []byte) ([]byte, error) { - binary.BigEndian.PutUint64(nb[4:], n) - return c.Open(out, nb[4:], ciphertext, ad) -}