[botan-devel] False assertion 'The nonce is fresh for this message' (expression m_fresh_nonce)

Lasse Bromose lbromo12 at student.aau.dk
Wed Mar 9 12:40:28 EST 2016


Hi guys.

Im trying to run one of the examples in the user guide.
http://botan.randombit.net/manual/filters.html

The first example with AES (there is a small error, after AutoSeeded_RNG rng should the ',' be changed to a ';').

How ever i am getting the following error:

terminate called after throwing an instance of 'Botan::Exception'
  what():  False assertion 'The nonce is fresh for this message' (expression m_fresh_nonce) in get @src/lib/filters/transform_filter.cpp:49

I'm using version 1.11.28, gcc 5.3.0.

The code I've compiled looks as the following:

#include <iostream>

#include <botan/auto_rng.h>
#include <botan/filters.h>
#include <botan/block_cipher.h>
#include <botan/version.h>

using namespace Botan;

int main(){
  std::cout << version_string() << std::endl;
  AutoSeeded_RNG rng;
  SymmetricKey key(rng, 16); // a random 128-bit key
  InitializationVector iv(rng, 16); // a random 128-bit IV

  // The algorithm we want is specified by a string
  Pipe pipe(get_cipher("AES-128/CBC", key, iv, ENCRYPTION));

  pipe.process_msg("secrets");
  pipe.process_msg("more secrets");

  secure_vector<byte> c1 = pipe.read_all(0);
}

I really hope someone can help me :)

Best Regards
Lasse
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.randombit.net/pipermail/botan-devel/attachments/20160309/13336654/attachment.html>


More information about the botan-devel mailing list