code: drawterm

ref: f11139d4c918802a87730bc14d094670ee4ce572
dir: /libsec/rsaencrypt.c/

View raw version
#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;
}