> > My application requires me to constantly do things like: > > - return n, e, p from an openssl RSA key token > - construct an openssl RSA public key token from n, e > - construct an openssl RSA private key token from n, e, p > > I do this using the bignum-bin converters and knowledge of the RSA > structure. While this might be 'bad style', is there any better way? >
That's one of the problems, actually -- there's often not really a good way to do things without accessing the struct members directly. (I.e., while this is bad style, we can't really blame individual applications for it. This goes back to SSLeay, and OpenSSL never had a good effort of cleaning up the APIs; also, obviously, it's not clear that any such effort would really have helped.) Bodo