/ external / libecc / include / libecc / sig / bign.h
bign.h
 1  /*
 2   *  Copyright (C) 2022 - This file is part of libecc project
 3   *
 4   *  Authors:
 5   *      Ryad BENADJILA <ryadbenadjila@gmail.com>
 6   *      Arnaud EBALARD <arnaud.ebalard@ssi.gouv.fr>
 7   *
 8   *  This software is licensed under a dual BSD and GPL v2 license.
 9   *  See LICENSE file at the root folder of the project.
10   */
11  #include <libecc/lib_ecc_config.h>
12  #include <libecc/lib_ecc_types.h>
13  #ifdef WITH_SIG_BIGN
14  
15  #ifndef __BIGN_H__
16  #define __BIGN_H__
17  
18  #include <libecc/sig/bign_common.h>
19  
20  ATTRIBUTE_WARN_UNUSED_RET int bign_init_pub_key(ec_pub_key *out_pub, const ec_priv_key *in_priv);
21  
22  ATTRIBUTE_WARN_UNUSED_RET int bign_siglen(u16 p_bit_len, u16 q_bit_len, u8 hsize, u8 blocksize, u8 *siglen);
23  
24  ATTRIBUTE_WARN_UNUSED_RET int _bign_sign_init(struct ec_sign_context *ctx);
25  
26  ATTRIBUTE_WARN_UNUSED_RET int _bign_sign_update(struct ec_sign_context *ctx,
27  		       const u8 *chunk, u32 chunklen);
28  
29  ATTRIBUTE_WARN_UNUSED_RET int _bign_sign_finalize(struct ec_sign_context *ctx, u8 *sig, u8 siglen);
30  
31  ATTRIBUTE_WARN_UNUSED_RET int _bign_verify_init(struct ec_verify_context *ctx,
32  		       const u8 *sig, u8 siglen);
33  
34  ATTRIBUTE_WARN_UNUSED_RET int _bign_verify_update(struct ec_verify_context *ctx,
35  			 const u8 *chunk, u32 chunklen);
36  
37  ATTRIBUTE_WARN_UNUSED_RET int _bign_verify_finalize(struct ec_verify_context *ctx);
38  
39  #endif /* __BIGN_H__ */
40  #endif /* WITH_SIG_BIGN */