Hi!

I've got it pass 'make test' on IRIX 6.x, N32 ABI. Find patch attached
(I feel like I'll put some extra comments into bn.h some day). I've
rearranged irix* lines in ./Configure a little bit. Mostly because the
way irix64 is used there isn't what people used to. They usually think
of LP64 when they hear irix64. Speaking of which. I have *not* tested
the new irix64 option and I think that if nobody can confirm it's
working by the time of upcoming release it better be commented out.

And as a free bonus for Solaris users! New loops in bn_lib.c don't drive
SC4.2 and SC5.0FCS nuts anymore. So I challenge you to merge
solaris-*-sc4 and solaris-*-sc5 to solaris-*-cc and rename solaris-*-cc
to solaris-*-sc3 (just like I wished another day:-). Also note that
comment about obligatory SC5.0 patch is gone. Well, at least for now...

To the list of tested platforms. I've tested the patched snapshot on:

IRIX  6.[45], MIPSpro C 7.2.1,  n32,mips3
SunOS 5.[67], SC4.2 +104668-06, xtarget=ultra,xarch=v8plus
SunOS 5.[67], SC5.0 FCS,        xtarget=ultra,xarch=v8plus
SunOS 5.[67], SC5.0 +107357-01, xtarget=ultra,xarch=v8plus
SunOS 5.7,    SC5.0 FCS,        xtarget=ultra,xarch=v9
SunOS 5.7,    SC5.0 +107357-01, xtarget=ultra,xarch=v9

Cheers. Andy.
*** ./crypto/bn/bn.h.orig       Tue May 18 01:00:29 1999
--- ./crypto/bn/bn.h    Wed May 19 23:44:06 1999
***************
*** 119,129 ****
  /* This is where the long long data type is 64 bits, but long is 32.
   * For machines where there are 64bit registers, this is the mode to use.
   * IRIX, on R4000 and above should use this mode, along with the relevent
!  * assember code :-).  Do NOT define BN_ULLONG.
   */
  #ifdef SIXTY_FOUR_BIT
! #define BN_LLONG
! /* #define BN_ULLONG  unsigned long long */
  #define BN_ULONG      unsigned long long
  #define BN_LONG               long long
  #define BN_BITS               128
--- 119,129 ----
  /* This is where the long long data type is 64 bits, but long is 32.
   * For machines where there are 64bit registers, this is the mode to use.
   * IRIX, on R4000 and above should use this mode, along with the relevent
!  * assember code :-).  Do NOT define BN_LLONG.
   */
  #ifdef SIXTY_FOUR_BIT
! #undef BN_LLONG
! #undef BN_ULLONG
  #define BN_ULONG      unsigned long long
  #define BN_LONG               long long
  #define BN_BITS               128
*** ./crypto/bn/bn_lib.c.orig   Sat May 15 17:00:07 1999
--- ./crypto/bn/bn_lib.c        Thu May 20 01:27:46 1999
***************
*** 150,156 ****
  
  int BN_num_bits_word(BN_ULONG l)
        {
!       static char bits[256]={
                0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,
                5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
                6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
--- 150,156 ----
  
  int BN_num_bits_word(BN_ULONG l)
        {
!       static const char bits[256]={
                0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,
                5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
                6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
***************
*** 343,350 ****
  
  BIGNUM *bn_expand2(BIGNUM *b, int words)
        {
!       BN_ULONG *A,*B,*a;
!       int i,j;
  
        bn_check_top(b);
  
--- 343,351 ----
  
  BIGNUM *bn_expand2(BIGNUM *b, int words)
        {
!       BN_ULONG *A,*a;
!       const BN_ULONG *B;
!       int i;
  
        bn_check_top(b);
  
***************
*** 362,376 ****
                        BNerr(BN_F_BN_EXPAND2,ERR_R_MALLOC_FAILURE);
                        return(NULL);
                        }
- memset(A,0x5c,sizeof(BN_ULONG)*(words+1));
  #if 1
                B=b->d;
                /* Check if the previous number needs to be copied */
                if (B != NULL)
                        {
                        /* This lot is an unrolled loop to copy b->top 
                         * BN_ULONGs from B to A
                         */
                        for (i=b->top&(~7); i>0; i-=8)
                                {
                                A[0]=B[0]; A[1]=B[1]; A[2]=B[2]; A[3]=B[3];
--- 363,400 ----
                        BNerr(BN_F_BN_EXPAND2,ERR_R_MALLOC_FAILURE);
                        return(NULL);
                        }
  #if 1
                B=b->d;
                /* Check if the previous number needs to be copied */
                if (B != NULL)
                        {
+ #if 0
                        /* This lot is an unrolled loop to copy b->top 
                         * BN_ULONGs from B to A
                         */
+ /*
+  * I have nothing against unrolling but it's usually done for
+  * several reasons, namely:
+  * - minimize percentage of decision making code, i.e. branches;
+  * - avoid cache trashing;
+  * - make it possible to schedule loads earlier;
+  * Now let's examine the code below. The cornerstone of C is
+  * "programmer is always right" and that's what we love it for:-)
+  * For this very reason C compilers have to be paranoid when it
+  * comes to data aliasing and assume the worst. Yeah, but what
+  * does it mean in real life? This means that loop body below will
+  * be compiled to sequence of loads immediately followed by stores
+  * as compiler assumes the worst, something in A==B+1 style. As a
+  * result CPU pipeline is going to starve for incoming data. Secondly
+  * if A and B happen to share same cache line such code is going to
+  * cause severe cache trashing. Both factors have severe impact on
+  * performance of modern CPUs and this is the reason why this
+  * particulare piece of code is #ifdefed away and replaced by more
+  * "friendly" version found in #else section below. This comment
+  * also applies to BN_copy function.
+  *
+  *                                    <[EMAIL PROTECTED]>
+  */
                        for (i=b->top&(~7); i>0; i-=8)
                                {
                                A[0]=B[0]; A[1]=B[1]; A[2]=B[2]; A[3]=B[3];
***************
*** 407,412 ****
--- 431,460 ----
                                 */
                                ;
                                }
+ #else
+                       for (i=b->top>>2; i>0; i--,A+=4,B+=4)
+                               {
+                               /*
+                                * The fact that the loop is unrolled
+                                * 4-wise is a tribute to Intel. It's
+                                * the one that doesn't have enough
+                                * registers to accomodate more data.
+                                * I'd unroll it 8-wise otherwise:-)
+                                *
+                                *              <[EMAIL PROTECTED]>
+                                */
+                               BN_ULONG a0,a1,a2,a3;
+                               a0=B[0]; a1=B[1]; a2=B[2]; a3=B[3];
+                               A[0]=a0; A[1]=a1; A[2]=a2; A[3]=a3;
+                               }
+                       switch (b->top&3)
+                               {
+                               case 3: A[2]=B[2];
+                               case 2: A[1]=B[1];
+                               case 1: A[0]=B[0];
+                               case 0: ; /* ultrix cc workaround, see above */
+                               }
+ #endif
                        Free(b->d);
                        }
  
***************
*** 415,436 ****
  
                /* Now need to zero any data between b->top and b->max */
  
!               B= &(b->d[b->top]);
!               j=(b->max - b->top) & ~7;
!               for (i=0; i<j; i+=8)
!                       {
!                       B[0]=0; B[1]=0; B[2]=0; B[3]=0;
!                       B[4]=0; B[5]=0; B[6]=0; B[7]=0;
!                       B+=8;
!                       }
!               j=(b->max - b->top) & 7;
!               for (i=0; i<j; i++)
                        {
!                       B[0]=0;
!                       B++;
                        }
  #else
!                       memcpy(a->d,b->d,sizeof(b->d[0])*b->top);
  #endif
                
  /*            memset(&(p[b->max]),0,((words+1)-b->max)*sizeof(BN_ULONG)); */
--- 463,481 ----
  
                /* Now need to zero any data between b->top and b->max */
  
!               A= &(b->d[b->top]);
!               for (i=(b->max - b->top)>>3; i>0; i--,A+=8)
                        {
!                       A[0]=0; A[1]=0; A[2]=0; A[3]=0;
!                       A[4]=0; A[5]=0; A[6]=0; A[7]=0;
                        }
+               for (i=(b->max - b->top)&7; i>0; i--,A++)
+                       A[0]=0;
  #else
!                       memset(A,0,sizeof(BN_ULONG)*(words+1));
!                       memcpy(A,b->d,sizeof(b->d[0])*b->top);
!                       b->d=a;
!                       b->max=words;
  #endif
                
  /*            memset(&(p[b->max]),0,((words+1)-b->max)*sizeof(BN_ULONG)); */
***************
*** 454,460 ****
  BIGNUM *BN_copy(BIGNUM *a, BIGNUM *b)
        {
        int i;
!       BN_ULONG *A,*B;
  
        bn_check_top(b);
  
--- 499,506 ----
  BIGNUM *BN_copy(BIGNUM *a, BIGNUM *b)
        {
        int i;
!       BN_ULONG *A;
!       const BN_ULONG *B;
  
        bn_check_top(b);
  
***************
*** 464,510 ****
  #if 1
        A=a->d;
        B=b->d;
!       for (i=b->top&(~7); i>0; i-=8)
                {
!               A[0]=B[0];
!               A[1]=B[1];
!               A[2]=B[2];
!               A[3]=B[3];
!               A[4]=B[4];
!               A[5]=B[5];
!               A[6]=B[6];
!               A[7]=B[7];
!               A+=8;
!               B+=8;
!               }
!       switch (b->top&7)
!               {
!       case 7:
!               A[6]=B[6];
!       case 6:
!               A[5]=B[5];
!       case 5:
!               A[4]=B[4];
!       case 4:
!               A[3]=B[3];
!       case 3:
!               A[2]=B[2];
!       case 2:
!               A[1]=B[1];
!       case 1:
!               A[0]=B[0];
!         case 0:
!               /* I need the 'case 0' entry for utrix cc.
!                * If the optimiser is turned on, it does the
!                * switch table by doing
!                * a=top&7
!                * a--;
!                * goto jump_table[a];
!                * If top is 0, this makes us jump to 0xffffffc which is
!                * rather bad :-(.
!                * eric 23-Apr-1998
!                */
!               ;
                }
  #else
        memcpy(a->d,b->d,sizeof(b->d[0])*b->top);
--- 510,527 ----
  #if 1
        A=a->d;
        B=b->d;
!       for (i=b->top>>2; i>0; i--,A+=4,B+=4)
                {
!               BN_ULONG a0,a1,a2,a3;
!               a0=B[0]; a1=B[1]; a2=B[2]; a3=B[3];
!               A[0]=a0; A[1]=a1; A[2]=a2; A[3]=a3;
!               }
!       switch (b->top&3)
!               {
!               case 3: A[2]=B[2];
!               case 2: A[1]=B[1];
!               case 1: A[0]=B[0];
!               case 0: ; /* ultrix cc workaround, see comments in bn_expand2 */
                }
  #else
        memcpy(a->d,b->d,sizeof(b->d[0])*b->top);
***************
*** 539,544 ****
--- 556,563 ----
  #ifndef SIXTY_FOUR_BIT /* the data item > unsigned long */
                ret<<=BN_BITS4; /* stops the compiler complaining */
                ret<<=BN_BITS4;
+ #else
+               ret=0;
  #endif
                ret|=a->d[i];
                }
***************
*** 563,568 ****
--- 582,589 ----
  #ifndef SIXTY_FOUR_BIT /* the data item > unsigned long */
                w>>=BN_BITS4;
                w>>=BN_BITS4;
+ #else
+               w=0;
  #endif
                a->d[i]=(BN_ULONG)w&BN_MASK2;
                if (a->d[i] != 0) a->top=i+1;
***************
*** 699,705 ****
                a->top=i+1;
                }
  
!       a->d[i]|=(1L<<j);
        return(1);
        }
  
--- 720,726 ----
                a->top=i+1;
                }
  
!       a->d[i]|=(((BN_ULONG)1)<<j);
        return(1);
        }
  
***************
*** 711,717 ****
        j=n%BN_BITS2;
        if (a->top <= i) return(0);
  
!       a->d[i]&=(~(1L<<j));
        bn_fix_top(a);
        return(1);
        }
--- 732,738 ----
        j=n%BN_BITS2;
        if (a->top <= i) return(0);
  
!       a->d[i]&=(~(((BN_ULONG)1)<<j));
        bn_fix_top(a);
        return(1);
        }
*** ./crypto/bn/bn_prime.c.orig Tue Apr 27 01:00:06 1999
--- ./crypto/bn/bn_prime.c      Wed May 19 23:38:41 1999
***************
*** 319,325 ****
        loop: for (i=1; i<NUMPRIMES; i++)
                {
                /* check that rnd is a prime */
!               if (BN_mod_word(rnd,(BN_LONG)primes[i]) <= 1)
                        {
                        if (!BN_add(rnd,rnd,add)) goto err;
                        goto loop;
--- 319,325 ----
        loop: for (i=1; i<NUMPRIMES; i++)
                {
                /* check that rnd is a prime */
!               if (BN_mod_word(rnd,(BN_ULONG)primes[i]) <= 1)
                        {
                        if (!BN_add(rnd,rnd,add)) goto err;
                        goto loop;
***************
*** 366,373 ****
                /* check that p and q are prime */
                /* check that for p and q
                 * gcd(p-1,primes) == 1 (except for 2) */
!               if (    (BN_mod_word(p,(BN_LONG)primes[i]) == 0) ||
!                       (BN_mod_word(q,(BN_LONG)primes[i]) == 0))
                        {
                        if (!BN_add(p,p,padd)) goto err;
                        if (!BN_add(q,q,qadd)) goto err;
--- 366,373 ----
                /* check that p and q are prime */
                /* check that for p and q
                 * gcd(p-1,primes) == 1 (except for 2) */
!               if (    (BN_mod_word(p,(BN_ULONG)primes[i]) == 0) ||
!                       (BN_mod_word(q,(BN_ULONG)primes[i]) == 0))
                        {
                        if (!BN_add(p,p,padd)) goto err;
                        if (!BN_add(q,q,qadd)) goto err;
*** ./crypto/rsa/rsa_oaep_test.c.orig   Mon May 10 11:00:20 1999
--- ./crypto/rsa/rsa_oaep_test.c        Thu May 20 00:38:25 1999
***************
*** 27,33 ****
  
  static int key1(RSA *key, unsigned char *c)
      {
!     unsigned char n[] =
  "\x00\xAA\x36\xAB\xCE\x88\xAC\xFD\xFF\x55\x52\x3C\x7F\xC4\x52\x3F"
  "\x90\xEF\xA0\x0D\xF3\x77\x4A\x25\x9F\x2E\x62\xB4\xC5\xD9\x9C\xB5"
  "\xAD\xB3\x00\xA0\x28\x5E\x53\x01\x93\x0E\x0C\x70\xFB\x68\x76\x93"
--- 27,33 ----
  
  static int key1(RSA *key, unsigned char *c)
      {
!     static unsigned char n[] =
  "\x00\xAA\x36\xAB\xCE\x88\xAC\xFD\xFF\x55\x52\x3C\x7F\xC4\x52\x3F"
  "\x90\xEF\xA0\x0D\xF3\x77\x4A\x25\x9F\x2E\x62\xB4\xC5\xD9\x9C\xB5"
  "\xAD\xB3\x00\xA0\x28\x5E\x53\x01\x93\x0E\x0C\x70\xFB\x68\x76\x93"
***************
*** 34,71 ****
  "\x9C\xE6\x16\xCE\x62\x4A\x11\xE0\x08\x6D\x34\x1E\xBC\xAC\xA0\xA1"
  "\xF5";
  
!     unsigned char e[] = "\x11";
  
!     unsigned char d[] =
  "\x0A\x03\x37\x48\x62\x64\x87\x69\x5F\x5F\x30\xBC\x38\xB9\x8B\x44"
  "\xC2\xCD\x2D\xFF\x43\x40\x98\xCD\x20\xD8\xA1\x38\xD0\x90\xBF\x64"
  "\x79\x7C\x3F\xA7\xA2\xCD\xCB\x3C\xD1\xE0\xBD\xBA\x26\x54\xB4\xF9"
  "\xDF\x8E\x8A\xE5\x9D\x73\x3D\x9F\x33\xB3\x01\x62\x4A\xFD\x1D\x51";
  
!     unsigned char p[] =
  "\x00\xD8\x40\xB4\x16\x66\xB4\x2E\x92\xEA\x0D\xA3\xB4\x32\x04\xB5"
  "\xCF\xCE\x33\x52\x52\x4D\x04\x16\xA5\xA4\x41\xE7\x00\xAF\x46\x12"
  "\x0D";
      
!     unsigned char q[] =
  "\x00\xC9\x7F\xB1\xF0\x27\xF4\x53\xF6\x34\x12\x33\xEA\xAA\xD1\xD9"
  "\x35\x3F\x6C\x42\xD0\x88\x66\xB1\xD0\x5A\x0F\x20\x35\x02\x8B\x9D"
  "\x89";
  
!     unsigned char dmp1[] =
  "\x59\x0B\x95\x72\xA2\xC2\xA9\xC4\x06\x05\x9D\xC2\xAB\x2F\x1D\xAF"
  "\xEB\x7E\x8B\x4F\x10\xA7\x54\x9E\x8E\xED\xF5\xB4\xFC\xE0\x9E\x05";
  
!     unsigned char dmq1[] =
  "\x00\x8E\x3C\x05\x21\xFE\x15\xE0\xEA\x06\xA3\x6F\xF0\xF1\x0C\x99"
  "\x52\xC3\x5B\x7A\x75\x14\xFD\x32\x38\xB8\x0A\xAD\x52\x98\x62\x8D"
  "\x51";
  
!     unsigned char iqmp[] =
  "\x36\x3F\xF7\x18\x9D\xA8\xE9\x0B\x1D\x34\x1F\x71\xD0\x9B\x76\xA8"
  "\xA9\x43\xE1\x1D\x10\xB2\x4D\x24\x9F\x2D\xEA\xFE\xF8\x0C\x18\x26";
  
!     unsigned char ctext_ex[] =
  "\x1b\x8f\x05\xf9\xca\x1a\x79\x52\x6e\x53\xf3\xcc\x51\x4f\xdb\x89"
  "\x2b\xfb\x91\x93\x23\x1e\x78\xb9\x92\xe6\x8d\x50\xa4\x80\xcb\x52"
  "\x33\x89\x5c\x74\x95\x8d\x5d\x02\xab\x8c\x0f\xd0\x40\xeb\x58\x44"
--- 34,71 ----
  "\x9C\xE6\x16\xCE\x62\x4A\x11\xE0\x08\x6D\x34\x1E\xBC\xAC\xA0\xA1"
  "\xF5";
  
!     static unsigned char e[] = "\x11";
  
!     static unsigned char d[] =
  "\x0A\x03\x37\x48\x62\x64\x87\x69\x5F\x5F\x30\xBC\x38\xB9\x8B\x44"
  "\xC2\xCD\x2D\xFF\x43\x40\x98\xCD\x20\xD8\xA1\x38\xD0\x90\xBF\x64"
  "\x79\x7C\x3F\xA7\xA2\xCD\xCB\x3C\xD1\xE0\xBD\xBA\x26\x54\xB4\xF9"
  "\xDF\x8E\x8A\xE5\x9D\x73\x3D\x9F\x33\xB3\x01\x62\x4A\xFD\x1D\x51";
  
!     static unsigned char p[] =
  "\x00\xD8\x40\xB4\x16\x66\xB4\x2E\x92\xEA\x0D\xA3\xB4\x32\x04\xB5"
  "\xCF\xCE\x33\x52\x52\x4D\x04\x16\xA5\xA4\x41\xE7\x00\xAF\x46\x12"
  "\x0D";
      
!     static unsigned char q[] =
  "\x00\xC9\x7F\xB1\xF0\x27\xF4\x53\xF6\x34\x12\x33\xEA\xAA\xD1\xD9"
  "\x35\x3F\x6C\x42\xD0\x88\x66\xB1\xD0\x5A\x0F\x20\x35\x02\x8B\x9D"
  "\x89";
  
!     static unsigned char dmp1[] =
  "\x59\x0B\x95\x72\xA2\xC2\xA9\xC4\x06\x05\x9D\xC2\xAB\x2F\x1D\xAF"
  "\xEB\x7E\x8B\x4F\x10\xA7\x54\x9E\x8E\xED\xF5\xB4\xFC\xE0\x9E\x05";
  
!     static unsigned char dmq1[] =
  "\x00\x8E\x3C\x05\x21\xFE\x15\xE0\xEA\x06\xA3\x6F\xF0\xF1\x0C\x99"
  "\x52\xC3\x5B\x7A\x75\x14\xFD\x32\x38\xB8\x0A\xAD\x52\x98\x62\x8D"
  "\x51";
  
!     static unsigned char iqmp[] =
  "\x36\x3F\xF7\x18\x9D\xA8\xE9\x0B\x1D\x34\x1F\x71\xD0\x9B\x76\xA8"
  "\xA9\x43\xE1\x1D\x10\xB2\x4D\x24\x9F\x2D\xEA\xFE\xF8\x0C\x18\x26";
  
!     static unsigned char ctext_ex[] =
  "\x1b\x8f\x05\xf9\xca\x1a\x79\x52\x6e\x53\xf3\xcc\x51\x4f\xdb\x89"
  "\x2b\xfb\x91\x93\x23\x1e\x78\xb9\x92\xe6\x8d\x50\xa4\x80\xcb\x52"
  "\x33\x89\x5c\x74\x95\x8d\x5d\x02\xab\x8c\x0f\xd0\x40\xeb\x58\x44"
***************
*** 76,116 ****
  
  static int key2(RSA *key, unsigned char *c)
      {
!     unsigned char n[] =
  "\x00\xA3\x07\x9A\x90\xDF\x0D\xFD\x72\xAC\x09\x0C\xCC\x2A\x78\xB8"
  "\x74\x13\x13\x3E\x40\x75\x9C\x98\xFA\xF8\x20\x4F\x35\x8A\x0B\x26"
  "\x3C\x67\x70\xE7\x83\xA9\x3B\x69\x71\xB7\x37\x79\xD2\x71\x7B\xE8"
  "\x34\x77\xCF";
  
!     unsigned char e[] = "\x3";
  
!     unsigned char d[] =
  "\x6C\xAF\xBC\x60\x94\xB3\xFE\x4C\x72\xB0\xB3\x32\xC6\xFB\x25\xA2"
  "\xB7\x62\x29\x80\x4E\x68\x65\xFC\xA4\x5A\x74\xDF\x0F\x8F\xB8\x41"
  "\x3B\x52\xC0\xD0\xE5\x3D\x9B\x59\x0F\xF1\x9B\xE7\x9F\x49\xDD\x21"
  "\xE5\xEB";
  
!     unsigned char p[] =
  "\x00\xCF\x20\x35\x02\x8B\x9D\x86\x98\x40\xB4\x16\x66\xB4\x2E\x92"
  "\xEA\x0D\xA3\xB4\x32\x04\xB5\xCF\xCE\x91";
  
!     unsigned char q[] =
  "\x00\xC9\x7F\xB1\xF0\x27\xF4\x53\xF6\x34\x12\x33\xEA\xAA\xD1\xD9"
  "\x35\x3F\x6C\x42\xD0\x88\x66\xB1\xD0\x5F";
      
!     unsigned char dmp1[] =
  "\x00\x8A\x15\x78\xAC\x5D\x13\xAF\x10\x2B\x22\xB9\x99\xCD\x74\x61"
  "\xF1\x5E\x6D\x22\xCC\x03\x23\xDF\xDF\x0B";
  
!     unsigned char dmq1[] =
  "\x00\x86\x55\x21\x4A\xC5\x4D\x8D\x4E\xCD\x61\x77\xF1\xC7\x36\x90"
  "\xCE\x2A\x48\x2C\x8B\x05\x99\xCB\xE0\x3F";
  
!     unsigned char iqmp[] =
  "\x00\x83\xEF\xEF\xB8\xA9\xA4\x0D\x1D\xB6\xED\x98\xAD\x84\xED\x13"
  "\x35\xDC\xC1\x08\xF3\x22\xD0\x57\xCF\x8D";
  
!     unsigned char ctext_ex[] =
  "\x14\xbd\xdd\x28\xc9\x83\x35\x19\x23\x80\xe8\xe5\x49\xb1\x58\x2a"
  "\x8b\x40\xb4\x48\x6d\x03\xa6\xa5\x31\x1f\x1f\xd5\xf0\xa1\x80\xe4"
  "\x17\x53\x03\x29\xa9\x34\x90\x74\xb1\x52\x13\x54\x29\x08\x24\x52"
--- 76,116 ----
  
  static int key2(RSA *key, unsigned char *c)
      {
!     static unsigned char n[] =
  "\x00\xA3\x07\x9A\x90\xDF\x0D\xFD\x72\xAC\x09\x0C\xCC\x2A\x78\xB8"
  "\x74\x13\x13\x3E\x40\x75\x9C\x98\xFA\xF8\x20\x4F\x35\x8A\x0B\x26"
  "\x3C\x67\x70\xE7\x83\xA9\x3B\x69\x71\xB7\x37\x79\xD2\x71\x7B\xE8"
  "\x34\x77\xCF";
  
!     static unsigned char e[] = "\x3";
  
!     static unsigned char d[] =
  "\x6C\xAF\xBC\x60\x94\xB3\xFE\x4C\x72\xB0\xB3\x32\xC6\xFB\x25\xA2"
  "\xB7\x62\x29\x80\x4E\x68\x65\xFC\xA4\x5A\x74\xDF\x0F\x8F\xB8\x41"
  "\x3B\x52\xC0\xD0\xE5\x3D\x9B\x59\x0F\xF1\x9B\xE7\x9F\x49\xDD\x21"
  "\xE5\xEB";
  
!     static unsigned char p[] =
  "\x00\xCF\x20\x35\x02\x8B\x9D\x86\x98\x40\xB4\x16\x66\xB4\x2E\x92"
  "\xEA\x0D\xA3\xB4\x32\x04\xB5\xCF\xCE\x91";
  
!     static unsigned char q[] =
  "\x00\xC9\x7F\xB1\xF0\x27\xF4\x53\xF6\x34\x12\x33\xEA\xAA\xD1\xD9"
  "\x35\x3F\x6C\x42\xD0\x88\x66\xB1\xD0\x5F";
      
!     static unsigned char dmp1[] =
  "\x00\x8A\x15\x78\xAC\x5D\x13\xAF\x10\x2B\x22\xB9\x99\xCD\x74\x61"
  "\xF1\x5E\x6D\x22\xCC\x03\x23\xDF\xDF\x0B";
  
!     static unsigned char dmq1[] =
  "\x00\x86\x55\x21\x4A\xC5\x4D\x8D\x4E\xCD\x61\x77\xF1\xC7\x36\x90"
  "\xCE\x2A\x48\x2C\x8B\x05\x99\xCB\xE0\x3F";
  
!     static unsigned char iqmp[] =
  "\x00\x83\xEF\xEF\xB8\xA9\xA4\x0D\x1D\xB6\xED\x98\xAD\x84\xED\x13"
  "\x35\xDC\xC1\x08\xF3\x22\xD0\x57\xCF\x8D";
  
!     static unsigned char ctext_ex[] =
  "\x14\xbd\xdd\x28\xc9\x83\x35\x19\x23\x80\xe8\xe5\x49\xb1\x58\x2a"
  "\x8b\x40\xb4\x48\x6d\x03\xa6\xa5\x31\x1f\x1f\xd5\xf0\xa1\x80\xe4"
  "\x17\x53\x03\x29\xa9\x34\x90\x74\xb1\x52\x13\x54\x29\x08\x24\x52"
***************
*** 121,127 ****
  
  static int key3(RSA *key, unsigned char *c)
      {
!     unsigned char n[] =
  "\x00\xBB\xF8\x2F\x09\x06\x82\xCE\x9C\x23\x38\xAC\x2B\x9D\xA8\x71"
  "\xF7\x36\x8D\x07\xEE\xD4\x10\x43\xA4\x40\xD6\xB6\xF0\x74\x54\xF5"
  "\x1F\xB8\xDF\xBA\xAF\x03\x5C\x02\xAB\x61\xEA\x48\xCE\xEB\x6F\xCD"
--- 121,127 ----
  
  static int key3(RSA *key, unsigned char *c)
      {
!     static unsigned char n[] =
  "\x00\xBB\xF8\x2F\x09\x06\x82\xCE\x9C\x23\x38\xAC\x2B\x9D\xA8\x71"
  "\xF7\x36\x8D\x07\xEE\xD4\x10\x43\xA4\x40\xD6\xB6\xF0\x74\x54\xF5"
  "\x1F\xB8\xDF\xBA\xAF\x03\x5C\x02\xAB\x61\xEA\x48\xCE\xEB\x6F\xCD"
***************
*** 132,140 ****
  "\x7F\xE2\x53\x72\x98\xCA\x2A\x8F\x59\x46\xF8\xE5\xFD\x09\x1D\xBD"
  "\xCB";
  
!     unsigned char e[] = "\x11";
  
!     unsigned char d[] =
  "\x00\xA5\xDA\xFC\x53\x41\xFA\xF2\x89\xC4\xB9\x88\xDB\x30\xC1\xCD"
  "\xF8\x3F\x31\x25\x1E\x06\x68\xB4\x27\x84\x81\x38\x01\x57\x96\x41"
  "\xB2\x94\x10\xB3\xC7\x99\x8D\x6B\xC4\x65\x74\x5E\x5C\x39\x26\x69"
--- 132,140 ----
  "\x7F\xE2\x53\x72\x98\xCA\x2A\x8F\x59\x46\xF8\xE5\xFD\x09\x1D\xBD"
  "\xCB";
  
!     static unsigned char e[] = "\x11";
  
!     static unsigned char d[] =
  "\x00\xA5\xDA\xFC\x53\x41\xFA\xF2\x89\xC4\xB9\x88\xDB\x30\xC1\xCD"
  "\xF8\x3F\x31\x25\x1E\x06\x68\xB4\x27\x84\x81\x38\x01\x57\x96\x41"
  "\xB2\x94\x10\xB3\xC7\x99\x8D\x6B\xC4\x65\x74\x5E\x5C\x39\x26\x69"
***************
*** 145,151 ****
  "\xAF\x94\x28\xC2\xB7\xB8\x88\x3F\xE4\x46\x3A\x4B\xC8\x5B\x1C\xB3"
  "\xC1";
  
!     unsigned char p[] =
  "\x00\xEE\xCF\xAE\x81\xB1\xB9\xB3\xC9\x08\x81\x0B\x10\xA1\xB5\x60"
  "\x01\x99\xEB\x9F\x44\xAE\xF4\xFD\xA4\x93\xB8\x1A\x9E\x3D\x84\xF6"
  "\x32\x12\x4E\xF0\x23\x6E\x5D\x1E\x3B\x7E\x28\xFA\xE7\xAA\x04\x0A"
--- 145,151 ----
  "\xAF\x94\x28\xC2\xB7\xB8\x88\x3F\xE4\x46\x3A\x4B\xC8\x5B\x1C\xB3"
  "\xC1";
  
!     static unsigned char p[] =
  "\x00\xEE\xCF\xAE\x81\xB1\xB9\xB3\xC9\x08\x81\x0B\x10\xA1\xB5\x60"
  "\x01\x99\xEB\x9F\x44\xAE\xF4\xFD\xA4\x93\xB8\x1A\x9E\x3D\x84\xF6"
  "\x32\x12\x4E\xF0\x23\x6E\x5D\x1E\x3B\x7E\x28\xFA\xE7\xAA\x04\x0A"
***************
*** 152,158 ****
  "\x2D\x5B\x25\x21\x76\x45\x9D\x1F\x39\x75\x41\xBA\x2A\x58\xFB\x65"
  "\x99";
  
!     unsigned char q[] =
  "\x00\xC9\x7F\xB1\xF0\x27\xF4\x53\xF6\x34\x12\x33\xEA\xAA\xD1\xD9"
  "\x35\x3F\x6C\x42\xD0\x88\x66\xB1\xD0\x5A\x0F\x20\x35\x02\x8B\x9D"
  "\x86\x98\x40\xB4\x16\x66\xB4\x2E\x92\xEA\x0D\xA3\xB4\x32\x04\xB5"
--- 152,158 ----
  "\x2D\x5B\x25\x21\x76\x45\x9D\x1F\x39\x75\x41\xBA\x2A\x58\xFB\x65"
  "\x99";
  
!     static unsigned char q[] =
  "\x00\xC9\x7F\xB1\xF0\x27\xF4\x53\xF6\x34\x12\x33\xEA\xAA\xD1\xD9"
  "\x35\x3F\x6C\x42\xD0\x88\x66\xB1\xD0\x5A\x0F\x20\x35\x02\x8B\x9D"
  "\x86\x98\x40\xB4\x16\x66\xB4\x2E\x92\xEA\x0D\xA3\xB4\x32\x04\xB5"
***************
*** 159,177 ****
  "\xCF\xCE\x33\x52\x52\x4D\x04\x16\xA5\xA4\x41\xE7\x00\xAF\x46\x15"
  "\x03";
  
!     unsigned char dmp1[] =
  "\x54\x49\x4C\xA6\x3E\xBA\x03\x37\xE4\xE2\x40\x23\xFC\xD6\x9A\x5A"
  "\xEB\x07\xDD\xDC\x01\x83\xA4\xD0\xAC\x9B\x54\xB0\x51\xF2\xB1\x3E"
  "\xD9\x49\x09\x75\xEA\xB7\x74\x14\xFF\x59\xC1\xF7\x69\x2E\x9A\x2E"
  "\x20\x2B\x38\xFC\x91\x0A\x47\x41\x74\xAD\xC9\x3C\x1F\x67\xC9\x81";
  
!     unsigned char dmq1[] =
  "\x47\x1E\x02\x90\xFF\x0A\xF0\x75\x03\x51\xB7\xF8\x78\x86\x4C\xA9"
  "\x61\xAD\xBD\x3A\x8A\x7E\x99\x1C\x5C\x05\x56\xA9\x4C\x31\x46\xA7"
  "\xF9\x80\x3F\x8F\x6F\x8A\xE3\x42\xE9\x31\xFD\x8A\xE4\x7A\x22\x0D"
  "\x1B\x99\xA4\x95\x84\x98\x07\xFE\x39\xF9\x24\x5A\x98\x36\xDA\x3D";
      
!     unsigned char iqmp[] =
  "\x00\xB0\x6C\x4F\xDA\xBB\x63\x01\x19\x8D\x26\x5B\xDB\xAE\x94\x23"
  "\xB3\x80\xF2\x71\xF7\x34\x53\x88\x50\x93\x07\x7F\xCD\x39\xE2\x11"
  "\x9F\xC9\x86\x32\x15\x4F\x58\x83\xB1\x67\xA9\x67\xBF\x40\x2B\x4E"
--- 159,177 ----
  "\xCF\xCE\x33\x52\x52\x4D\x04\x16\xA5\xA4\x41\xE7\x00\xAF\x46\x15"
  "\x03";
  
!     static unsigned char dmp1[] =
  "\x54\x49\x4C\xA6\x3E\xBA\x03\x37\xE4\xE2\x40\x23\xFC\xD6\x9A\x5A"
  "\xEB\x07\xDD\xDC\x01\x83\xA4\xD0\xAC\x9B\x54\xB0\x51\xF2\xB1\x3E"
  "\xD9\x49\x09\x75\xEA\xB7\x74\x14\xFF\x59\xC1\xF7\x69\x2E\x9A\x2E"
  "\x20\x2B\x38\xFC\x91\x0A\x47\x41\x74\xAD\xC9\x3C\x1F\x67\xC9\x81";
  
!     static unsigned char dmq1[] =
  "\x47\x1E\x02\x90\xFF\x0A\xF0\x75\x03\x51\xB7\xF8\x78\x86\x4C\xA9"
  "\x61\xAD\xBD\x3A\x8A\x7E\x99\x1C\x5C\x05\x56\xA9\x4C\x31\x46\xA7"
  "\xF9\x80\x3F\x8F\x6F\x8A\xE3\x42\xE9\x31\xFD\x8A\xE4\x7A\x22\x0D"
  "\x1B\x99\xA4\x95\x84\x98\x07\xFE\x39\xF9\x24\x5A\x98\x36\xDA\x3D";
      
!     static unsigned char iqmp[] =
  "\x00\xB0\x6C\x4F\xDA\xBB\x63\x01\x19\x8D\x26\x5B\xDB\xAE\x94\x23"
  "\xB3\x80\xF2\x71\xF7\x34\x53\x88\x50\x93\x07\x7F\xCD\x39\xE2\x11"
  "\x9F\xC9\x86\x32\x15\x4F\x58\x83\xB1\x67\xA9\x67\xBF\x40\x2B\x4E"
***************
*** 178,184 ****
  "\x9E\x2E\x0F\x96\x56\xE6\x98\xEA\x36\x66\xED\xFB\x25\x79\x80\x39"
  "\xF7";
  
!     unsigned char ctext_ex[] =
  "\xb8\x24\x6b\x56\xa6\xed\x58\x81\xae\xb5\x85\xd9\xa2\x5b\x2a\xd7"
  "\x90\xc4\x17\xe0\x80\x68\x1b\xf1\xac\x2b\xc3\xde\xb6\x9d\x8b\xce"
  "\xf0\xc4\x36\x6f\xec\x40\x0a\xf0\x52\xa7\x2e\x9b\x0e\xff\xb5\xb3"
--- 178,184 ----
  "\x9E\x2E\x0F\x96\x56\xE6\x98\xEA\x36\x66\xED\xFB\x25\x79\x80\x39"
  "\xF7";
  
!     static unsigned char ctext_ex[] =
  "\xb8\x24\x6b\x56\xa6\xed\x58\x81\xae\xb5\x85\xd9\xa2\x5b\x2a\xd7"
  "\x90\xc4\x17\xe0\x80\x68\x1b\xf1\xac\x2b\xc3\xde\xb6\x9d\x8b\xce"
  "\xf0\xc4\x36\x6f\xec\x40\x0a\xf0\x52\xa7\x2e\x9b\x0e\xff\xb5\xb3"
***************
*** 207,213 ****
      RSA *key;
      unsigned char ptext[256];
      unsigned char ctext[256];
!     unsigned char ptext_ex[] = "\x54\x85\x9b\x34\x2c\x49\xea\x2a";
      unsigned char ctext_ex[256];
      int plen;
      int clen = 0;
--- 207,213 ----
      RSA *key;
      unsigned char ptext[256];
      unsigned char ctext[256];
!     static unsigned char ptext_ex[] = "\x54\x85\x9b\x34\x2c\x49\xea\x2a";
      unsigned char ctext_ex[256];
      int plen;
      int clen = 0;
*** ./Configure.orig    Wed May 19 15:00:05 1999
--- ./Configure Thu May 20 01:28:57 1999
***************
*** 112,126 ****
  "debug-solaris-usparc-gcc","gcc:-O3 -g -mcpu=ultrasparc -Wall 
-DB_ENDIAN:-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_UNROLL 
BF_PTR:asm/sparcv8plus-gcc.o::",
  
  # DO NOT use /xO[34] on sparc with SC3.0.  It is broken, and will not pass the tests
! "solaris-sparc-cc","cc:-fast -O -Xa -DB_ENDIAN:-D_REENTRANT:-lsocket -lnsl:BN_LLONG 
RC4_CHAR DES_PTR DES_UNROLL BF_PTR:::",
  # SC4 is ok, better than gcc even on bn as long as you tell it -xarch=v8
  # -fast slows things like DES down quite a lot
! # Don't use -xtarget=ultra with SC4.2. It is broken, and will break exptest.
! "solaris-sparc-sc4","cc:-xarch=v8 -xstrconst -xO5 -xdepend -Xa -DB_ENDIAN 
-DBN_DIV2W:-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_PTR DES_RISC1 DES_UNROLL 
BF_PTR:asm/sparcv8.o::",
! "solaris-usparc-sc4","cc:-xarch=v8plus -xstrconst -xO5 -xdepend -Xa -DB_ENDIAN 
-DBN_DIV2W:-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_PTR DES_RISC1 DES_UNROLL 
BF_PTR:asm/sparcv8plus.o::",
! # SC5.0 note: Compiler common patch 107357-01 or later is required!
! "solaris-usparc-sc5","cc:-xtarget=ultra -xarch=v8plus -xstrconst -xO5 -xdepend -Xa 
-DB_ENDIAN -DULTRASPARC -DBN_DIV2W:-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR 
DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o:",
! "solaris64-usparc-sc5","cc:-xtarget=ultra -xarch=v9 -xstrconst -xO5 -xdepend -Xa 
-DB_ENDIAN -DULTRASPARC:-D_REENTRANT:-lsocket -lnsl:SIXTY_FOUR_BIT_LONG RC4_CHAR 
DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o:",
  
  # Sunos configs, assuming sparc for the gcc one.
  ##"sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST:(unknown)::DES_UNROLL:::",
--- 112,123 ----
  "debug-solaris-usparc-gcc","gcc:-O3 -g -mcpu=ultrasparc -Wall 
-DB_ENDIAN:-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_UNROLL 
BF_PTR:asm/sparcv8plus-gcc.o::",
  
  # DO NOT use /xO[34] on sparc with SC3.0.  It is broken, and will not pass the tests
! "solaris-sparc-sc3","cc:-fast -O -Xa -DB_ENDIAN:-D_REENTRANT:-lsocket -lnsl:BN_LLONG 
RC4_CHAR DES_PTR DES_UNROLL BF_PTR:::",
  # SC4 is ok, better than gcc even on bn as long as you tell it -xarch=v8
  # -fast slows things like DES down quite a lot
! "solaris-sparc-cc","cc:-xarch=v8 -xstrconst -xO5 -xdepend -Xa -DB_ENDIAN 
-DBN_DIV2W:-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR DES_PTR DES_RISC1 DES_UNROLL 
BF_PTR:asm/sparcv8.o::",
! "solaris-usparc-cc","cc:-xtarget=ultra -xarch=v8plus -xstrconst -xO5 -xdepend -Xa 
-DB_ENDIAN -DULTRASPARC -DBN_DIV2W:-D_REENTRANT:-lsocket -lnsl:BN_LLONG RC4_CHAR 
DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o:",
! "solaris64-usparc-cc","cc:-xtarget=ultra -xarch=v9 -xstrconst -xO5 -xdepend -Xa 
-DB_ENDIAN -DULTRASPARC:-D_REENTRANT:-lsocket -lnsl:SIXTY_FOUR_BIT_LONG RC4_CHAR 
DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o:",
  
  # Sunos configs, assuming sparc for the gcc one.
  ##"sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST:(unknown)::DES_UNROLL:::",
***************
*** 133,144 ****
  # 3 times faster, use if at all possible.
  #"irix-gcc","gcc:-O2 -mips2::SIXTY_FOUR_BIT BN_LLONG RC4_INDEX RC4_CHAR:::",
  "irix-gcc","gcc:-O2 -DTERMIOS -DB_ENDIAN:(unknown)::BN_LLONG MD2_CHAR RC4_INDEX 
RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR:::",
- "irix64-gcc","gcc:-mips3 -O2 -DTERMIOS -DB_ENDIAN:(unknown)::MD2_CHAR RC4_INDEX 
RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:::",
  "irix-cc", "cc:-O2 -use_readonly_const -DTERMIOS -DB_ENDIAN:(unknown)::BN_LLONG 
DES_PTR DES_RISC2 DES_UNROLL BF_PTR:::",
! "irix64-cc", "cc:-O2 -use_readonly_const -DTERMIOS -DB_ENDIAN:(unknown)::DES_PTR 
DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:::",
  "debug-irix-cc", "cc:-w2 -g -DCRYPTO_MDEBUG -DTERMIOS -DB_ENDIAN:(unknown):::::",
  # This is the n64 mode build.
! "irix-n64-cc", "cc:-64 -O2 -use_readonly_const -DTERMIOS:(unknown)::DES_RISC2 
DES_UNROLL SIXTY_FOUR_BIT:::",
  
  # HPUX 9.X config.
  # Don't use the bundled cc.  It is broken.  Use HP ANSI C if possible, or gcc.
--- 130,141 ----
  # 3 times faster, use if at all possible.
  #"irix-gcc","gcc:-O2 -mips2::SIXTY_FOUR_BIT BN_LLONG RC4_INDEX RC4_CHAR:::",
  "irix-gcc","gcc:-O2 -DTERMIOS -DB_ENDIAN:(unknown)::BN_LLONG MD2_CHAR RC4_INDEX 
RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR:::",
  "irix-cc", "cc:-O2 -use_readonly_const -DTERMIOS -DB_ENDIAN:(unknown)::BN_LLONG 
DES_PTR DES_RISC2 DES_UNROLL BF_PTR:::",
! "irix-mips3-gcc","gcc:-mips3 -O2 -DTERMIOS -DB_ENDIAN:(unknown)::MD2_CHAR RC4_INDEX 
RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:::",
! "irix-mips3-cc", "cc:-n32 -mips3 -O2 -use_readonly_const -DTERMIOS 
-DB_ENDIAN:(unknown)::DES_PTR DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:::",
  "debug-irix-cc", "cc:-w2 -g -DCRYPTO_MDEBUG -DTERMIOS -DB_ENDIAN:(unknown):::::",
  # This is the n64 mode build.
! "irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const 
-DTERMIOS:(unknown)::DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT:::",
  
  # HPUX 9.X config.
  # Don't use the bundled cc.  It is broken.  Use HP ANSI C if possible, or gcc.
*** ./config.orig       Wed May 19 19:00:20 1999
--- ./config    Wed May 19 23:25:04 1999
***************
*** 286,294 ****
    if [ "$SYSTEM" = "SunOS" ]
    then
     case `cc -V 2>&1` in
!     *4*) CC=sc4;;
!     *5*) CC=sc5;;
!     *) CC=cc;;
     esac
    fi
  fi
--- 286,294 ----
    if [ "$SYSTEM" = "SunOS" ]
    then
     case `cc -V 2>&1` in
!     *4*) CC=cc;;
!     *5*) CC=cc;;
!     *) CC=sc3;;
     esac
    fi
  fi

Reply via email to