From owner-freebsd-hackers Thu Apr 20 15: 1:13 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bubba.whistle.com (bubba.whistle.com [207.76.205.7]) by hub.freebsd.org (Postfix) with ESMTP id 5F37937B50D; Thu, 20 Apr 2000 15:01:07 -0700 (PDT) (envelope-from archie@whistle.com) Received: (from archie@localhost) by bubba.whistle.com (8.9.3/8.9.2) id PAA98814; Thu, 20 Apr 2000 15:01:01 -0700 (PDT) From: Archie Cobbs Message-Id: <200004202201.PAA98814@bubba.whistle.com> Subject: Re: MD5 usage in the kernel. In-Reply-To: <14591.25172.361989.676550@trooper.velocet.net> from David Gilbert at "Apr 20, 2000 04:02:28 pm" To: dgilbert@velocet.ca (David Gilbert) Date: Thu, 20 Apr 2000 15:01:01 -0700 (PDT) Cc: freebsd-stable@freebsd.org, hackers@freebsd.org, archie@whistle.com (Archie Cobbs) X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG David Gilbert writes: > I'm working on an l2tp netgraph node. I need md5. Specifically, the > RFC says: > > The Response is a 16 octet value reflecting the CHAP-style > [RFC1994] response to the challenge. > > I've had a look at md5.c, but there is no documentation on the usage > md5. In this specific case, how do I call it? MD5 is included in the kernel by default. So just call the same routines shown in the md5(3) man page... they're declared in /sys/crypto/md5.h, which you should #include in your C file(s). > If CHAP uses MD5, how does ng_ppp or kernel ppp handle this (or does > it)? In the ng_ppp case, in user-land where all PPP negotiation takes place. For kernel PPP, in the kernel -- see sys/net/if_spppsubr.c. -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message