From 938aa55a95fda70b403fa5cabb43c6cc37292ebf Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 17 Jun 2013 00:42:07 +0200 Subject: change defaults (conflicts with Wikipedia but is based on official Keccak defaults; no defaults have yet been standardised) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- python3/sha3sum.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'python3') diff --git a/python3/sha3sum.py b/python3/sha3sum.py index ebb4c98..d388f1f 100755 --- a/python3/sha3sum.py +++ b/python3/sha3sum.py @@ -655,8 +655,8 @@ if __name__ == '__main__': elif cmd == 'sha3-384sum': _o = 384 elif cmd == 'sha3-512sum': _o = 512 _s = 1600 # --statesize - _r = _s - (_o << 1) # --bitrate - _c = _s - _r # --capacity + _c = _s - (_o << 1) # --capacity + _r = _s - _c # --bitrate _w = _s / 25 # --wordsize _i = 1 # --iterations _j = 1 # --squeezes @@ -834,8 +834,8 @@ along with this program. If not, see . if (R is None) and (C is None) and (O is None): ## s? s = _s if S is None else s o = (((s << 5) // 100 + 7) >> 3) << 3 - c = o << 1 - r = s - c + r = o << 1 + c = s - r o = 8 if o < 8 else o elif (R is None) and (C is None): ## !o s? r = _r -- cgit v1.2.3-70-g09d2