[Botan-devel] botan-devel Digest, Vol 45, Issue 1

Falko Strenzke strenzke at flexsecure.de
Thu Oct 2 04:56:21 EDT 2008

Hi Jack,
> Yes, InSiTo (whence comes the ECC/GF(p) code) uses tr1. I removed
> almost all of the tr1 uses but some remain in the GF(p) math. I plan
> to remove them prior all to the next release, but they are indeed
> there for the moment. I'm actually a bit torn about that because
> shared_ptr would be a very handy thing to have generally.
> As to the implementation, Boost TR1
> (http://www.boost.org/doc/libs/1_36_0/doc/html/boost_tr1.html) should
> work as a replacement. The only thing that is being used (AFAIK) is
> shared_ptr.
I'm not sure whether it is worth the effort to remove the shared_ptrs
from ECC/GF(p) code. That could be quite tedious. Using plain pointers
you might have trouble determining when you may delete them. I can think
of a better solution.
As long as auto_ptr and shared_ptr do not appear in the API, they
shouldn't be a problem. This is because we are not forced to use tr1 or
boost, we can simply integrate an implementation of smart_ptr and
auto_ptr in Botan. Of course that should be an existing implementation
under a free license. Maybe we could simply copy the boost
implementation of shared_ptr. Anyway, an implementation of these two
classes isn't a big deal,  examples can also be found in certain books.

This way no dependencies to tr1 or boost are created, the effort should
be less than removing the shared_ptrs and smart pointers will be
available for internal usage inside Botan and possibly new API functions.


Falko Strenzke
FlexSecure GmbH
Industriestr. 12
64297 Darmstadt

Tel. +49 (0) 6151 50123-14
E-Mail strenzke at flexsecure.de


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4060 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.randombit.net/pipermail/botan-devel/attachments/20081002/abb1e3d0/attachment.bin>

More information about the botan-devel mailing list