/ external / libecc / include / libecc / fp / fp_montgomery.h
fp_montgomery.h
 1  /*
 2   *  Copyright (C) 2017 - 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   *      Jean-Pierre FLORI <jean-pierre.flori@ssi.gouv.fr>
 8   *
 9   *  Contributors:
10   *      Nicolas VIVET <nicolas.vivet@ssi.gouv.fr>
11   *      Karim KHALFALLAH <karim.khalfallah@ssi.gouv.fr>
12   *
13   *  This software is licensed under a dual BSD and GPL v2 license.
14   *  See LICENSE file at the root folder of the project.
15   */
16  #ifndef __FP_MONTGOMERY_H__
17  #define __FP_MONTGOMERY_H__
18  
19  #include <libecc/fp/fp.h>
20  #include <libecc/fp/fp_add.h>
21  #include <libecc/fp/fp_mul.h>
22  #include <libecc/fp/fp_mul_redc1.h>
23  
24  ATTRIBUTE_WARN_UNUSED_RET int fp_add_monty(fp_t out, fp_src_t in1, fp_src_t in2);
25  ATTRIBUTE_WARN_UNUSED_RET int fp_sub_monty(fp_t out, fp_src_t in1, fp_src_t in2);
26  ATTRIBUTE_WARN_UNUSED_RET int fp_mul_monty(fp_t out, fp_src_t in1, fp_src_t in2);
27  ATTRIBUTE_WARN_UNUSED_RET int fp_sqr_monty(fp_t out, fp_src_t in);
28  ATTRIBUTE_WARN_UNUSED_RET int fp_div_monty(fp_t out, fp_src_t in1, fp_src_t in2);
29  
30  #endif /* __FP_MONTGOMERY_H__ */