------=_Part_25284_9745662.1181143541071
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi Gerrit ,

Thanks for ur reply.

I'm little bit confused, my final target is to saparate all the digest
algorithms idependently OR ( Only digest algorithms as single module).
Ssleay document explain to use sequence like (init,update,final). I would
like to wrap all these functions in saparate wrapper layer.

If I call MD5_Update / Final / SHA_Update/ final ... all these functions
are replaced by macros or ... ?

As you said

"
When you look for SHA1_Update you'll find that crypto/sha will apply the
same mechanism:

#define HASH_UPDATE SHA1_Update "

HASH_UPDATE will be replaced by the SHA1_Update .. is it so ?

if some thing like that where can find definition for SHA1_Update

I would appreciate if you could help me understand this . This is very much
required for my work.

Thanks & Regards,
konark
www.secure-mobile.net

On 6/6/07, Gerrit E.G. Hobbelt wrote:
>
> Most of these can be found in the corresponding crypto\ subdirectories,
> e.g. crypto\md5 and crypto\sha, in the source dump (I assume you mean
> the source code archives available at openssl.org; if not, what are you
> looking at?).
>
> Looking for functions is simple once you take into account that some of
> them are specified through the use of macros to aid in code reuse
> (Forget about that assembly stuff Richard mentioned for now; it's not
> mandatory to have a fully functional SSL library, but only helps to
> provide additional speed improvements for selected platforms, where
> available):
>
> grepping for MD5_Update for instance (a.k.a.: 'find in files' in your
> editor of choice, e.g. UltraEdit32) will turn up the line
>
> #define HASH_UPDATE MD5_Update
>
> used in crypto\md5\ code to instantiate the MD5 implementation of a
> common hash routine, which, can be found as the generic
> HASH_UPDATE(...) routine written in md32_common.h
>
> When you look for SHA1_Update you'll find that crypto/sha will apply the
> same mechanism:
>
> #define HASH_UPDATE SHA1_Update
>
> and one more #include of md32_common.h, thus actually reusing the code
> in md32_common.h . You will find these practices throughout OpenSSL to
> help in preventing a particularly nasty type of copy&paste software bugs.
>
> HTH
>
> Regards,
>
> Ger
>
>
> I've ported SSL to embedded environments before; it's rather easy unless
> you target systems with a very limited (or non-existent) C standard
> run-time library (i.e. when they lack things like printf() et al) or -
> of course - when special conditions apply.
>
>
>
>
>
> Konark ch wrote:
> > Thanks for the quick response , but i'm on windows environment.
> >
> > Basically i want to port Openssl to mobile platforms
> >
> > Please help me .
> >
> > Thanks in advance .
> >
> > \\konark
> >
> > On 6/5/07, *Richard Salz* >
> > wrote:
> >
> > > I'm not able to find code for some of the digest functions like
> > > MD5_Update() ,SHA1_Update().
> > > in the latest source dump.

> >
> > Many OpenSSL functions are implemented in non-traditional manners,
> > such as
> > via macro's, assembly language, etc.
> >
> > If you are on a Unix/Linux platform, using something like "nm -o
> > libcrypto.a | grep SHA1_Update" will get you started. In this case,
> > sha1dgst.c.
> >
> > Good luck figuring it out.
> >
> > /r$
> >
> > --
> > STSM, Senior Security Architect
> > DataPower SOA Appliances
> > http://www.ibm.com/software/integration/datapower/
> >
> >
> >

> __________________________________________________ ____________________
> > OpenSSL Project

> http://www.openssl.org
> > Development Mailing List
> > openssl-dev@openssl.org penssl-dev@openssl.org>
> > Automated List Manager
> > majordomo@openssl.org
> >
> >

> __________________________________________________ ____________________
> OpenSSL Project http://www.openssl.org
> Development Mailing List openssl-dev@openssl.org
> Automated List Manager majordomo@openssl.org
>


------=_Part_25284_9745662.1181143541071
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi Gerrit ,

  Thanks for ur reply.
 
  I'm little bit confused, my final target is to saparate all the digest algorithms idependently OR ( Only digest algorithms as single module). Ssleay document explain to use sequence like (init,update,final). I would like to wrap all these functions in saparate wrapper layer.


  If I call MD5_Update / Final / SHA_Update/ final ... all these functions are replaced by macros or ... ?

As you said

"
  
When you look for SHA1_Update you'll find that crypto/sha will apply the

same mechanism:

#define HASH_UPDATE      SHA1_Update
  "

HASH_UPDATE will be replaced by the SHA1_Update .. is it so ?


if some thing like that where can find definition for SHA1_Update

I would appreciate if you could help me understand this . This is very much required for my work.


Thanks & Regards,
konark

www.secure-mobile.net


On 6/6/07, Gerrit E.G. Hobbelt <
Ger.Hobbelt@bermuda-holding.com> wrote:
Most of these can be found in the corresponding crypto\ subdirectories,

e.g. crypto\md5 and crypto\sha,  in the source dump (I assume you mean
the source code archives available at openssl.org; if not, what are you
looking at?).

Looking for functions is simple once you take into account that some of

them are specified through the use of macros to aid in code reuse
(Forget about that assembly stuff Richard mentioned for now; it's not
mandatory to have a fully functional SSL library, but only helps to

provide additional speed improvements for selected platforms, where
available):

grepping for MD5_Update for instance (a.k.a.: 'find in files' in your
editor of choice, e.g. UltraEdit32) will turn up the line


#define HASH_UPDATE      MD5_Update

used in crypto\md5\ code to instantiate the MD5 implementation of a
common hash routine, which, can be found as the generic
HASH_UPDATE(...) routine written in md32_common.h


When you look for SHA1_Update you'll find that crypto/sha will apply the
same mechanism:

#define HASH_UPDATE      SHA1_Update

and one more #include of md32_common.h, thus actually reusing the code

in md32_common.h . You will find these practices throughout OpenSSL to
help in preventing a particularly nasty type of copy&paste software bugs.

HTH

Regards,

Ger


I've ported SSL to embedded environments before; it's rather easy unless

you target systems with a very limited (or non-existent) C standard
run-time library (i.e. when they lack things like printf() et al) or -
of course - when special conditions apply.





Konark ch wrote:

> Thanks for the quick response , but i'm on windows environment.
>
> Basically i want to port Openssl to mobile platforms
>
> Please help me .
>
> Thanks in advance .
>

> \\konark
>
> On 6/5/07, *Richard Salz* <rsalz@us.ibm.com <mailto:rsalz@us.ibm.com>>
> wrote:
>
>     >   I'm not able to find code for some of the digest functions like

>     > MD5_Update() ,SHA1_Update().
>     > in the latest source dump.
>
>     Many OpenSSL functions are implemented in non-traditional manners,
>     such as
>     via macro's, assembly language, etc.

>
>     If you are on a Unix/Linux platform, using something like "nm -o
>     libcrypto.a | grep SHA1_Update" will get you started.  In this case,
>     sha1dgst.c.
>
>     Good luck figuring it out.

>
>             /r$
>
>     --
>     STSM, Senior Security Architect
>     DataPower SOA Appliances
>     http://www.ibm.com/software/integration/datapower/

>     <http://www.ibm.com/software/integration/datapower/>
>
>     __________________________________________________ ____________________

>     OpenSSL Project                                 http://www.openssl.org
>     Development Mailing List
>     penssl-dev@openssl.org">openssl-dev@openssl.org
<mailto:penssl-dev@openssl.org">openssl-dev@openssl.org>
>     Automated List Manager
>     majordomo@openssl.org <mailto:
majordomo@openssl.org>
>
>
__________________________________________________ ____________________
OpenSSL Project                                 http://www.openssl.org

Development Mailing List                       penssl-dev@openssl.org">openssl-dev@openssl.org
Automated List Manager                           majordomo@openssl.org




------=_Part_25284_9745662.1181143541071--
__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-dev@openssl.org
Automated List Manager majordomo@openssl.org