ref: 49f55fb7903b4e43de866ccf978b5a3d6985dfa4
dir: /sys/src/libsec/port/rsaprivtopub.c/
#include "os.h"
#include <mp.h>
#include <libsec.h>
RSApub*
rsaprivtopub(RSApriv *priv)
{
RSApub *pub;
pub = rsapuballoc();
if(pub == nil)
return nil;
pub->n = mpcopy(priv->pub.n);
pub->ek = mpcopy(priv->pub.ek);
return pub;
}