Skip Menu |

This queue is for tickets about the Crypt-GCrypt CPAN distribution.

Report information
The Basics
Id: 55161
Status: rejected
Priority: 0/
Queue: Crypt-GCrypt

People
Owner: Nobody in particular
Requestors: crew@cs.stanford.edu (no email address)
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 1.24
Fixed in: (no value)



Subject: don't need ->finish if padding-method = 'none'
For symmetric ciphers, if the padding method is 'none', calling finish() should never be necessary, since we're required to send multiples of blocksize on encrypt and no unpadding is done on decrypt, so both encrypt and decrypt are guaranteed to return with empty buffers, so there should be nothing for finish() to do.
Il Mar 02 Mar 2010 23:01:33, crew@cs.stanford.edu ha scritto: Show quoted text
> For symmetric ciphers, if the padding method is 'none', > calling finish() should never be necessary, > since we're required to send multiples of blocksize on encrypt > and no unpadding is done on decrypt, > so both encrypt and decrypt are guaranteed to return with empty buffers, > so there should be nothing for finish() to do.
You're probably right. However, calling ->finish is always required by design for compatibility and uniformity across settings, so I don't think I'm going to change this as it doesn't hurt.