Re: Decrypting Fragmented packets

2008-06-26 Thread Marek . Marcola
Hello, [EMAIL PROTECTED] wrote on 06/26/2008 01:56:33 PM: > Well, I tried it like you guys said, but I keep getting an error from > EVP_DecryptFinal_ex() (returns 0) and the resulting decrypted packet that I got is not > right. However, doing it like I said previously, that is reassemblng the

RE: Decrypting Fragmented packets

2008-06-26 Thread David Schwartz
> If I send the message "Hello World" from my server to client > and I capture the aforementioned packet, lets say, I treat it > as two separate records and decrypt each record. I now have > two decrypted records. Should I merge these now? If that were > the case, are you implying that my inital m

Re: Decrypting Fragmented packets

2008-06-26 Thread Kyle Hamilton
The TLS layer can break the stream down to any unit that is convenient for it. It could break a "Hello World." string down to "H", "e", "l", "l", "o", " ", "W", "o", "r", "l", "d", "." and put each byte into a separate record. Most will use some multiple of the block size so that minimal padding

Re: Decrypting Fragmented packets

2008-06-26 Thread Vijay Kotari
Well, I tried it like you guys said, but I keep getting an error from EVP_DecryptFinal_ex() (returns 0) and the resulting decrypted packet that I got is not right. However, doing it like I said previously, that is reassemblng the packets and merging them into one and then passing it to the above me

Re: Decrypting Fragmented packets

2008-06-25 Thread Kyle Hamilton
The Nagle algorithm will attempt to coalesce multiple write() calls into a single TCP packet. Since TLS/SSL are a record format atop TCP, you need to handle the recordss as independent of each other -- i.e., you need to process the first TLS record, and then use the results of that processing to p

Re: Decrypting Fragmented packets

2008-06-25 Thread Marek . Marcola
Hello, [EMAIL PROTECTED] wrote on 06/25/2008 07:25:12 AM: > Hi, > I am using EVP_DecryptUpdate() and EVP_DecryptFinal_ex() to decrypt a > SSL packet that I have captured. The cipher that I am using AES256 and > I can read the application data in cleartext as a result. The problem > comes if t

Re: Decrypting Fragmented packets

2008-06-25 Thread Vijay Kotari
Hi, I resolved this issue although I am still a little confused about the error that I was getting previously. I am outlining the steps that I did before when I had the error and what I did to overcome it, so that some kind soul here can enlighten me as to why I got the error in the first place.

Re: Decrypting Fragmented packets

2008-06-24 Thread Vijay Kotari
I am using the traffic obtained from s_server and s_client sample programs and the keys that have been negotiated by both the programs to decrypt the encrypted traffic between the two. That would mean that I am using TCP. Also, I am running them under the CBC mode. Vijay K. On Wed, Jun 25, 2008 a

Re: Decrypting Fragmented packets

2008-06-24 Thread Julian
It's hard to approach this without knowing the mode of operation you are running CBC, OFB, CTR? Also are you using UDP with varying packet sizes? Julian On Jun 24, 2008, at 10:25 PM, Vijay Kotari wrote: Hi, I am using EVP_DecryptUpdate() and EVP_DecryptFinal_ex() to decrypt a SSL packet th

Decrypting Fragmented packets

2008-06-24 Thread Vijay Kotari
Hi, I am using EVP_DecryptUpdate() and EVP_DecryptFinal_ex() to decrypt a SSL packet that I have captured. The cipher that I am using AES256 and I can read the application data in cleartext as a result. The problem comes if the application data size > 8, which I think has something to do with me u