47 lines
1.8 KiB
C
47 lines
1.8 KiB
C
|
/*
|
||
|
*
|
||
|
* Wireless daemon for Linux
|
||
|
*
|
||
|
* Copyright (C) 2021 Intel Corporation. All rights reserved.
|
||
|
*
|
||
|
* This library is free software; you can redistribute it and/or
|
||
|
* modify it under the terms of the GNU Lesser General Public
|
||
|
* License as published by the Free Software Foundation; either
|
||
|
* version 2.1 of the License, or (at your option) any later version.
|
||
|
*
|
||
|
* This library is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
* Lesser General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Lesser General Public
|
||
|
* License along with this library; if not, write to the Free Software
|
||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||
|
*
|
||
|
*/
|
||
|
struct l_ecc_point;
|
||
|
struct l_ecc_scalar;
|
||
|
|
||
|
size_t dpp_nonce_len_from_key_len(size_t len);
|
||
|
|
||
|
bool dpp_hash(enum l_checksum_type type, uint8_t *out, unsigned int num, ...);
|
||
|
|
||
|
bool dpp_derive_r_auth(const void *i_nonce, const void *r_nonce,
|
||
|
size_t nonce_len, struct l_ecc_point *i_proto,
|
||
|
struct l_ecc_point *r_proto,
|
||
|
struct l_ecc_point *r_boot,
|
||
|
void *r_auth);
|
||
|
bool dpp_derive_i_auth(const void *r_nonce, const void *i_nonce,
|
||
|
size_t nonce_len, struct l_ecc_point *r_proto,
|
||
|
struct l_ecc_point *i_proto,
|
||
|
struct l_ecc_point *r_boot, void *i_auth);
|
||
|
struct l_ecc_scalar *dpp_derive_k1(const struct l_ecc_point *i_proto_public,
|
||
|
const struct l_ecc_scalar *boot_private,
|
||
|
void *k1);
|
||
|
struct l_ecc_scalar *dpp_derive_k2(const struct l_ecc_point *i_proto_public,
|
||
|
const struct l_ecc_scalar *proto_private,
|
||
|
void *k2);
|
||
|
bool dpp_derive_ke(const uint8_t *i_nonce, const uint8_t *r_nonce,
|
||
|
struct l_ecc_scalar *m, struct l_ecc_scalar *n,
|
||
|
void *ke);
|