projects
/
crypto_lab3.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Cleaning.
[crypto_lab3.git]
/
src
/
Rsa.cpp
1
#include
"Rsa.h"
2
3
#include <iostream>
4
using namespace
std
;
5
6
bool
Rsa
::
verifySignature
(
const
mpz_class
&
m
,
const
mpz_class
&
sig
,
const
KeyPub
&
kPub
)
7
{
8
mpz_class m2
;
9
mpz_powm_sec
(
m2
.
get_mpz_t
(),
sig
.
get_mpz_t
(),
kPub
.
e
.
get_mpz_t
(),
kPub
.
n
.
get_mpz_t
());
10
return
m
==
m2
;
11
}