ref: 6f1f1082657c69408ad0641a724d9a74093b37a3
dir: /libsec/egprivtopub.c/
#include "os.h"
#include <mp.h>
#include <libsec.h>
EGpub*
egprivtopub(EGpriv *priv)
{
EGpub *pub;
pub = egpuballoc();
if(pub == nil)
return nil;
pub->p = mpcopy(priv->pub.p);
pub->alpha = mpcopy(priv->pub.alpha);
pub->key = mpcopy(priv->pub.key);
return pub;
}