aboutsummaryrefslogtreecommitdiff
path: root/rsa.h
blob: ec3c34930d3efd5a594f5fe9fc33574e57ee7c26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#pragma once

#include "bigint.h"

struct PublicKey{
	Bigint mod,exp;
};

struct PrivateKey{
	PublicKey pub;
	Bigint pexp;
};

Bigint encrypt(const PublicKey&,Bigint);
Bigint decrypt(const PrivateKey&,Bigint);