0157453cda0d210416cd61fa284521a7062d7a78
[strongswan.git] / src / libstrongswan / fips / fips.h
1 /*
2 * Copyright (C) 2007 Bruno Krieg, Daniel Wydler
3 * Hochschule fuer Technik Rapperswil
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 *
15 * $Id$
16 */
17
18 /**
19 * @defgroup fips1 fips
20 * @{ @ingroup fips
21 */
22
23 #ifndef FIPS_H_
24 #define FIPS_H_
25
26 #include <library.h>
27
28 /**
29 * compute HMAC signature over RODATA and TEXT sections of libstrongswan
30 *
31 * @param key key used for HMAC signature in ASCII string format
32 * @param signature HMAC signature in HEX string format
33 * @return TRUE if HMAC signature computation was successful
34 */
35 bool fips_compute_hmac_signature(const char *key, char *signature);
36
37 /**
38 * verify HMAC signature over RODATA and TEXT sections of libstrongswan
39 *
40 * @param key key used for HMAC signature in ASCII string format
41 * @param signature signature value from fips_signature.h in HEX string format
42 * @return TRUE if signatures agree
43 */
44 bool fips_verify_hmac_signature(const char *key, const char *signature);
45
46 #endif /*FIPS_H_ @} */