Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/crypto/libecc/src/utils/print_keys.c
34889 views
1
/*
2
* Copyright (C) 2017 - This file is part of libecc project
3
*
4
* Authors:
5
* Ryad BENADJILA <[email protected]>
6
* Arnaud EBALARD <[email protected]>
7
* Jean-Pierre FLORI <[email protected]>
8
*
9
* Contributors:
10
* Nicolas VIVET <[email protected]>
11
* Karim KHALFALLAH <[email protected]>
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
44