shithub: riscv

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