On Wed, 31 Mar 1999, Niels Poppe wrote:

> (sorry.. forgot to finish & send this message off.. there you go)

[chop]
 
> There has been some discussion on bn_div_words around in openssl-dev:
> 
> > From: Ben Laurie <[EMAIL PROTECTED]>
> > Organization: A.L. Group plc
> > To: [EMAIL PROTECTED]
> > Subject: Re: Patch: BN_div_words in asm/alpha.s
> > 
> > Hannes Reinecke wrote:
> > > 
> > > Hi all,
> > > 
> > > here is a patch for adding bn_div_words to asm/alpha.s. It got lost
> > > somehow, but without the assembler version won't compile.
> > > 
> > > I'm not entirely familiar with the internal working of openssl, but to
> > > my untrained eye bn_asm.c:bn_div_words and bn_mulw.c:bn_div64 are
> > > looking suspiciously similar. Is there a special reason for it or can we
> > > just scrap one version ?
> > > (I suspect that's also why bn_div_words does not appear in asm/alpha.s;
> > > it just got renamed to bn_div64 hoping that all functions would call
> > > this and not bn_div_words. Evolutionary programming :-).
> > 
> > Looks to me like the whole of bn_mulw.c is redundant. bn_div_words and
> > bn_div64 are indeed identical, and bn_div64 is not actually used
> > anywhere, AFAICS.
> > 
> > So, I'm going to blow away bn_mulw.c, and rename bn_div64 to
> > bn_div_words in alpha.s.
> > 
> > Cheers,
> > 
> > Ben.
> > 
> 
> Looking at crypto/bn/asm/{mips1,mips3,r3000}.s I see bn_div64 is
> implemented in all of those.
> 
> Try & see whether
> - ./Configure irix64-cc no-asm
> - ./Configure irix-n64-cc no-asm
> work, build, and pass make test

No go on this one.  I built with "irix64-gcc no-asm", and it fails the
exptest as follows (yipes):

mont and recp results differ
a (455) = 
5F3155A6B3B4E28410F42E9B8DBAD719A4A52DD5EEA30E6276D77BD15743232869DDAE5D70683F508A8EFF4FCB3777B6EC8FE91A47A97E0049
b (493) = 
1E115BCCCAE984E5994833DA4C30D418DF649EB2AE283BF850A7804711B89D3D970F7764AA8D939D700FB433CFF9C72E5F25D4728D5A831584E9FA77A8A0
m (496) = 
92853BD41425AE78793934E7FCD45909D25452DAEA74855216FA3FABBBBDE8674C60ED0D11929E69003D13D759237AE9AC7168C9C1ABAB14A07348E8F597
recp     
=6D448EB3266A1FAA0A80E38BD7B71EC899AEDAF289FB06BAB3137D328D599C15B1CA75093AF0B82590914636AF06FF92DC1D9A503D38AA52435B9ABDAEC74C84BBA4CFB2E8153282203FEA9DE1218B38D277E17D7C1F240E049C324154E381C2FCA328C85C7938D60000831E3CBDA7AA71B518620E0D3109FC546749F68CDFA1F1EF1D8879FF6292817CE5E708B596BF023AFD091F4169DD196AB3F5CA8DF2BEABBC00D1DCD6E2EF6909C2D898A41CAA437DF29BCF1CD4902519083B1AF36563AE9BC6B530B530C79CBD3EFF07976C286ACF6D3A200A336768C48D8ACC36BDE703DC580F1B171118DA5617DB2313D21ED90F1FB3A69C824CE9C9D74968F7D4F4579E17D5B51EF6FC085E9985F12A4C99DEE922571811DEF97DEDB5AFDF147F20E6E8E3C6E15E998C87FA680A3707FFE9FCA3D9098A2DF3EE5E3D7290FA22FFC775CCE86520DC43CA19882D4B71B61B67EF892399595AFA5CB6DFBDF1CFDA5A65DC62D52147BFF8297692C39A95C7CB40BB8CD0201315D845CDC658BDC42453CA66EA1956945979D6BEB2432F3D3515912C1636F7E86A694CF835726635670998AB71838C9BFF1F43740526BB7C070194ABB25088F19C9587488DF77B7F7AB9AE9AB63D23194BBFC77437943C566F6E25E13D1E64C34A7E157E21759E92637AA7988788C1838CF61253B!
 A7!
!
!
37C1E092696BFBD4AF940D78AEE7A474736F4C8E71E8CD69E0B586A663912498A420A90D53101209372C43B2F37ACEA14DC2586AA257BE1606954C89D1292825769944589078C5A5A3B0666524D94261BDD53C842B5DD5D30AC68D26A17F6635AB83EE4AA92390E9E2D4530C9BBE6D3F1E7846F6B74197BA5149B51C5ABC822C2181333E9A793336A3D1DF355DE6C13CAD6FE1E228ABA058640A2F39C9242712290172062F7371EC697CF49FCBD7B961BB24B03FAA7619D3BC26F389BFE3F7DA417AD2B5F82A335C927BD8094EEF5476E44D5DAF8A65D0B9BF1E676264C39E095C445F53966CA3DAD76D308B00A96F321C07EFD8E8A76460DA37636298F754A3E351204EBAA1960A91B873691AB5FCB4985845B53EB10D082C4C624D2DD47650FAD95542AC9D7DC96C62D2A7051B2F029C767A868CCB67C3A174099196E0887FE47CE994CD91E94CEDD948ED51C5E3F9466A5E4EB2D868C71E67D0109C04678A2268CA1BCF99EEC95E1CB3BF1FD94B047B6806FA5F81E00AE1D6C39F5A729A8DE5443AE7AC76DB53092403171B7E6D1C625229389E7A8C3DB041842A3E469FAD12962937E635A223E5C00B077786DCF2C7B143A25DA91D94630BD6ABE302A54B2FBE429519E8600C454CC8598F0FA87A883BB828A05E1AB0D25C7C0BA6EC7DE9FA1C6C9B06AA0AAA4CD9544E908AB!
 5B!
!
!
8E1DD89D
mont     
=3719792ED445DEC8CE0D9A0B2CC7DF4A84EEC02A991BE83A23E1AC797A1C71D9B3F31F3FE8B910190635CF6804DD5D0329CC35C1E47303B051A5F5865069

If I do it as "irix-gcc no-asm", it compiles, and the tests all pass (after
excluding the rsa_oaep_test).

> I think we can assume without no-asm they all fail, so
> change bn_div64 to bn_div_words in the 3 assembler files above,
> then try
> - ./Configure irix-cc
> - ./Configure irix64-cc
> - ./Configure irix-n64-cc
> 
> and report what symbols are missing then ...

I get lots conflicts with builtins and some undeclared macros:

[Configure irix-gcc (or irix64-gcc)]

pem.h:6: warning: `EVP_MAX_MD_SIZE' redefined
../../include/evp.h:108: warning: this is the location of the previous definition
In file included from ../cryptlib.h:63,
                 from pem_sign.c:60:
/usr/include/string.h:67: warning: conflicting types for built-in function `memcpy'
/usr/include/string.h:74: warning: conflicting types for built-in function `memcmp'
/usr/include/string.h:95: warning: conflicting types for built-in function `memset'
/usr/include/string.h:97: warning: conflicting types for built-in function `strlen'
pem_sign.c: In function `PEM_SignFinal':
pem_sign.c:95: `PEM_F_PEM_SIGNFINAL' undeclared (first use in this function)
pem_sign.c:95: (Each undeclared identifier is reported only once
pem_sign.c:95: for each function it appears in.)
make[2]: *** [pem_sign.o] Error 1
make[2]: Leaving directory `/noodle/build/openssl-0.9.2b/crypto/pem'

Don
-- 
Don Badrak <[EMAIL PROTECTED]>              301.457.8263 work
Telecommunications Office                    301.457.4438 fax
U.S. Bureau of the Census
Suitland MD, USA



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to