iwd/src/crypto.h

34 lines
1.2 KiB
C
Raw Normal View History

/*
*
* Wireless daemon for Linux
*
* Copyright (C) 2013-2014 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
*
*/
#include <stddef.h>
2014-12-26 18:46:27 +01:00
#include <stdbool.h>
int crypto_psk_from_passphrase(const char *passphrase,
const unsigned char *ssid, size_t ssid_len,
unsigned char *out_psk);
2014-12-26 18:46:27 +01:00
bool crypto_derive_ptk(uint8_t *pmk, size_t pmk_len, const char *label,
uint8_t *addr1, uint8_t *addr2,
uint8_t *nonce1, uint8_t *nonce2,
uint8_t *out_ptk, size_t ptk_len);