ref: ac4840116ef15e2fc65d0e68f7e16d3a8a1aa2f8
dir: /sys/src/cmd/unix/drawterm/libsec/rsaencrypt.c/
#include "os.h"
#include <mp.h>
#include <libsec.h>
mpint*
rsaencrypt(RSApub *rsa, mpint *in, mpint *out)
{
if(out == nil)
out = mpnew(0);
mpexp(in, rsa->ek, rsa->n, out);
return out;
}