blob: 5102a8f282e606932fa5e447216da4efab06c31e [file] [log] [blame]
Salvatore Benedetto802c7f12016-06-22 17:49:14 +01001/*
2 * Diffie-Hellman secret to be used with kpp API along with helper functions
3 *
4 * Copyright (c) 2016, Intel Corporation
5 * Authors: Salvatore Benedetto <salvatore.benedetto@intel.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the Free
9 * Software Foundation; either version 2 of the License, or (at your option)
10 * any later version.
11 *
12 */
13#ifndef _CRYPTO_DH_
14#define _CRYPTO_DH_
15
16struct dh {
17 void *key;
18 void *p;
19 void *g;
20 unsigned int key_size;
21 unsigned int p_size;
22 unsigned int g_size;
23};
24
25int crypto_dh_key_len(const struct dh *params);
26int crypto_dh_encode_key(char *buf, unsigned int len, const struct dh *params);
27int crypto_dh_decode_key(const char *buf, unsigned int len, struct dh *params);
28
29#endif