title: Extracting Public key from Private key using Botan
body: <p>I'm trying to encrypt a message using asymmetric private-public keys.
  In <code>Botan</code>, using <code>Load_key()</code> functions, I read the private key and want to extract it's public key from it. For constructing of an RSA public key in it's constructor, I'll need a "Algorithm Identifier" object and "key bits" which I have. The algorithm identifier object using <code>pcks8_algorithm_identifier()</code> function.</p>
  
  <p>The problem is the "Key Bits" which returns a <code>secure_vector&lt;unsigned char&gt;</code> instead of a <code>vector&lt;unsigned char&gt;</code> and I encounter a <code>bad::alloc exception</code> when I want to pass it to RSA_PublicKey constructor.</p>
  
  <p>Does anyone encounter such problem? If there is an alternative way of asymmetric encryption by loading keys from an input file in Botan I'll appreciate that</p>