]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - include/crypto/dh.h
Merge branch 'for-linus-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mason...
[mirror_ubuntu-zesty-kernel.git] / include / crypto / dh.h
1 /*
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
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;
23 };
24
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);
28
29 #endif