/*1* ECDH helper functions - KPP wrappings2*3* Copyright (C) 2017 Intel Corporation4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License version 2 as7* published by the Free Software Foundation;8*9* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS10* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,11* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.12* IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY13* CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES14* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN15* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF16* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.17*18* ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,19* COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS20* SOFTWARE IS DISCLAIMED.21*/22#include <crypto/kpp.h>23#include <linux/types.h>2425int compute_ecdh_secret(struct crypto_kpp *tfm, const u8 pair_public_key[64],26u8 secret[32]);27int set_ecdh_privkey(struct crypto_kpp *tfm, const u8 private_key[32]);28int generate_ecdh_public_key(struct crypto_kpp *tfm, u8 public_key[64]);29int generate_ecdh_keys(struct crypto_kpp *tfm, u8 public_key[64]);303132