Improvement: Use Twofish approach for test vectors

Bug #1191236 reported by Legrandin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python-Crypto
New
Undecided
Unassigned

Bug Description

It would be nice if ciphers (or even other complex primitives, like hashes) had test vectors generated as described by Niels Ferguson here:

http://blogs.msdn.com/b/si_team/archive/2006/05/19/aes-test-vectors.aspx

===
Notation:

            b # bytes in a plaintext or ciphertext block

            k # bytes in a key

            E(K,P) Block cipher encryption function, K = key, P = plaintext

            D(K,P) Block cipher decryption function, K = key, C = ciphertext

Test algorithm:

    S = a string of k+b zero bytes.

    repeat 1000 times:

            n = length(S)

            K = S[n-k..n-1] the last k bytes of S

            P = S[n-k-b..n-k-1] the b bytes just before K

            append E(K,E(K,P)) to S

The last b bytes of S are the test vector value.
===

Legrandin (gooksankoo)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.