From: tom st denis <tomstdenis@yahoo.com>
To: linux-kernel@vger.kernel.org
Subject: Re: RSA
Date: Tue, 22 Jun 2004 04:52:53 -0700 (PDT) [thread overview]
Message-ID: <20040622115253.79308.qmail@web41105.mail.yahoo.com> (raw)
In-Reply-To: <BAY16-F15pyLAPDVXLu000036f9@hotmail.com>
--- kartikey bhatt <kartik_me@hotmail.com> wrote:
> hey i am gonna look at the code right now.
> will keep in touch.
>
> "Tom has indicated a few ways to go about this which I will send
> you."
> waiting for details.
Um to clear up something here. Joy and Serge are going to be the
developers on this module. I'm just helping out where I can with my
knowledge of crypto/math/LibTom internals.
Specifically a good starting place is to rip "mpi.c" out of LibTomCrypt
and start stripping it down. You don't need things like the
Karatsuba/Toom-Cook multipliers, Jacobi symbol, various prime functions
[next_prime, fermat testing, etc]. You won't need the diminished radix
and Barrett reduction algorithms, etc, etc, etc.
In a recent project [see my C.V. for details] I managed to get a
"optimized for size" mpi.c down from 29KB to 5KB on an x86 with GCC.
Naturally this won't be that small since you want to leave in things
like the Comba mult/sqr algorithms and the full exptmod routine. But
definitely around 7-10KB is possible on the x86.
Then of course you have the RSA routines on top of that. Depending on
whether you need PKCS #1 v2 or v1.5 you can do one of two things. I
have both v2 and v1.5 padding in LibTomCrypt [and specifically in the
v0.97 release I reduced the stack usage to way south of 4KB]. So if
you're using v1.5 you'll have to write your own rsa encrypt/sign code
[I have a key-gen and CRT optimized exptmod you can rip off].
On the plus side all of my code is ISO C portable, thread safe and well
tested [been used by quite a few people]. There are enough goodies in
LibTomCrypt to make this happen and you're all entitled to
rip/relicense as required ;-)
Tom
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
next prev parent reply other threads:[~2004-06-22 11:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-22 4:13 RSA kartikey bhatt
2004-06-22 11:52 ` tom st denis [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-06-19 4:37 RSA kartikey bhatt
2004-06-19 2:56 RSA Joy Latten
2004-06-15 16:46 RSA kartikey bhatt
2004-06-15 9:44 RSA Joy Latten
2004-06-15 1:29 ` RSA James Morris
2004-06-15 23:54 ` RSA Serge E. Hallyn
2004-06-16 0:22 ` RSA tom st denis
2004-06-16 2:04 ` RSA Serge E. Hallyn
2004-06-16 2:52 ` RSA tom st denis
2004-06-19 16:12 ` RSA Kristian Sørensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040622115253.79308.qmail@web41105.mail.yahoo.com \
--to=tomstdenis@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®