From 689b547c3a4fa6b0557a3507ef4906fcdffdc852 Mon Sep 17 00:00:00 2001 From: ww-rm Date: Sun, 31 Mar 2024 19:24:26 +0800 Subject: [PATCH] fix SM3 bug --- gmalg/sm3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gmalg/sm3.py b/gmalg/sm3.py index bc22f6e..7707526 100644 --- a/gmalg/sm3.py +++ b/gmalg/sm3.py @@ -138,7 +138,7 @@ def update(self, data: bytes) -> None: B.clear() pos = begin - while pos + 64 < d_len: + while pos + 63 < d_len: _expand(data[pos:pos+64], W1, W2) _compress(W1, W2, V) pos += 64