Mailing List Archive

Encryption Question
When calling gcry_cipher_encrypt using twofish with CFB mode and the two
buffer method, what will the size of the encrypted value returned to the
out buffer be?

Is it always the size of the bufferlength passed to the function, with
appropriate padding, or can it be variable in length not to exceed the
passed bufferlength?


Thanks - Tod

_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Re: Encryption Question [ In reply to ]
On Mon, 09 Jan 2006 10:29:01 -0500, Tod Thomas said:

> Is it always the size of the bufferlength passed to the function, with
> appropriate padding, or can it be variable in length not to exceed the

It is always the length you pass in. CFB mode behave similar to a
stream cipher.


Shalom-Salam,

Werner


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Re: Encryption Question [ In reply to ]
Werner Koch wrote:
> On Mon, 09 Jan 2006 10:29:01 -0500, Tod Thomas said:
>
>
>>Is it always the size of the bufferlength passed to the function, with
>>appropriate padding, or can it be variable in length not to exceed the
>
>
> It is always the length you pass in. CFB mode behave similar to a
> stream cipher.


I see - I think. So MAXSIZE=64 would work, even if the passed in string
was less than MAXSIZE, but I should expect upon decryption to get a
string MAXSIZE in length back?

I believe the answer to that question is 'no', it will only return the
same string (and therefore same size) as that it was passed - correct?


As always, thanks for your help.


Tod

_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel