chap_ms.h revision 134789
11817Sdg/*- 21817Sdg * Copyright (c) 1997 Gabor Kincses <gabor@acm.org> 31817Sdg * 1997 - 2001 Brian Somers <brian@Awfulhak.org> 41817Sdg * based on work by Eric Rosenquist 51817Sdg * Strata Software Limited. 61817Sdg * All rights reserved. 71817Sdg * 81817Sdg * Redistribution and use in source and binary forms, with or without 91817Sdg * modification, are permitted provided that the following conditions 101817Sdg * are met: 111817Sdg * 1. Redistributions of source code must retain the above copyright 121817Sdg * notice, this list of conditions and the following disclaimer. 131817Sdg * 2. Redistributions in binary form must reproduce the above copyright 141817Sdg * notice, this list of conditions and the following disclaimer in the 151817Sdg * documentation and/or other materials provided with the distribution. 161817Sdg * 171817Sdg * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 181817Sdg * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 191817Sdg * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 201817Sdg * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 211817Sdg * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 221817Sdg * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 231817Sdg * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 241817Sdg * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 251817Sdg * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 261817Sdg * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 271817Sdg * SUCH DAMAGE. 281817Sdg * 2950477Speter * $FreeBSD: head/usr.sbin/ppp/chap_ms.h 134789 2004-09-05 01:46:52Z brian $ 301817Sdg */ 311817Sdg 322579Sbde/* Max # of (Unicode) chars in an NT password */ 332579Sbde#define MAX_NT_PASSWORD 256 342123Sjkh 3516029Speter/* Don't rely on sizeof(MS_ChapResponse) in case of struct padding */ 362579Sbde#define MS_CHAP_RESPONSE_LEN 49 3718961Sbde#define CHAP81_RESPONSE_LEN 49 3813107Sbde#define CHAP81_NTRESPONSE_LEN 24 3925083Sjdp#define CHAP81_NTRESPONSE_OFF 24 4025083Sjdp#define CHAP81_HASH_LEN 16 4125083Sjdp#define CHAP81_AUTHRESPONSE_LEN 42 4225083Sjdp#define CHAP81_CHALLENGE_LEN 16 4325083Sjdp 4425083Sjdpextern void mschap_NT(char *, char *); 4525083Sjdpextern void mschap_LANMan(char *, char *, char *); 4625083Sjdpextern void GenerateNTResponse(char *, char *, char *, char *, int , char *); 4797721Salfredextern void HashNtPasswordHash(char *, char *); 4825083Sjdpextern void NtPasswordHash(char *, int, char *); 49114349Speterextern void GenerateAuthenticatorResponse(char *, int, char *, char *, char *, char *, char *); 5022636Sbdeextern void GetAsymetricStartKey(char *, char *, int, int, int); 5125083Sjdpextern void GetMasterKey(char *, char *, char *); 5222636Sbdeextern void GetNewKeyFromSHA(char *, char *, long, char *); 53114349Speter