eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

mschaputil.h (1719B)


      1 /*
      2  *
      3  *  Wireless daemon for Linux
      4  *
      5  *  Copyright (C) 2018-2019  Intel Corporation. All rights reserved.
      6  *
      7  *  This library is free software; you can redistribute it and/or
      8  *  modify it under the terms of the GNU Lesser General Public
      9  *  License as published by the Free Software Foundation; either
     10  *  version 2.1 of the License, or (at your option) any later version.
     11  *
     12  *  This library is distributed in the hope that it will be useful,
     13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
     14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     15  *  Lesser General Public License for more details.
     16  *
     17  *  You should have received a copy of the GNU Lesser General Public
     18  *  License along with this library; if not, write to the Free Software
     19  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     20  *
     21  */
     22 
     23 #define NT_CHALLENGE_RESPONSE_LEN 24
     24 
     25 bool mschap_challenge_response(const uint8_t *challenge,
     26 						const uint8_t *password_hash,
     27 						uint8_t *response);
     28 bool mschap_nt_password_hash(const char *password, uint8_t *password_hash);
     29 bool mschapv2_hash_nt_password_hash(const uint8_t password_hash[static 16],
     30 					uint8_t password_hash_hash[static 16]);
     31 
     32 bool mschapv2_generate_nt_response(const uint8_t password_hash[static 16],
     33 				const uint8_t peer_challenge[static 16],
     34 				const uint8_t server_challenge[static 16],
     35 				const char *user,
     36 				uint8_t response[static 24]);
     37 
     38 bool mschapv2_generate_authenticator_response(
     39 				const uint8_t pw_hash_hash[static 16],
     40 				const uint8_t nt_response[static 24],
     41 				const uint8_t peer_challenge[static 16],
     42 				const uint8_t server_challenge[static 16],
     43 				const char *user, char response[static 42]);