ref: 990ceeef3bfd9d56e2e6dd39cf5ac185b1a2de08
dir: /sys/src/libsec/port/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; }