Linux 4.8.3
[linux/fpc-iii.git] / include / crypto / dh.h
blob5102a8f282e606932fa5e447216da4efab06c31e
1 /*
2 * Diffie-Hellman secret to be used with kpp API along with helper functions
4 * Copyright (c) 2016, Intel Corporation
5 * Authors: Salvatore Benedetto <salvatore.benedetto@intel.com>
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.
13 #ifndef _CRYPTO_DH_
14 #define _CRYPTO_DH_
16 struct 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;
25 int crypto_dh_key_len(const struct dh *params);
26 int crypto_dh_encode_key(char *buf, unsigned int len, const struct dh *params);
27 int crypto_dh_decode_key(const char *buf, unsigned int len, struct dh *params);
29 #endif