xref: /linux/net/bluetooth/ecdh_helper.h (revision 58771c1cb0023fdd744e76d6cad7716dc4f579ee)
1*58771c1cSSalvatore Benedetto /*
2*58771c1cSSalvatore Benedetto  * ECDH helper functions - KPP wrappings
3*58771c1cSSalvatore Benedetto  *
4*58771c1cSSalvatore Benedetto  * Copyright (C) 2017 Intel Corporation
5*58771c1cSSalvatore Benedetto  *
6*58771c1cSSalvatore Benedetto  * This program is free software; you can redistribute it and/or modify
7*58771c1cSSalvatore Benedetto  * it under the terms of the GNU General Public License version 2 as
8*58771c1cSSalvatore Benedetto  * published by the Free Software Foundation;
9*58771c1cSSalvatore Benedetto  *
10*58771c1cSSalvatore Benedetto  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
11*58771c1cSSalvatore Benedetto  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12*58771c1cSSalvatore Benedetto  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
13*58771c1cSSalvatore Benedetto  * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
14*58771c1cSSalvatore Benedetto  * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
15*58771c1cSSalvatore Benedetto  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16*58771c1cSSalvatore Benedetto  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17*58771c1cSSalvatore Benedetto  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18*58771c1cSSalvatore Benedetto  *
19*58771c1cSSalvatore Benedetto  * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
20*58771c1cSSalvatore Benedetto  * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
21*58771c1cSSalvatore Benedetto  * SOFTWARE IS DISCLAIMED.
22*58771c1cSSalvatore Benedetto  */
23*58771c1cSSalvatore Benedetto #include <linux/types.h>
24*58771c1cSSalvatore Benedetto 
25*58771c1cSSalvatore Benedetto bool compute_ecdh_secret(const u8 pub_a[64], const u8 priv_b[32],
26*58771c1cSSalvatore Benedetto 			 u8 secret[32]);
27*58771c1cSSalvatore Benedetto bool generate_ecdh_keys(u8 public_key[64], u8 private_key[32]);
28