aboutsummaryrefslogtreecommitdiff
path: root/src/libsec/port/egprivtopub.c
blob: e22c5c3119c809f3a6a145b9a8e1066618ae0a0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#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;
}