Re: RSA

From: tom st denis (tomstdenis_at_yahoo.com)
Date: 06/22/04

  • Next message: Takao Indoh: "Re: [PATCH 2/4]Diskdump Update"
    Date:	Tue, 22 Jun 2004 04:52:53 -0700 (PDT)
    To: linux-kernel@vger.kernel.org
    
    

    --- 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
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Takao Indoh: "Re: [PATCH 2/4]Diskdump Update"

    Relevant Pages

    • [SLE] Aha - was: [SLE] easy way to upgrade KDE?
      ... > just running apt ... Thank you Tom, ... began to leand was told I needed PQR ... ... Do you Yahoo!? ...
      (SuSE)
    • Re: Computing big numbers
      ... Tom, LibTomCrypt, LibTomMath, LibTomThis, LibTomThat, ad nauseam. ... few years where Tom has NOT posted an insulting or rude remark ... the originator of (and the sole poster to) the given thread? ...
      (sci.crypt)
    • RE: RE[PATCH]2.6.4-rc3 MSI Support for IA64
      ... interface/macro. ... >From: Nguyen, Tom L ... >> (assuming it's clean etc., ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Relayfs Question: Use of relay_reset(). Potential race?
      ... > Hi Tom, ... Yes, you should be able to reset the channel here, since at that point ... __relay_reset- thanks for catching this and suggesting the fix. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Another SHA2 implementation
      ... > Hi Tom, ... All I'm saying is if you want to make an impact you're going to have ... something of an edge on LibTomCrypt. ... So I'm not saying "don't code crypto for thy god ...
      (sci.crypt)