Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:02:16

0001 /* pss.h
0002 
0003    PKCS#1 RSA-PSS (RFC-3447).
0004 
0005    Copyright (C) 2017 Daiki Ueno
0006 
0007    This file is part of GNU Nettle.
0008 
0009    GNU Nettle is free software: you can redistribute it and/or
0010    modify it under the terms of either:
0011 
0012      * the GNU Lesser General Public License as published by the Free
0013        Software Foundation; either version 3 of the License, or (at your
0014        option) any later version.
0015 
0016    or
0017 
0018      * the GNU General Public License as published by the Free
0019        Software Foundation; either version 2 of the License, or (at your
0020        option) any later version.
0021 
0022    or both in parallel, as here.
0023 
0024    GNU Nettle is distributed in the hope that it will be useful,
0025    but WITHOUT ANY WARRANTY; without even the implied warranty of
0026    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0027    General Public License for more details.
0028 
0029    You should have received copies of the GNU General Public License and
0030    the GNU Lesser General Public License along with this program.  If
0031    not, see http://www.gnu.org/licenses/.
0032 */
0033 
0034 #ifndef NETTLE_PSS_H_INCLUDED
0035 #define NETTLE_PSS_H_INCLUDED
0036 
0037 #include "nettle-meta.h"
0038 #include "bignum.h"
0039 
0040 #ifdef __cplusplus
0041 extern "C"
0042 {
0043 #endif
0044 
0045 /* Namespace mangling */
0046 #define pss_encode_mgf1 nettle_pss_encode_mgf1
0047 #define pss_verify_mgf1 nettle_pss_verify_mgf1
0048 
0049 int
0050 pss_encode_mgf1(mpz_t m, size_t bits,
0051         const struct nettle_hash *hash,
0052         size_t salt_length, const uint8_t *salt,
0053         const uint8_t *digest);
0054 
0055 int
0056 pss_verify_mgf1(const mpz_t m, size_t bits,
0057         const struct nettle_hash *hash,
0058         size_t salt_length,
0059         const uint8_t *digest);
0060 
0061 #ifdef __cplusplus
0062 }
0063 #endif
0064 
0065 #endif /* NETTLE_PSS_H_INCLUDED */