This commit is contained in:
Dmitry Zuikov 2024-08-23 06:26:27 +03:00
parent f004793a56
commit f2c5a531f1
1 changed files with 2 additions and 4 deletions

View File

@ -280,10 +280,8 @@ generateGroupKeyFancy mbk pks = create
rcpt <- forM pks $ \pk -> do
box <- liftIO $ AK.boxSeal pk (LBS.toStrict $ serialise sk) <&> EncryptedBox
pure (pk, box)
-- TODO: GroupKeyIdJustHash-implies-timestamp
-- теперь просто хэш = хэш (ключ, таймстемп)
-- так лучше
let ha = hashObject @HbSync (serialise (sk,now))
let enc = SK.secretbox sk (nonceFrom (mempty :: ByteString)) (LBS.toStrict $ serialise sk)
let ha = hashObject @HbSync enc
pure $ GroupKeySymmFancy
(HashMap.fromList rcpt)
(Just GroupKeyIdJustHash)