feat: Check the HMAC during decryption

This commit is contained in:
2022-08-03 16:41:33 +02:00
parent 6d8238475c
commit 8d222a160f
3 changed files with 23 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
/// Triggered during X3DH if the signature if the SPK does verify to the actual SPK.
class InvalidSignatureException implements Exception {
String errMsg() => 'The signature of the SPK does not match the provided signature';
}
/// Triggered by the Double Ratchet if the computet HMAC does not match the attached HMAC.
class InvalidMessageHMACException implements Exception {
String errMsg() => 'The computed HMAC does not match the provided HMAC';
}