File: rsaencrypt.c

package info (click to toggle)
drawterm 20091003-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,920 kB
  • ctags: 5,505
  • sloc: ansic: 55,149; makefile: 566; asm: 20
file content (12 lines) | stat: -rw-r--r-- 192 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
#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;
}