conterm/libsec/rsaencrypt.c
Russ Cox 934846f35c a
2005-08-08 12:50:13 +00:00

13 lines
192 B
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;
}