From owner-freebsd-net@FreeBSD.ORG Wed Apr 13 09:39:26 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D35DF16A4CE for ; Wed, 13 Apr 2005 09:39:26 +0000 (GMT) Received: from sasami.jurai.net (sasami.jurai.net [69.17.104.113]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BADB43D39 for ; Wed, 13 Apr 2005 09:39:26 +0000 (GMT) (envelope-from mdodd@FreeBSD.ORG) Received: from sasami.jurai.net (winter@sasami.jurai.net [69.17.104.113]) by sasami.jurai.net (8.13.1/8.13.1) with ESMTP id j3D9dNqb017469; Wed, 13 Apr 2005 05:39:25 -0400 (EDT) (envelope-from mdodd@FreeBSD.ORG) Date: Wed, 13 Apr 2005 05:39:23 -0400 (EDT) From: "Matthew N. Dodd" X-X-Sender: winter@sasami.jurai.net To: Swami Pichumani In-Reply-To: Message-ID: <20050413052758.D3762@sasami.jurai.net> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.6 (sasami.jurai.net [69.17.104.113]); Wed, 13 Apr 2005 05:39:25 -0400 (EDT) cc: freebsd-net@FreeBSD.ORG Subject: Re: Fwd: RSA implementation X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2005 09:39:26 -0000 On Wed, 13 Apr 2005, Swami Pichumani wrote: > Is there an in-kernel RSA implementation available...if there is one, > could you kindly point me to it. I wish to use RSA functions in the TCP > code. Can someone guide me on how I can go about doing that (if I dont > want to implement RSA myself). The actual RSA bits aren't really a big deal: C = (T^E) mod PQ T = (C^D) mod PQ where C = ciphertext, T = plaintext, PQ = modulus, E = public exponent and D = secret exponent (from http://world.std.com/~franl/crypto/rsa-guts.html) You really need an arbitrary precision library and key management of some sort. I'm finishing up an arbitrary precision library that runs in the kernel and userland. I'd welcome review and critique once the code is ready for the light of day. I've got a few ideas about what key management should look like, and will be working on it soonish. What is your application? I'd like to make sure my work is useful to others. -- 10 40 80 C0 00 FF FF FF FF C0 00 00 00 00 10 AA AA 03 00 00 00 08 00