Re: MAC Calculation help needed

2007-12-18 Thread Marek Marcola
On Tue, 2007-12-18 at 07:38 -0800, Suchindra Chandrahas wrote: > Hi Merek, > In the following function, > md_update(&md, pad_2, 40); > Is pad_2 and pad_1 (before), of size 40 bytes. I > think i am a wrong somewhere, cos i put them as 48 bytes for md5 and >

Re: MAC Calculation help needed

2007-12-18 Thread Suchindra Chandrahas
Hi Merek, In the following function, md_update(&md, pad_2, 40); Is pad_2 and pad_1 (before), of size 40 bytes. I think i am a wrong somewhere, cos i put them as 48 bytes for md5 and 40 bytes for sha Please let me know if i am wrong Thanks and Regards,

Re: MAC Calculation help needed

2007-12-18 Thread Suchindra Chandrahas
Hi Merek, Thanks a lot for replying! I changed a lot of code and downloaded wireshark source and made debug messages larger in number. I finally debugged step by step and kept on rectifying the code. Now the MAC is fine!!! Wireshark Debug Messages Say So! I am getting the er

Re: MAC Calculation help needed

2007-12-18 Thread Marek Marcola
On Mon, 2007-12-17 at 19:39 -0800, Suchindra Chandrahas wrote: > Hi All, > I am doing the following to calculate MAC > as per SSL v3 handshake: > > printf("\nRESULT: Plain Record encryption:\n"); > for ( i = 0; i < rec_len; i ++) > printf("%x

MAC Calculation help needed

2007-12-17 Thread Suchindra Chandrahas
Hi All, I am doing the following to calculate MAC as per SSL v3 handshake: printf("\nRESULT: Plain Record encryption:\n"); for ( i = 0; i < rec_len; i ++) printf("%x ", rec[i]); total_length = rec_len + 16