ENGINE and crypto function access

2004-11-23 Thread Peter
Hi,
   I tried searching through the archives of this mailing list, but the 
search function didn't work so pardon me if this has been asked many 
times before.

   I'm trying to do a bunch of stuff (encrypting with DES, RSA, getting 
random data) and I'd like it to be as painless as possible.  I assumed 
that this was what the ENGINE functions were for but the man pages and 
documentation for that are really lousy.  It seems like it was created 
solely for openssl and as an afterthought was made with the intention 
that someday it could be used by someone else.  I've tried looking 
through the openssl source to findout how to call these things, but its 
a maze of function pointers and I'm just getting really down and 
frustrated.

	So what's the easiest way to access basic cryptographic functions and 
PRNGs from a stand alone C program.  What headers should I include?  
What should I link against?  I'd like things like:

   encrypt(SOME_CIPHER_TYPE, char * data, int size_of_data)
and
get_random(char * output, int random_bytes)
 I don't particularly want to have to call tons of 
init_opaque_structure(&x) and the like just to get functions like the 
ones above, but I will if I have to.
  And are there any good HOW-TOs for this kind of stuff?

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


Re: ENGINE and crypto function access

2004-11-23 Thread Nils Larsch
Peter wrote:
...
   I'm trying to do a bunch of stuff (encrypting with DES, RSA, getting 
random data) and I'd like it to be as painless as possible.  I assumed 
that this was what the ENGINE functions were for but the man pages and 
documentation for that are really lousy. 
do want to use some hardware modul or an alternative software
implementation of existing algorithm or why do you want to use
the ENGINE ?
It seems like it was created 
solely for openssl and as an afterthought was made with the intention 
that someday it could be used by someone else.  I've tried looking 
through the openssl source to findout how to call these things, but its 
a maze of function pointers and I'm just getting really down and 
frustrated.

So what's the easiest way to access basic cryptographic functions 
and PRNGs from a stand alone C program.  What headers should I include?  
What should I link against?  I'd like things like:

   encrypt(SOME_CIPHER_TYPE, char * data, int size_of_data)
see `man EVP_EncryptInit` [1]
and
get_random(char * output, int random_bytes)
see `man RAND_bytes`
Cheers,
Nils
[1] in case you use a os without manpages, see:
http://www.openssl.org/docs/
__
OpenSSL Project http://www.openssl.org
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]