Re: Re-RSA and large numbers

From: Antonomasia (antat_private)
Date: Tue May 01 2001 - 14:44:57 PDT

  • Next message: Seth Arnold: "Re: Re-RSA and large numbers"

    From: Adam Berent <adminat_private>
    
    > I have looked at the gnu math libraries and frankly they
    > make me want to blow my brains out.  There are about a
    > hundred source files.  I don't even know where too start.
    
    > However I would like to know what the trick is.
    > Some people suggested storing the numbers in a string.
    > This seems a bit crude and would probably be too slow.
    
    Slow educational code can be found at
        http://www.notatla.demon.co.uk/CRYPTO/FBN_funcs.c
    but for real use something such as already suggested should be used.
    I was originally planning (because of the difficulty of picking the right
    bits of large libraries) to use this but beside the performance there's
    a bug affecting the top bit of 1024-bit numbers.
    
    This is really an implementation in unsigned characters of pen and paper
    arithmetic with (where there is some choice) simpler functions being
    defined in ways that allow them to be used to build the more complicated
    ones.
    
    Some of the least readable code is OO and allows arbitrary integer sizes
    unlike the fixed length of my example.  Production code uses integers
    rather than characters because they are a wider data type.  Also mathematical
    results involving speed become important and there are architectural issues
    such as (quoting EAY)
    
    :                              Normally I put in differnt version of the
    : same code which helps differnt CPU/compiler combinations.  Sparcs like
    : *(a++), x86/gcc likes a[i], a[i+1], a[i+2], a[i+3], i+=4.
    
    --
    ##############################################################
    # Antonomasia   ant notatla.demon.co.uk                      #
    # See http://www.notatla.demon.co.uk/                        #
    ##############################################################
    



    This archive was generated by hypermail 2b30 : Thu May 03 2001 - 14:46:20 PDT