Why an allocator?
I noticed that libsodium's memory managment encurages using allocators too, although they also offer the mlock, munlock, and memzero seperately too. Is an allocator used here only because constructors are just by convention in Rust?
Are there sitautions in which it suffices to simply call memzero via a newtype_drop macro, as used in sodiumoxide? Are there reasons private key material should not be kept on the stack? Is it for example bad to call madvice or mlock on the stack?
Apologies for the dumb qustions. ;)
Appears allocators are not completely sorted out in Rust yet anyways https://github.com/rust-lang/rfcs/issues/538 although maybe that does not matter here.