1/* $OpenBSD: chap_ms.h,v 1.6 2015/08/21 11:59:27 reyk Exp $ */ 2 3/* 4 * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> 5 * 6 * Permission to use, copy, modify, and distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19#ifndef CHAP_MS_H 20#define CHAP_MS_H 21 22#define MSCHAP_CHALLENGE_SZ 8 23#define MSCHAPV2_CHALLENGE_SZ 16 24#define MSCHAP_HASH_SZ 16 25#define MSCHAP_MASTERKEY_SZ 16 26#define MSCHAP_MSK_KEY_SZ 32 27#define MSCHAP_MSK_PADDING_SZ 32 28#define MSCHAP_MSK_SZ 64 29 30#define MSCHAP_MAXNTPASSWORD_SZ 255 /* unicode chars */ 31 32void mschap_nt_response(uint8_t *, uint8_t *, uint8_t *, int, 33 uint8_t *, int , uint8_t *); 34void mschap_auth_response(uint8_t *, int, uint8_t *, uint8_t *, 35 uint8_t *, uint8_t *, int, uint8_t *); 36 37void mschap_ntpassword_hash(uint8_t *, int, uint8_t *); 38void mschap_challenge_hash(uint8_t *, uint8_t *, uint8_t *, 39 int, uint8_t *); 40 41void mschap_asymetric_startkey(uint8_t *, uint8_t *, int, int, int); 42void mschap_masterkey(uint8_t *, uint8_t *, uint8_t *); 43void mschap_radiuskey(uint8_t *, const uint8_t *, const uint8_t *, 44 const uint8_t *); 45void mschap_msk(uint8_t *, int, uint8_t *, uint8_t *); 46 47#endif /* CHAP_MS_H */ 48