Skip to content

Instantly share code, notes, and snippets.

@tanascius
Last active August 1, 2018 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tanascius/4ada0012a42478bc39dc3c8ba3a38cd0 to your computer and use it in GitHub Desktop.
Save tanascius/4ada0012a42478bc39dc3c8ba3a38cd0 to your computer and use it in GitHub Desktop.
Possible Fix
diff --git a/dotnet/Miscreant/AesSiv.cs b/dotnet/Miscreant/AesSiv.cs
index 4dd03de..e6d728e 100644
--- a/dotnet/Miscreant/AesSiv.cs
+++ b/dotnet/Miscreant/AesSiv.cs
@@ -189,7 +189,7 @@ namespace Miscreant
Utils.Xor(mac.HashFinal(), v, BlockSize);
}
- if (message.Length > BlockSize)
+ if (message.Length >= BlockSize)
{
int n = message.Length - BlockSize;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment