[Cryptography Team] BlockCipher mode tests, fixes, enhancements

Chris Muller chris at funkyobjects.org
Wed Mar 8 04:38:56 UTC 2006


Hi, just a note to let you know of some improvements
I've just committed to our repository.

Cryptography-Core

- All four BlockCipher modes are fixed-up and working
(CFB should be verified).
- Added ability for BlockCiphers to encrypt and
decrypt arbitrary-length ByteArray's.
- When using the non-streaming cipher modes (CBC and
CFB), proper padding of the ByteArray's should be the
responsibility of the BlockCipher, not the user
(developer).  Therefore, #encrypt: applies the "option
2" padding scheme specified by Ferguson and Schneier
in 'Practical Cryptography', p. 68-69.
- Can also encrypt/decrypt from:to: positions in an
existing ByteArray.
- Streaming modes (CTR and OFB) are supported as
stream ciphers, ByteArray's can be any size and no
padding to the next-larger block is performed or
needed.

Cryptography-Tests

- Created tests for all BlockCipher modes, by
generalizing the CTR test.  They all now run the same
(semi-robust) test.
- Separate test conditions ensure streaming modes work
properly.
- Separate encrypt/decrypt ByteArray tests are
included for all BlockCipher modes.

More to come..

 - Chris


More information about the Cryptography mailing list