Path: blob/main/crypto/libecc/src/utils/print_keys.c
34889 views
/*1* Copyright (C) 2017 - This file is part of libecc project2*3* Authors:4* Ryad BENADJILA <[email protected]>5* Arnaud EBALARD <[email protected]>6* Jean-Pierre FLORI <[email protected]>7*8* Contributors:9* Nicolas VIVET <[email protected]>10* Karim KHALFALLAH <[email protected]>11*12* This software is licensed under a dual BSD and GPL v2 license.13* See LICENSE file at the root folder of the project.14*/15#include <libecc/utils/print_keys.h>1617void priv_key_print(const char *msg, const ec_priv_key *priv)18{19int ret;2021MUST_HAVE(msg != NULL, ret, err);22ret = priv_key_check_initialized(priv); EG(ret, err);2324nn_print(msg, &(priv->x));2526err:27return;28}2930void pub_key_print(const char *msg, const ec_pub_key *pub)31{32int ret;3334MUST_HAVE(msg != NULL, ret, err);35ret = pub_key_check_initialized(pub); EG(ret, err);3637ec_point_print(msg, &(pub->y));3839err:40return;41}424344