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 __CURVES_H__ 17 #define __CURVES_H__ 18 19 #include <libecc/curves/ec_params.h> 20 21 ATTRIBUTE_WARN_UNUSED_RET int ec_get_curve_params_by_name(const u8 *ec_name, u8 ec_name_len, 22 const ec_str_params **ec_params); 23 ATTRIBUTE_WARN_UNUSED_RET int ec_get_curve_params_by_type(ec_curve_type ec_type, 24 const ec_str_params **ec_params); 25 ATTRIBUTE_WARN_UNUSED_RET int ec_get_curve_type_by_name(const u8 *ec_name, u8 ec_name_len, 26 ec_curve_type *ec_type); 27 ATTRIBUTE_WARN_UNUSED_RET int ec_get_curve_name_by_type(const ec_curve_type ec_type, u8 *out, u8 outlen); 28 ATTRIBUTE_WARN_UNUSED_RET int ec_check_curve_type_and_name(const ec_curve_type ec_type, 29 const u8 *ec_name, u8 ec_name_len); 30 31 #endif /* __CURVES_H__ */ 32