[Cryptography Team] Re: block-based cipher padding

Chris Muller chris at funkyobjects.org
Tue Jul 11 17:38:53 UTC 2006


> The tests that I'm running are only one sided tests, they say encrypt
> this
> and your answer should be this.  Since the encryption test didn't
> assume any
> padding the results are different, but only by the padding itself.

Ah, I thought the encryption test DID use some kind of padding.  So if
it isn't using padding you probably don't want to use our code that
does padding, right?

IOW, this sounds like a lower-level test of just the underlying AES w/
CBC (using three blocks) rather than a test of encryption of an
arbitrary-sized ByteArray.  Arbitrary-sized ByteArray's are
encrypted/decrypted with the #encrypt:/#decrypt: methods, respectively.
 But you just want to encrypt three blocks so you need to use
#encryptBlock: and #decryptBlock.  They're the lower-level
functionality that will match the test you're doing, they don't do any padding.


More information about the Cryptography mailing list