[Botan-devel] RFC: memory locking
Christoph Ludwig
ludwig at fh-worms.de
Tue Nov 13 02:47:18 EST 2007
Hi,
On Mon, Nov 12, 2007 at 09:33:14AM -0500, Jack Lloyd wrote:
> I've been looking at C++09 quite a bit and contemplating what parts
> would be useful for Botan. And one thing that I've been considering
> somewhat seriously is removing the allocator code and replacing the
> current memory types with std::vector<byte> and std::array<byte, N>
> (std::array would only be used internally, though: basically all
> memory containers going into or out of the library would be
> std::vectors)
>
> In general my preference is strongly in favor of using standard
> containers where possible, but previously that hasn't really been
> considered an option due to the desire to support different locking
> strategies.
of course, using the standard containers is preferable whenever they suit the
needs. If the special requirements of crypto code can be met by standard
containers instantiated with a custom allocator, them I am in favor of this
approach. (However, I'd need to doublecheck the standard and the literature if
the leeway given to library implementors does not impede such a solution; and
I don't know if C++09 brings any changes that affect this topic.)
But more important, I think, is that the container used by Botand adhere to
the standard containers' concepts; i.e., that they meet all the requirements
laid down in chapter 23 of the current standard. That helps a lot if the Botan
containers need to be used in combination with other libraries.
My 2 cents,
Christoph
--
FH Worms - University of Applied Sciences
Fachbereich Informatik / Telekommunikation
Erenburgerstr. 19, 67549 Worms, Germany
More information about the botan-devel
mailing list