shithub: riscv

ref: c013393923b925557a8a7f23cd065a19fe87f48f
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;
}