shithub: riscv

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