Re: adding a new custom ciphersuite to NSS (to be used by Thunderbird for TLS establishment)
f masood via dev-security <[email protected]> Tue, 28 Nov 2017 10:43:06 -0800 (PST)
| Newsgroups | gmane.comp.mozilla.security |
|---|---|
| Message-ID | <[email protected]> |
*** Update # 4***
1. So, I am kind of successful.
2. What I did was looked at the PATCH (ChaCha20+Poly1305) shared with me by Mr. Franziskus Kiefer (very kind of him) and started doing the changes. I made a "ecdhe_ecdsa_myseed_cbc_sha" ciphersuite, which is basically SEED cipher but did all the changes in all the required *.C, *.H and other files.
3. There were few times when I got the error that compilation failed because something was defined / declared. Again looked at the files where SEED was declared and used similar convention for declaring MYSEED ...
4. Eventually, all the errors were gone and Thunderbird got compiled and a binary(.exe) was generated.
5. Now, I have opened the "CONFIG EDITOR" of thunderbird and when I search for ssl, all the TLS ciphers like aes_128_gcm, aes_256_gcm, chacha20 etc. show up but my "ecdhe_ecdsa_myseed_cbc_sha" does not shows up. If I manually edit and add the "pref("security.ssl3.ecdhe_ecdsa_myseed_cbc_sha", true);" in "grepprefs.js" it shows up. I think I should add it to /netwerk/base/grepprefs.js file.
6. But my question is that my "TLS_ECDHE_ECDSA_WITH_MYSEED_CBC_SHA" doesnt shows up in wireshark when CLIENT HELLO is send, I know that for successful communication my server also needs to have this cipher but why is Thunderbird Client not sending the cipher in CLIENT HELLO PACKET. 15 ciphers are sent to servers and they are those aes 128, aes 256, chacha etc. ciphers but mycipher myseed is not present. Can anyone help / guide me ?
ps: i'll be creating and sharing a patch which will help this open community :)
On Wednesday, November 22, 2017 at 11:53:49 PM UTC+5, f masood wrote:
> Hi
>
> Hope everyone doing great.
>
> I have a small research oriented project in which I have to add a custom similar to AES like cipher to the NSS which will later be used by the Thunderbird for TLS establishment.
>
> Currently, I have added/defined my ciphers in the following files by doing my own limited research:
>
> i. sslproto.h
> ii. sslenum.c
> iii. ssl3con.c
> iv. ssl3ecc.c
>
> the ciphersuite name is === TLS_ECDHE_ECDSA_WITH_MYAES_128_GCM_SHA256, HEX number given to it === OXC02A
>
>
> however when I compile the following error comes in:
> ssl3con.c(184): error C2078 too many initalizers
> ssl3con.c(293): error C2065 cipher myaes_128_gcm : undeclared identifier
>
> and alot more errors ...
>
> What should be the best approach or steps to successfully integrate a custom CIPHERSUITE, should I look at the "
> Support for Camellia Cipher Suites to TLS RFC4132: Attachment #245822: patch for NSS trunk" and "SEED cipher" patches ?
>
> I will be contributing to this open source society by providing a documentation/patch/video of what I have done which will benefit others.
>
> Regards.