]> git.lizzy.rs Git - plan9front.git/blob - sys/src/libsec/port/rsaencrypt.c
libsec/tlshand: implement client side ECDHE (many thanks to pr!)
[plan9front.git] / sys / src / libsec / port / rsaencrypt.c
1 #include "os.h"
2 #include <mp.h>
3 #include <libsec.h>
4
5 mpint*
6 rsaencrypt(RSApub *rsa, mpint *in, mpint *out)
7 {
8         if(out == nil)
9                 out = mpnew(0);
10         mpexp(in, rsa->ek, rsa->n, out);
11         return out;
12 }