]> the.earth.li Git - onak.git/blob - rsa.h
Remove --with-systemd option to dh
[onak.git] / rsa.h
1 /*
2  * rsa.h - routines to check RSA hash signature combos not present in libnettle
3  *
4  * Copyright 2019 Jonathan McDowell <noodles@earth.li>
5  *
6  * This program is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the Free
8  * Software Foundation; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13  * more details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * this program.  If not, see <https://www.gnu.org/licenses/>.
17  */
18
19 #ifndef __RSA_H__
20 #define __RSA_H__
21
22 #ifdef HAVE_NETTLE
23 #include <string.h>
24
25 #include <nettle/ripemd160.h>
26 #include <nettle/rsa.h>
27 #include <nettle/sha.h>
28
29 int rsa_ripemd160_verify_digest(const struct rsa_public_key *key,
30                          const uint8_t *digest,
31                          const mpz_t s);
32
33 int rsa_sha224_verify_digest(const struct rsa_public_key *key,
34                          const uint8_t *digest,
35                          const mpz_t s);
36
37 int rsa_sha384_verify_digest(const struct rsa_public_key *key,
38                          const uint8_t *digest,
39                          const mpz_t s);
40 #endif
41
42 #endif /* __RSA_H__ */