A sink for SecByteBlock?

270 views
Skip to first unread message

Viserys Targaryen, The Rightful King of Westeros

unread,
May 22, 2012, 2:20:26 AM5/22/12
to cryptop...@googlegroups.com
Greetings,

The AES Example at the bottom of http://www.cryptopp.com/fom-serve/cache/79.html uses an std::string as the sink for the AES encryption/decryption process. However, std::string doesn't use a secure allocator (and apparently due to optimization won't ever be secured even with one).

That is, 

  std::string output;

  CryptoPP::StringSource( temp, true,
       new CryptoPP::StreamTransformationFilter( encryptor,
           new CryptoPP::StringSink( output )
       ) // StreamTransformationFilter
   ); // StringSource

Is it possible to use something like a SecByteBlock for output instead? If so, what Sink class is to be used for that?

Cheers

Jeffrey Walton

unread,
Jun 11, 2012, 9:49:46 PM6/11/12
to Crypto++ Users


On May 22, 2:20 am, "Viserys Targaryen, The Rightful King of Westeros"
<ywid...@gmail.com> wrote:
> Greetings,
>
> The AES Example at the bottom ofhttp://www.cryptopp.com/fom-serve/cache/79.htmluses an std::string as the
> sink for the AES encryption/decryption process. However, std::string
> doesn't use a secure allocator (and apparently due to optimization won't
> ever be secured even with one).
>
> That is,
>
>   std::string output;
>
>   CryptoPP::StringSource( temp, true,
>        new CryptoPP::StreamTransformationFilter( encryptor,
>            new CryptoPP::StringSink( output )
>        ) // StreamTransformationFilter
>    ); // StringSource
>
> Is it possible to use something like a SecByteBlock for output instead? If
> so, what Sink class is to be used for that?
"SecByteBlockSink patch,"
http://groups.google.com/group/cryptopp-users/browse_thread/thread/9bbf72e6f87a4ad8/5c0ee824ebb03f21
Reply all
Reply to author
Forward
0 new messages