web site with many openssl examples

2011-06-30 Thread derleader mail
Hi, I'm looking for complete examples of implementing OpenSSL code - server and client. Can you give a link? Best wishes Peter

Re: Re: Using OpenSSL with non-blocking I/O

2011-05-06 Thread derleader mail
>> Hi, >> >> >> >> I am developing and application using OpenSSL. I have a proprietary system >> to handle connection/read data from sockets. All I need to do is to pass >> callback functions to the system to >> >> 1. Handle new connection >> >> 2. Read

Re: Multiple connection from 1 client

2011-05-06 Thread derleader mail
Hi, I have a server application, which accepts normal sockets and ssl socket connections. I am trying to make 3 connections to server from 1 client machine, on same server port. When i connect on normal sockets then it works with any number of connections. When i tried to connect

Re: Problem with HMAC_Init_ex

2011-05-04 Thread derleader mail
Hi all, I am finding a strange problem with HMAC_Init_ex. After the call to this function the stack is getting corrupted. The sequence of functions used are- HMAC_CTX ctx ;HMAC_CTX_init(&ctx); HMAC_Init_ex(&ctx, hash_key->v, hash_key->l, EVP_sha1(), NULL); Key->v points t

Re: RSA_private_decrypt across processes

2011-05-04 Thread derleader mail
I generate an RSA key using RSA_generate_key in one process. I then take the RSA structure that is generated and serialize it and send it to another process via an RPC mechanism. In the other process I then de-serialize the RSA data and use that as input to an RSA_private_decrypt function to de

How to create threaded pool with OpenSSL

2011-05-03 Thread derleader mail
Hi, I found OpenSSL server code which uses threds in order to process clients. Is it possible to create connection pool with OpenSSL. There is no information about this on openssl.org How I can add threaded pool to this code? http://pastebin.com/pkDB7fHm Regards

Re: SSL_shutdown & closesocket

2011-05-03 Thread derleader mail
Hi, I am using Blocking sockets for my applicaiton. The server i have accept SSL and non SSL connections, from the client side when i connect with SSL then on closesocket i dont get a notification of client closed, while for non SSL i get notification. Is this some desired behavior or i am

Re: Restricting ciphers list to RSA only in Client Hello

2011-05-03 Thread derleader mail
Hi All, I have built an SIP test application using openssl. I am trying to restrict the ciphers sent by this application in Client Hello to those with only RSA key exchange. Is there a way to configure it in OpenSSL? I tried to compile the source code with SSL_DEFAULT_CIPHER_LIST set

Re: RE: RE: Cannot encrypt text - need help

2011-05-02 Thread derleader mail
>> If I decide to go with openssl and blowfish what are the >> potential threats? > >Yes, heaps of. >You might consider asking more detailed. > >> Is there another security mechanism that I can use with blowfish? > >Of course... >But what exactly do you want to know? If you can use SSL

Re: RE: Cannot encrypt text - need help

2011-05-02 Thread derleader mail
>> > I'm going to use stream protocol - TCP/IP. Here is the >> template source >> > code of the server without the encryption part >> >> We mean application protocol. >> >> > while (1) { >> > sock = accept(listensock, NULL, NULL); >> > printf("client connected to child thread %i with

Re: Re: Re: Help me fix this code

2011-05-02 Thread derleader mail
tlen, enc_outbuf, encoutlen))) -Shafeek It works vey good! Thank you! Peter On Mon, May 2, 2011 at 3:09 PM, derleader mail derlea...@abv.bg > wrote: Hi Peter, Add padding for CBC mode encryption. Or u can use CFB mode. EVB_bf_cfb() -Shafeek Hi, Thank you for the reply. I have edi

Re: RE: Cannot encrypt text - need help

2011-05-02 Thread derleader mail
> >> On 5/1/2011 1:34 AM, derleader mail wrote: >> >> > I'm going to use stream protocol - TCP/IP. Here is the >> template source >> > code of the server without the encryption part >> >> We mean application protocol. >>

Re: Re: Cannot encrypt text - need help

2011-05-02 Thread derleader mail
>> So I need a high performance solution that can handle many connections >> with little server load. >> >> 1. SSL is a good solution but is not high performance - it's more >> suitable for encryption of a web page. When establishing connection more >> that 100 connections are used to perf

Re: Re: Help me fix this code

2011-05-02 Thread derleader mail
Hi Peter, Add padding for CBC mode encryption. Or u can use CFB mode. EVB_bf_cfb() -Shafeek Hi, Thank you for the reply. I have edit the code. Source Code: //gcc blowfish2.c -L/usr/local/ssl/lib/ -lssl -lcrypto -Wall #include #include #include #include #include #define input_

Help me fix this code

2011-05-02 Thread derleader mail
Hi, I have a problem with the code below. There is a bug that I can't find and fix. This is the output when I try to run it: [root@localhost test]# ./a.out sdcsdsdcd Entering Encryption Stage: String to encrypt: sdcsdsdcd Encryption Successful Entering Decryption Stage Error Whilst Decr

Re: Re: Cannot encrypt text - need help

2011-05-01 Thread derleader mail
>Don't you know how much data you've read that you're about to decrypt? > >in your code template, you showed the sendign routine doing... > > nread = recv(sock, buffer, 25, 0); > >isn't the recieving routine doing somethign similar? well, nread would >be the length you need, no? Y

Re: Re: Cannot encrypt text - need help

2011-05-01 Thread derleader mail
>> I'm going to use stream protocol - TCP/IP. Here is the template source >> code of the server without the encryption part > >We mean application protocol. > >> while (1) { >> sock = accept(listensock, NULL, NULL); >> printf("client connected to child thread %i with pid %i.\n", >> pthrea

Re: Re: Re: Re: Cannot encrypt text - need help

2011-05-01 Thread derleader mail
recv(sock, encrypted_string_length, 25, 0); On Sun, May 1, 2011 at 4:34 PM, derleader mail derlea...@abv.bg > wrote: The encrypted output is not a NULL terminated string so strlen will not work. >> EVP_DecryptUpdate(&ctx, (unsigned

Re: Re: Re: Cannot encrypt text - need help

2011-05-01 Thread derleader mail
The encrypted output is not a NULL terminated string so strlen will not work. >> EVP_DecryptUpdate(&ctx, (unsigned char *)plaintextz, &out_len, (unsigned char *)ciphertext, strlen(ciphertext)); Use the length output from the encryption part. Thank you very much for

Re: Re: Cannot encrypt text - need help

2011-04-30 Thread derleader mail
very much for the reply. The problem is that the encryption and decryption must be on separate machines. I need a way to take the size of the encrypted message using language function like strlen (). Is there other solution? Regards - re On Sun, May 1, 2011 at 12:27 AM,

Cannot encrypt text - need help

2011-04-30 Thread derleader mail
Hi, I'm trying to code a C program that can convert very big number of characters. The problem is that there is an error in decryption. This is the code: //gcc test_Blowfish.c -L/usr/local/ssl/lib/ -lssl -lcrypto -Wall #include #include #include #include #include int m

Blowfish implementation with OpenSSL

2011-04-29 Thread derleader mail
Hi, I'm working on implementation of OpenSSL and Blowfish. Can you help me to improve the code, Is there a problem in the code? C code: //cl test_AES.c /IC:\openssl\include /linkC:\openssl\lib\libeay32.lib //gcc test_AES.c -L/usr/local/ssl/lib/ -lssl -lcrypto -Wall #include #includ

Re: Re: Best book with examples for OpenSSL

2011-04-28 Thread derleader mail
>Hi. > >I'm in the process of learning the API myself. I had concerns about the >book "Network Programming with OpenSSL". >Having consulted someone with experience in this matter it appears that >the API itself has changed very little and the >book is still relevant. The cryptographic f

Best book with examples for OpenSSL

2011-04-28 Thread derleader mail
Hi, I found several books about OpenSSL. This book seems the best one http://oreilly.com/catalog/9780596003944 There is another book for http://www.opensslbook.com/ but it seems very outdated. Is there other books or tutorials with ready made examples? Regards Peter

Re: Re: Compile OpenSSL with minimum modules

2011-04-27 Thread derleader mail
>> Hi, >>I need to compile OpenSSL only with support for Symmetric >> encryption - only 3DES support. How I can remove all unneeded stuff? >> Can you give an advice what to remove and how to remove it? > > >I suppose one approach would be to run a test suite that does just what >yo

Compile OpenSSL with minimum modules

2011-04-27 Thread derleader mail
Hi, I need to compile OpenSSL only with support for Symmetric encryption - only 3DES support. How I can remove all unneeded stuff? Can you give an advice what to remove and how to remove it? Regards Peter

Multithreaded server example of OpenSSL

2011-04-26 Thread derleader mail
Hi, I need a multithreaded OpenSSL server which can handle multiple clients. Is there full example of such a server? Regards Peter