Sign in
plan9port
/
plan9
/
b3a110affa33f0a3c96e06438047913f2db90c91
/
.
/
src
/
libsec
/
port
/
rsaprivtopub.c
blob: d464c87f87262339f3c3e7c685a7367a8ce0f032 [
file
] [
log
] [
blame
]
#include
"os.h"
#include
<mp.h>
#include
<libsec.h>
RSApub
*
rsaprivtopub
(
RSApriv
*
priv
)
{
RSApub
*
pub
;
pub
=
rsapuballoc
();
if
(
pub
==
nil
)
return
nil
;
pub
->
n
=
mpcopy
(
priv
->
pub
.
n
);
pub
->
ek
=
mpcopy
(
priv
->
pub
.
ek
);
return
pub
;
}