title: Finding additive inverse using OpenSSL BIGNUM
body: <p>I need to calculate the additive inverse of a large (BIGNUM) prime in C.  So, basically, i need to multiply by -1.  Is there an easy way to do this that i've missed?  I don't see any functions in the documentation.  All i've come up with is this, which i think is rather ugly:</p>
  
  <pre><code>//bigprime = my big prime
  inverse = BN_new();
  one = BN_new();
  negOne = BN_new();
  BN_one(one);  // one = 1
  BN_zero(negOne); // set negOne to zero
  BN_sub(negOne, negOne, one) // subtract one from zero
  BN_mul(inverse, bigprime, negOne, ctx); //multiply big prime by -1
  </code></pre>
  
  <p>More so, i'm not familiar enough with the bignum library to know whether "subtracting" one from zero is really going to do what i want it to.  TIA!</p>