[botan-devel] Buffered filter end_msg without enough input

Jack Lloyd lloyd at randombit.net
Tue Apr 16 20:18:53 EDT 2013


XTS mode requires at least one full block of input by definition. I
agree the exception message when insufficient input is provided is not
particularly helpful but it is difficult to fix without breaking ABI.

Regards,
  Jack

On Tue, Apr 16, 2013 at 04:03:03PM -0700, Navin Francis wrote:
> When I tried to encrypt a string using Serpent/XTS I got "Buffered filter
> end_msg without enough input". Are these minimum input sizes documented
> anywhere?
> 
> #include <iostream>
> #include <tchar.h>
> #include "botan_all.h"
> using namespace Botan;
> int _tmain(int argc, _TCHAR* argv[])
> {
> try{
> Botan::AutoSeeded_RNG rng;
> Botan::SymmetricKey key(rng, 256/8);
> Botan::InitializationVector iv(rng, 128/8);
> //Pipe p(get_cipher("AES-256/CBC",key,iv, Botan::ENCRYPTION));//Works
> //Pipe p(get_cipher("Serpent/XTS",key,iv, Botan::ENCRYPTION));//Fails
> p.process_msg("hello");
> }catch(std::exception& e){std::cerr << e.what() << "\n";}
> getchar();
> }
> 
> regards
> Navin

> _______________________________________________
> botan-devel mailing list
> botan-devel at randombit.net
> http://lists.randombit.net/mailman/listinfo/botan-devel



More information about the botan-devel mailing list