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

2011-05-03 Thread Steffen DETTMER
* derleader mail on Monday, May 02, 2011 8:14 PM But what exactly do you want to know? If you can use SSL and Blowfish? It does not appear in http://www.openssl.org/docs/apps/ciphers.html. Yes the web site and the book about the OpenSSL is outdated. Does TLS spec nowadays defines a

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 perform the SSL

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. while (1) { sock = accept(listensock, NULL, NULL); printf(client

RE: Re: Cannot encrypt text - need help

2011-05-02 Thread Steffen DETTMER
* owner-openssl-us...@openssl.org What is the purpose of the project? This is a open source project - I need a way to monitor a huge number of servers - monitor CPU load, RAM load, HDD load, installed packets and etc. Why not using http://www.nagios.org/? The data which will gathered

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 pid %i.\n,

Re: Cannot encrypt text - need help

2011-05-02 Thread Michael S. Zick
On Mon May 2 2011, 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. while (1) { sock = accept(listensock, NULL, NULL); printf(client

RE: RE: Cannot encrypt text - need help

2011-05-02 Thread Steffen DETTMER
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 and Blowfish? It does

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 and

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(amp;ctx, (unsigned char *)plaintextz, amp;out_len, (unsigned char *)ciphertext, strlen(ciphertext)); Use the length output from the encryption part. Thank you very much

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

2011-05-01 Thread re est
Hi, What protocol are you using? What I mean is application layer protocol. But since in your example, you're using your own protocol, why not send both length and data. Example. 4 byte len field0..2^32-1 data field Then in you receiving end, do recv 4 bytes, get length, and recv until received

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

2011-05-01 Thread derleader mail
What protocol are you using? What I mean is application layer protocol. But since in your example, you're using your own protocol, why not send both length and data. Example. Then in you receiving end, do recv 4 bytes, get length, and recv until received data equals to length.

Re: Cannot encrypt text - need help

2011-05-01 Thread David Schwartz
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. while (1) { sock = accept(listensock, NULL, NULL); printf(client connected to child thread %i with

Re: Cannot encrypt text - need help

2011-05-01 Thread John R Pierce
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?

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

2011-05-01 Thread re est
On Sun, May 1, 2011 at 5:28 PM, derleader mail derlea...@abv.bg wrote: What protocol are you using? What I mean is application layer protocol. But since in your example, you're using your own protocol, why not send both length and data. Example. 4 byte len field0..2^32-1 data field Then

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, pthread_self(),

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? Yes it's

Re: Cannot encrypt text - need help

2011-05-01 Thread David Schwartz
On 5/1/2011 3:31 AM, derleader mail wrote: 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

RE: Cannot encrypt text - need help

2011-05-01 Thread Dave Thompson
From: owner-openssl-us...@openssl.org On Behalf Of David Schwartz Sent: Sunday, 01 May, 2011 06:03 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

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

Re: Cannot encrypt text - need help

2011-04-30 Thread re est
Hi, 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. - re On Sun, May 1, 2011 at 12:27 AM, derleader

Re: Re: Cannot encrypt text - need help

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

Re: Cannot encrypt text - need help

2011-04-30 Thread Michael S. Zick
On Sat April 30 2011, derleader mail wrote: Hi, The encrypted output is not a NULL terminated string so strlen will not work. EVP_DecryptUpdate(amp;ctx, (unsigned char *)plaintextz, amp;out_len, (unsigned char *)ciphertext, strlen(ciphertext)); Use the length output

Re: Re: Cannot encrypt text - need help

2011-04-30 Thread re est
On Sun, May 1, 2011 at 1:48 AM, derleader mail derlea...@abv.bg wrote: Hi, 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

Re: Cannot encrypt text - need help

2011-04-30 Thread David Schwartz
On 4/30/2011 10:48 AM, derleader mail wrote: Thank you 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? Are you