conterm/libsec/egprivtopub.c

18 lines
273 B
C
Raw Normal View History

2005-08-08 16:50:13 +04:00
#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;
}