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 #include <libecc/utils/print_keys.h> 17 18 void priv_key_print(const char *msg, const ec_priv_key *priv) 19 { 20 int ret; 21 22 MUST_HAVE(msg != NULL, ret, err); 23 ret = priv_key_check_initialized(priv); EG(ret, err); 24 25 nn_print(msg, &(priv->x)); 26 27 err: 28 return; 29 } 30 31 void pub_key_print(const char *msg, const ec_pub_key *pub) 32 { 33 int ret; 34 35 MUST_HAVE(msg != NULL, ret, err); 36 ret = pub_key_check_initialized(pub); EG(ret, err); 37 38 ec_point_print(msg, &(pub->y)); 39 40 err: 41 return; 42 } 43