diff --git a/src/Nostr/Encryption.hs b/src/Nostr/Encryption.hs index 8375795..2de2ba9 100644 --- a/src/Nostr/Encryption.hs +++ b/src/Nostr/Encryption.hs @@ -7,7 +7,6 @@ import Crypto.Cipher.ChaCha (generate, initialize) import Crypto.Hash (SHA256(..)) import Crypto.KDF.HKDF (PRK, extract, expand) import Crypto.MAC.HMAC (HMAC, hmac, hmacGetDigest) -import Crypto.Random (getRandomBytes) import Data.Bits (shiftL, xor, (.|.)) import Data.ByteString (ByteString) import Data.ByteArray (ByteArrayAccess) @@ -64,9 +63,6 @@ calculateHmac key message aad = hmacResult = hmac key combined :: HMAC SHA256 in BA.convert $ hmacGetDigest hmacResult -generateSalt :: IO ByteString -generateSalt = getRandomBytes 16 - getMessageKeys :: ByteString -> ByteString -> (ByteString, ByteString, ByteString) getMessageKeys conversationKey nonce = do let prk = hkdfExtract conversationKey BS.empty