code: 9ferno

ref: ed77f1550337e186ee740e42a1506fc61a5385c5
dir: /libsec/port/rsaprivtopub.c/

View raw version
#include "os.h"
#include "../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;
}