code: 9ferno

ref: 600bbfe4aaa9ad0f73d8d73eef1b7670e5f7d3a3
dir: /libsec/port/dsaprivtopub.c/

View raw version
#include "os.h"
#include <mp.h>
#include <libsec.h>

DSApub*
dsaprivtopub(DSApriv *priv)
{
	DSApub *pub;

	pub = dsapuballoc();
	pub->p = mpcopy(priv->pub.p);
	pub->q = mpcopy(priv->pub.q);
	pub->alpha = mpcopy(priv->pub.alpha);
	pub->key = mpcopy(priv->pub.key);
	return pub;
}