[Pharo-project] SSL/HTTPS - SecureSocketStream/SSLSession for Pharo/Squeak and other Smalltalk implementations
SSL/HTTPS - SecureSocketStream/SSLSession for Pharo/Squeak and other Smalltalk implementations HTTP client and server functionality has become an essential part of any Smalltalk implementation. There exist various open source solutions delivering this functionality. Users quickly find out that HTTPS is not as readily available as HTTP. Although a solution exists in the form of SqueakSSL, it is not easily portable to Pharo and certainly not to other Smalltalk implementations. Furthermore, SqueakSSL is incomplete and more a working proof of concept than a high quality, high performance, maintainable piece of code, partially because of its dependence on the internals of SocketStream. Hence, some people wanting HTTPS on Pharo as well as one organisation have come foreword with a bounty to force a solution. Here are the requirements, a plan of action and a number of steps to build such a solution. First of all, it would be stupid not to start from the work already done for SqueakSSL. Any new solution should start from the existing plugin, from the existing set of primitives and from the current implementation of these primitives for the Windows, Mac OS X and Linux platforms. The Smalltalk part of the solution should be as platform independent as possible. We therefor need a new, clean implementation of SocketStream, with proper internal buffering and optimised versions of the bulk input and output primitives. The code should be time and space efficient. At first, only binary I/O is needed. Encoding/decoding is best done by wrapping the stream. Maybe a bivalent stream could be an option. The current ASCII support in quite limited. Next a SecureSocketStream can be implemented using this clean base combined with the SSLSession primitives. Here too, time and space efficiency are important although SSL will by definition be less efficient. Eventually, HTTP frameworks can then use this SecureSocketStream to actually implement HTTPS. Although the primary requirement is client functionality, server functionality should be provided as well. Next the existing issues with certificates need to be resolved, on all 3 platforms. Finally, the C code of the plugin for each of the 3 platforms needs to be cleaned up and improved where necessary. This requires contributions from developers who know and understand a platform as well as how SSL is supposed to work. Furthermore they have to understand and be motivated to work on Smalltalk plugins. Up to 3 different developers might be needed. The current implementation on Mac OS X does not seem to (directly) use the standard OpenSSL library from Linux although this library exists on Mac OS X. This could be an opportunity to reduce the number of implementations of the plugin to 2 API's. Needless to say the whole implementation should be open source licensed (MIT), be documented and have a number of units tests to cover it's main functionality as well edge cases encountered in the field. Friendly cooperation with other open source projects in the Smalltalk world is a plus. This project should benefit the whole community. The bounty should be split in different parts. The first part is setting up the new project, delivering the new SocketStream, SSLSession and SecureSocketStream, including the HTTPS client proof of concept. Traction within the community has to be developed. Next the issues with the plugin have to be identified. Then the work on the plugin code for each platform has to be defined and 3 more bounties could be offered. The goal should be to include the plugin in VM's by default. With a proper solution to the plugin issues, SSL server functionality should be no problem. I offer to take on part one and help manage the coordination of this project. So is there anyone capable and willing to help out on the plugin on on one or more platforms for part of the bounty ? Are there others who wish to raise the bounty ? We will need a couple of good beta testers who understand this field as well. Sven
Try this, after loading the Crypto packages. I haven't tried it myself, yet, as I only got on this list and loaded Pharo a few days ago, but I will probably dig into it over the weekend. I did load Crypto, though. http://www.squeaksource.com/Cryptography/SSL-mtf.16.mcz Is there a Pharo repository I could drop ported code into? Regards, Rob -----Original Message----- From: Sven Van Caekenberghe Sent: Tuesday, May 10, 2011 1:42 PM To: Pharo Project Subject: [Pharo-project] SSL/HTTPS - SecureSocketStream/SSLSession forPharo/Squeak and other Smalltalk implementations SSL/HTTPS - SecureSocketStream/SSLSession for Pharo/Squeak and other Smalltalk implementations HTTP client and server functionality has become an essential part of any Smalltalk implementation. There exist various open source solutions delivering this functionality. Users quickly find out that HTTPS is not as readily available as HTTP. Although a solution exists in the form of SqueakSSL, it is not easily portable to Pharo and certainly not to other Smalltalk implementations. Furthermore, SqueakSSL is incomplete and more a working proof of concept than a high quality, high performance, maintainable piece of code, partially because of its dependence on the internals of SocketStream. Hence, some people wanting HTTPS on Pharo as well as one organisation have come foreword with a bounty to force a solution. Here are the requirements, a plan of action and a number of steps to build such a solution. First of all, it would be stupid not to start from the work already done for SqueakSSL. Any new solution should start from the existing plugin, from the existing set of primitives and from the current implementation of these primitives for the Windows, Mac OS X and Linux platforms. The Smalltalk part of the solution should be as platform independent as possible. We therefor need a new, clean implementation of SocketStream, with proper internal buffering and optimised versions of the bulk input and output primitives. The code should be time and space efficient. At first, only binary I/O is needed. Encoding/decoding is best done by wrapping the stream. Maybe a bivalent stream could be an option. The current ASCII support in quite limited. Next a SecureSocketStream can be implemented using this clean base combined with the SSLSession primitives. Here too, time and space efficiency are important although SSL will by definition be less efficient. Eventually, HTTP frameworks can then use this SecureSocketStream to actually implement HTTPS. Although the primary requirement is client functionality, server functionality should be provided as well. Next the existing issues with certificates need to be resolved, on all 3 platforms. Finally, the C code of the plugin for each of the 3 platforms needs to be cleaned up and improved where necessary. This requires contributions from developers who know and understand a platform as well as how SSL is supposed to work. Furthermore they have to understand and be motivated to work on Smalltalk plugins. Up to 3 different developers might be needed. The current implementation on Mac OS X does not seem to (directly) use the standard OpenSSL library from Linux although this library exists on Mac OS X. This could be an opportunity to reduce the number of implementations of the plugin to 2 API's. Needless to say the whole implementation should be open source licensed (MIT), be documented and have a number of units tests to cover it's main functionality as well edge cases encountered in the field. Friendly cooperation with other open source projects in the Smalltalk world is a plus. This project should benefit the whole community. The bounty should be split in different parts. The first part is setting up the new project, delivering the new SocketStream, SSLSession and SecureSocketStream, including the HTTPS client proof of concept. Traction within the community has to be developed. Next the issues with the plugin have to be identified. Then the work on the plugin code for each platform has to be defined and 3 more bounties could be offered. The goal should be to include the plugin in VM's by default. With a proper solution to the plugin issues, SSL server functionality should be no problem. I offer to take on part one and help manage the coordination of this project. So is there anyone capable and willing to help out on the plugin on on one or more platforms for part of the bounty ? Are there others who wish to raise the bounty ? We will need a couple of good beta testers who understand this field as well. Sven
you can in pharoTaskForces or you can create a PharoSSL Stef
Try this, after loading the Crypto packages. I haven't tried it myself, yet, as I only got on this list and loaded Pharo a few days ago, but I will probably dig into it over the weekend. I did load Crypto, though.
http://www.squeaksource.com/Cryptography/SSL-mtf.16.mcz
Is there a Pharo repository I could drop ported code into?
Regards, Rob
-----Original Message----- From: Sven Van Caekenberghe Sent: Tuesday, May 10, 2011 1:42 PM To: Pharo Project Subject: [Pharo-project] SSL/HTTPS - SecureSocketStream/SSLSession forPharo/Squeak and other Smalltalk implementations
SSL/HTTPS - SecureSocketStream/SSLSession for Pharo/Squeak and other Smalltalk implementations
HTTP client and server functionality has become an essential part of any Smalltalk implementation. There exist various open source solutions delivering this functionality.
Users quickly find out that HTTPS is not as readily available as HTTP. Although a solution exists in the form of SqueakSSL, it is not easily portable to Pharo and certainly not to other Smalltalk implementations. Furthermore, SqueakSSL is incomplete and more a working proof of concept than a high quality, high performance, maintainable piece of code, partially because of its dependence on the internals of SocketStream.
Hence, some people wanting HTTPS on Pharo as well as one organisation have come foreword with a bounty to force a solution. Here are the requirements, a plan of action and a number of steps to build such a solution.
First of all, it would be stupid not to start from the work already done for SqueakSSL. Any new solution should start from the existing plugin, from the existing set of primitives and from the current implementation of these primitives for the Windows, Mac OS X and Linux platforms.
The Smalltalk part of the solution should be as platform independent as possible. We therefor need a new, clean implementation of SocketStream, with proper internal buffering and optimised versions of the bulk input and output primitives. The code should be time and space efficient. At first, only binary I/O is needed. Encoding/decoding is best done by wrapping the stream. Maybe a bivalent stream could be an option. The current ASCII support in quite limited.
Next a SecureSocketStream can be implemented using this clean base combined with the SSLSession primitives. Here too, time and space efficiency are important although SSL will by definition be less efficient.
Eventually, HTTP frameworks can then use this SecureSocketStream to actually implement HTTPS. Although the primary requirement is client functionality, server functionality should be provided as well.
Next the existing issues with certificates need to be resolved, on all 3 platforms.
Finally, the C code of the plugin for each of the 3 platforms needs to be cleaned up and improved where necessary. This requires contributions from developers who know and understand a platform as well as how SSL is supposed to work. Furthermore they have to understand and be motivated to work on Smalltalk plugins. Up to 3 different developers might be needed.
The current implementation on Mac OS X does not seem to (directly) use the standard OpenSSL library from Linux although this library exists on Mac OS X. This could be an opportunity to reduce the number of implementations of the plugin to 2 API's.
Needless to say the whole implementation should be open source licensed (MIT), be documented and have a number of units tests to cover it's main functionality as well edge cases encountered in the field.
Friendly cooperation with other open source projects in the Smalltalk world is a plus. This project should benefit the whole community.
The bounty should be split in different parts.
The first part is setting up the new project, delivering the new SocketStream, SSLSession and SecureSocketStream, including the HTTPS client proof of concept. Traction within the community has to be developed.
Next the issues with the plugin have to be identified. Then the work on the plugin code for each platform has to be defined and 3 more bounties could be offered.
The goal should be to include the plugin in VM's by default.
With a proper solution to the plugin issues, SSL server functionality should be no problem.
I offer to take on part one and help manage the coordination of this project.
So is there anyone capable and willing to help out on the plugin on on one or more platforms for part of the bounty ?
Are there others who wish to raise the bounty ?
We will need a couple of good beta testers who understand this field as well.
Sven
Or you keep Cryptology and publish a pharo tag. Stef On May 12, 2011, at 3:52 PM, Rob Withers wrote:
Try this, after loading the Crypto packages. I haven't tried it myself, yet, as I only got on this list and loaded Pharo a few days ago, but I will probably dig into it over the weekend. I did load Crypto, though.
http://www.squeaksource.com/Cryptography/SSL-mtf.16.mcz
Is there a Pharo repository I could drop ported code into?
Regards, Rob
-----Original Message----- From: Sven Van Caekenberghe Sent: Tuesday, May 10, 2011 1:42 PM To: Pharo Project Subject: [Pharo-project] SSL/HTTPS - SecureSocketStream/SSLSession forPharo/Squeak and other Smalltalk implementations
SSL/HTTPS - SecureSocketStream/SSLSession for Pharo/Squeak and other Smalltalk implementations
HTTP client and server functionality has become an essential part of any Smalltalk implementation. There exist various open source solutions delivering this functionality.
Users quickly find out that HTTPS is not as readily available as HTTP. Although a solution exists in the form of SqueakSSL, it is not easily portable to Pharo and certainly not to other Smalltalk implementations. Furthermore, SqueakSSL is incomplete and more a working proof of concept than a high quality, high performance, maintainable piece of code, partially because of its dependence on the internals of SocketStream.
Hence, some people wanting HTTPS on Pharo as well as one organisation have come foreword with a bounty to force a solution. Here are the requirements, a plan of action and a number of steps to build such a solution.
First of all, it would be stupid not to start from the work already done for SqueakSSL. Any new solution should start from the existing plugin, from the existing set of primitives and from the current implementation of these primitives for the Windows, Mac OS X and Linux platforms.
The Smalltalk part of the solution should be as platform independent as possible. We therefor need a new, clean implementation of SocketStream, with proper internal buffering and optimised versions of the bulk input and output primitives. The code should be time and space efficient. At first, only binary I/O is needed. Encoding/decoding is best done by wrapping the stream. Maybe a bivalent stream could be an option. The current ASCII support in quite limited.
Next a SecureSocketStream can be implemented using this clean base combined with the SSLSession primitives. Here too, time and space efficiency are important although SSL will by definition be less efficient.
Eventually, HTTP frameworks can then use this SecureSocketStream to actually implement HTTPS. Although the primary requirement is client functionality, server functionality should be provided as well.
Next the existing issues with certificates need to be resolved, on all 3 platforms.
Finally, the C code of the plugin for each of the 3 platforms needs to be cleaned up and improved where necessary. This requires contributions from developers who know and understand a platform as well as how SSL is supposed to work. Furthermore they have to understand and be motivated to work on Smalltalk plugins. Up to 3 different developers might be needed.
The current implementation on Mac OS X does not seem to (directly) use the standard OpenSSL library from Linux although this library exists on Mac OS X. This could be an opportunity to reduce the number of implementations of the plugin to 2 API's.
Needless to say the whole implementation should be open source licensed (MIT), be documented and have a number of units tests to cover it's main functionality as well edge cases encountered in the field.
Friendly cooperation with other open source projects in the Smalltalk world is a plus. This project should benefit the whole community.
The bounty should be split in different parts.
The first part is setting up the new project, delivering the new SocketStream, SSLSession and SecureSocketStream, including the HTTPS client proof of concept. Traction within the community has to be developed.
Next the issues with the plugin have to be identified. Then the work on the plugin code for each platform has to be defined and 3 more bounties could be offered.
The goal should be to include the plugin in VM's by default.
With a proper solution to the plugin issues, SSL server functionality should be no problem.
I offer to take on part one and help manage the coordination of this project.
So is there anyone capable and willing to help out on the plugin on on one or more platforms for part of the bounty ?
Are there others who wish to raise the bounty ?
We will need a couple of good beta testers who understand this field as well.
Sven
Stef, The Cryptography project, which has Cryptography, CryptographyPlugins, LayeredProtocol and SSL packages are all tagged with pharo. When I look at the pharo tag, none of these show up. Do they need to be releases? How can I use the pharo tag from inside of Pharo, with the Monticello Browser? Rob -----Original Message----- From: Stéphane Ducasse Sent: Thursday, May 12, 2011 10:10 AM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] SSL/HTTPS - SecureSocketStream/SSLSessionforPharo/Squeak and other Smalltalk implementations Or you keep Cryptology and publish a pharo tag. Stef On May 12, 2011, at 3:52 PM, Rob Withers wrote:
Try this, after loading the Crypto packages. I haven't tried it myself, yet, as I only got on this list and loaded Pharo a few days ago, but I will probably dig into it over the weekend. I did load Crypto, though.
http://www.squeaksource.com/Cryptography/SSL-mtf.16.mcz
Is there a Pharo repository I could drop ported code into?
Regards, Rob
-----Original Message----- From: Sven Van Caekenberghe Sent: Tuesday, May 10, 2011 1:42 PM To: Pharo Project Subject: [Pharo-project] SSL/HTTPS - SecureSocketStream/SSLSession forPharo/Squeak and other Smalltalk implementations
SSL/HTTPS - SecureSocketStream/SSLSession for Pharo/Squeak and other Smalltalk implementations
HTTP client and server functionality has become an essential part of any Smalltalk implementation. There exist various open source solutions delivering this functionality.
Users quickly find out that HTTPS is not as readily available as HTTP. Although a solution exists in the form of SqueakSSL, it is not easily portable to Pharo and certainly not to other Smalltalk implementations. Furthermore, SqueakSSL is incomplete and more a working proof of concept than a high quality, high performance, maintainable piece of code, partially because of its dependence on the internals of SocketStream.
Hence, some people wanting HTTPS on Pharo as well as one organisation have come foreword with a bounty to force a solution. Here are the requirements, a plan of action and a number of steps to build such a solution.
First of all, it would be stupid not to start from the work already done for SqueakSSL. Any new solution should start from the existing plugin, from the existing set of primitives and from the current implementation of these primitives for the Windows, Mac OS X and Linux platforms.
The Smalltalk part of the solution should be as platform independent as possible. We therefor need a new, clean implementation of SocketStream, with proper internal buffering and optimised versions of the bulk input and output primitives. The code should be time and space efficient. At first, only binary I/O is needed. Encoding/decoding is best done by wrapping the stream. Maybe a bivalent stream could be an option. The current ASCII support in quite limited.
Next a SecureSocketStream can be implemented using this clean base combined with the SSLSession primitives. Here too, time and space efficiency are important although SSL will by definition be less efficient.
Eventually, HTTP frameworks can then use this SecureSocketStream to actually implement HTTPS. Although the primary requirement is client functionality, server functionality should be provided as well.
Next the existing issues with certificates need to be resolved, on all 3 platforms.
Finally, the C code of the plugin for each of the 3 platforms needs to be cleaned up and improved where necessary. This requires contributions from developers who know and understand a platform as well as how SSL is supposed to work. Furthermore they have to understand and be motivated to work on Smalltalk plugins. Up to 3 different developers might be needed.
The current implementation on Mac OS X does not seem to (directly) use the standard OpenSSL library from Linux although this library exists on Mac OS X. This could be an opportunity to reduce the number of implementations of the plugin to 2 API's.
Needless to say the whole implementation should be open source licensed (MIT), be documented and have a number of units tests to cover it's main functionality as well edge cases encountered in the field.
Friendly cooperation with other open source projects in the Smalltalk world is a plus. This project should benefit the whole community.
The bounty should be split in different parts.
The first part is setting up the new project, delivering the new SocketStream, SSLSession and SecureSocketStream, including the HTTPS client proof of concept. Traction within the community has to be developed.
Next the issues with the plugin have to be identified. Then the work on the plugin code for each platform has to be defined and 3 more bounties could be offered.
The goal should be to include the plugin in VM's by default.
With a proper solution to the plugin issues, SSL server functionality should be no problem.
I offer to take on part one and help manage the coordination of this project.
So is there anyone capable and willing to help out on the plugin on on one or more platforms for part of the bounty ?
Are there others who wish to raise the bounty ?
We will need a couple of good beta testers who understand this field as well.
Sven
On May 12, 2011, at 4:31 PM, Rob Withers wrote:
Stef,
The Cryptography project, which has Cryptography, CryptographyPlugins, LayeredProtocol and SSL packages are all tagged with pharo. When I look at the pharo tag, none of these show up. Do they need to be releases?
By tag I do not know :)
How can I use the pharo tag from inside of Pharo, with the Monticello Browser?
Rob
-----Original Message----- From: Stéphane Ducasse Sent: Thursday, May 12, 2011 10:10 AM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] SSL/HTTPS - SecureSocketStream/SSLSessionforPharo/Squeak and other Smalltalk implementations
Or you keep Cryptology and publish a pharo tag.
Stef
On May 12, 2011, at 3:52 PM, Rob Withers wrote:
Try this, after loading the Crypto packages. I haven't tried it myself, yet, as I only got on this list and loaded Pharo a few days ago, but I will probably dig into it over the weekend. I did load Crypto, though.
http://www.squeaksource.com/Cryptography/SSL-mtf.16.mcz
Is there a Pharo repository I could drop ported code into?
Regards, Rob
-----Original Message----- From: Sven Van Caekenberghe Sent: Tuesday, May 10, 2011 1:42 PM To: Pharo Project Subject: [Pharo-project] SSL/HTTPS - SecureSocketStream/SSLSession forPharo/Squeak and other Smalltalk implementations
SSL/HTTPS - SecureSocketStream/SSLSession for Pharo/Squeak and other Smalltalk implementations
HTTP client and server functionality has become an essential part of any Smalltalk implementation. There exist various open source solutions delivering this functionality.
Users quickly find out that HTTPS is not as readily available as HTTP. Although a solution exists in the form of SqueakSSL, it is not easily portable to Pharo and certainly not to other Smalltalk implementations. Furthermore, SqueakSSL is incomplete and more a working proof of concept than a high quality, high performance, maintainable piece of code, partially because of its dependence on the internals of SocketStream.
Hence, some people wanting HTTPS on Pharo as well as one organisation have come foreword with a bounty to force a solution. Here are the requirements, a plan of action and a number of steps to build such a solution.
First of all, it would be stupid not to start from the work already done for SqueakSSL. Any new solution should start from the existing plugin, from the existing set of primitives and from the current implementation of these primitives for the Windows, Mac OS X and Linux platforms.
The Smalltalk part of the solution should be as platform independent as possible. We therefor need a new, clean implementation of SocketStream, with proper internal buffering and optimised versions of the bulk input and output primitives. The code should be time and space efficient. At first, only binary I/O is needed. Encoding/decoding is best done by wrapping the stream. Maybe a bivalent stream could be an option. The current ASCII support in quite limited.
Next a SecureSocketStream can be implemented using this clean base combined with the SSLSession primitives. Here too, time and space efficiency are important although SSL will by definition be less efficient.
Eventually, HTTP frameworks can then use this SecureSocketStream to actually implement HTTPS. Although the primary requirement is client functionality, server functionality should be provided as well.
Next the existing issues with certificates need to be resolved, on all 3 platforms.
Finally, the C code of the plugin for each of the 3 platforms needs to be cleaned up and improved where necessary. This requires contributions from developers who know and understand a platform as well as how SSL is supposed to work. Furthermore they have to understand and be motivated to work on Smalltalk plugins. Up to 3 different developers might be needed.
The current implementation on Mac OS X does not seem to (directly) use the standard OpenSSL library from Linux although this library exists on Mac OS X. This could be an opportunity to reduce the number of implementations of the plugin to 2 API's.
Needless to say the whole implementation should be open source licensed (MIT), be documented and have a number of units tests to cover it's main functionality as well edge cases encountered in the field.
Friendly cooperation with other open source projects in the Smalltalk world is a plus. This project should benefit the whole community.
The bounty should be split in different parts.
The first part is setting up the new project, delivering the new SocketStream, SSLSession and SecureSocketStream, including the HTTPS client proof of concept. Traction within the community has to be developed.
Next the issues with the plugin have to be identified. Then the work on the plugin code for each platform has to be defined and 3 more bounties could be offered.
The goal should be to include the plugin in VM's by default.
With a proper solution to the plugin issues, SSL server functionality should be no problem.
I offer to take on part one and help manage the coordination of this project.
So is there anyone capable and willing to help out on the plugin on on one or more platforms for part of the bounty ?
Are there others who wish to raise the bounty ?
We will need a couple of good beta testers who understand this field as well.
Sven
Hi Rob, On 12 May 2011, at 15:52, Rob Withers wrote:
Try this, after loading the Crypto packages. I haven't tried it myself, yet, as I only got on this list and loaded Pharo a few days ago, but I will probably dig into it over the weekend. I did load Crypto, though.
http://www.squeaksource.com/Cryptography/SSL-mtf.16.mcz
Is there a Pharo repository I could drop ported code into?
This looks like a quite impressive code base. I think I once heard about this, but never really looked at it. If I understand this correctly, browsing in SqueakSource, this is actually an SSL implementation, 100% done in Smalltalk ? Some questions then: - in what state is the code, does it work ? - how compatible is it wrt SSL standards ? - how fast is it, is it useable ? - why was it not used for SqueakSSL ? Sven
Hi Sven, It is a complete implementation with the bare minimum of supported algorithms, based on the spec. It is 100% in Smalltalk. It worked last time I tested in, several years ago. I will be able to tell you more this weekend. Others have been adding fixes/small features since, but not a lot - the base is pretty solid. I painstakingly followed the RFC for SSL - I think I read it over 20 times! The only issue would be algorithm support. I never benchmarked it, but seeing the difference in performance between Smlltalk crypto code like 3DES and plugin code, there is a SIGNIFICANT improvement (10x?). I do not know the state of Profiling under Pharo. If someone could help set me up, then I will profile it this weekend. I imagine both performance and certification were the reasons for SqueakSSL. There is also an SSH implementation I wrote that does dynamic window resizing on net latency. Rob -----Original Message----- From: Sven Van Caekenberghe Sent: Thursday, May 12, 2011 10:16 AM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] SSL/HTTPS - SecureSocketStream/SSLSessionforPharo/Squeak and other Smalltalk implementations Hi Rob, On 12 May 2011, at 15:52, Rob Withers wrote:
Try this, after loading the Crypto packages. I haven't tried it myself, yet, as I only got on this list and loaded Pharo a few days ago, but I will probably dig into it over the weekend. I did load Crypto, though.
http://www.squeaksource.com/Cryptography/SSL-mtf.16.mcz
Is there a Pharo repository I could drop ported code into?
This looks like a quite impressive code base. I think I once heard about this, but never really looked at it. If I understand this correctly, browsing in SqueakSource, this is actually an SSL implementation, 100% done in Smalltalk ? Some questions then: - in what state is the code, does it work ? - how compatible is it wrt SSL standards ? - how fast is it, is it useable ? - why was it not used for SqueakSSL ? Sven
Rob, On 12 May 2011, at 16:38, Rob Withers wrote:
It is a complete implementation with the bare minimum of supported algorithms, based on the spec. It is 100% in Smalltalk. It worked last time I tested in, several years ago. I will be able to tell you more this weekend. Others have been adding fixes/small features since, but not a lot - the base is pretty solid. I painstakingly followed the RFC for SSL - I think I read it over 20 times! The only issue would be algorithm support. I never benchmarked it, but seeing the difference in performance between Smlltalk crypto code like 3DES and plugin code, there is a SIGNIFICANT improvement (10x?). I do not know the state of Profiling under Pharo. If someone could help set me up, then I will profile it this weekend. I imagine both performance and certification were the reasons for SqueakSSL.
There is also an SSH implementation I wrote that does dynamic window resizing on net latency.
It would be *very cool* if that code base could be ported to Pharo. It is really quite impressive that you did all this from the spec. I think that it would be possible to adjust my plan a bit, so that eventually, my code would use either the native plugin or your Smalltalk implementation. Then, we can compare features, functionality, bugs, etc.. Does that sound like a good idea ? Sven
Sure. I cannot recall if I offered a stream interface or not. I could add one and we could treat this and the SqueakSSL stream as provider impl to a wrapper stream. I'll comment more as I dig into it. I think I will fork a PharoSSL project, since I know of at least one change in there. Rob -----Original Message----- From: Sven Van Caekenberghe Sent: Thursday, May 12, 2011 10:53 AM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] SSL/HTTPS -SecureSocketStream/SSLSessionforPharo/Squeak and otherSmalltalk implementations Rob, On 12 May 2011, at 16:38, Rob Withers wrote:
It is a complete implementation with the bare minimum of supported algorithms, based on the spec. It is 100% in Smalltalk. It worked last time I tested in, several years ago. I will be able to tell you more this weekend. Others have been adding fixes/small features since, but not a lot - the base is pretty solid. I painstakingly followed the RFC for SSL - I think I read it over 20 times! The only issue would be algorithm support. I never benchmarked it, but seeing the difference in performance between Smlltalk crypto code like 3DES and plugin code, there is a SIGNIFICANT improvement (10x?). I do not know the state of Profiling under Pharo. If someone could help set me up, then I will profile it this weekend. I imagine both performance and certification were the reasons for SqueakSSL.
There is also an SSH implementation I wrote that does dynamic window resizing on net latency.
It would be *very cool* if that code base could be ported to Pharo. It is really quite impressive that you did all this from the spec. I think that it would be possible to adjust my plan a bit, so that eventually, my code would use either the native plugin or your Smalltalk implementation. Then, we can compare features, functionality, bugs, etc.. Does that sound like a good idea ? Sven
On 12 May 2011, at 17:58, Rob Withers wrote:
Sure. I cannot recall if I offered a stream interface or not. I could add one and we could treat this and the SqueakSSL stream as provider impl to a wrapper stream.
The code that I am working on has a good [Secure]SocketStream implementation, it depends on a Socket like object, and on an SSLSession, which currently is the plugin. I imagine that it could also be your code.
I'll comment more as I dig into it. I think I will fork a PharoSSL project, since I know of at least one change in there.
If I understood correctly, you need all of Cryptography, right ? So would it not make more sense to (if necessary), start or add a Cryptography-Pharo ? I mean, your code is much more than SSL. Sven
El jue, 12-05-2011 a las 16:53 +0200, Sven Van Caekenberghe escribió:
Rob,
On 12 May 2011, at 16:38, Rob Withers wrote:
It is a complete implementation with the bare minimum of supported algorithms, based on the spec. It is 100% in Smalltalk. It worked last time I tested in, several years ago. I will be able to tell you more this weekend. Others have been adding fixes/small features since, but not a lot - the base is pretty solid. I painstakingly followed the RFC for SSL - I think I read it over 20 times! The only issue would be algorithm support. I never benchmarked it, but seeing the difference in performance between Smlltalk crypto code like 3DES and plugin code, there is a SIGNIFICANT improvement (10x?). I do not know the state of Profiling under Pharo. If someone could help set me up, then I will profile it this weekend. I imagine both performance and certification were the reasons for SqueakSSL.
There is also an SSH implementation I wrote that does dynamic window resizing on net latency.
It would be *very cool* if that code base could be ported to Pharo. It is really quite impressive that you did all this from the spec.
I think that it would be possible to adjust my plan a bit, so that eventually, my code would use either the native plugin or your Smalltalk implementation. Then, we can compare features, functionality, bugs, etc..
Does that sound like a good idea ?
But the performance is an issue. And I think that there was a discussion several years ago that lead to choice a plugin instead of the all-smalltalk code (independently of the queality of the smalltalk code). Also a point was made about the maintainability of the smalltalk code with respect to a library of the underlying OS, with respect to CERT issues and 0-day exploits. given the few resources in the community for simpler (relative to crypto) projects like *completion, RB and so, I think is a wise decision to use the proved, tested and maintained OS libraries through a plugin part of the standard VM. Of course, the smalltalk implementation can be used as a fallback for platforms where a plugin isn't available. Cheers
Sven
-- Miguel Cobá http://twitter.com/MiguelCobaMtz http://miguel.leugim.com.mx
Stéphane, Sven and friends, I created a fork project called CryptoPharo on squeaksource.com. I added Stéphane and Sven as admins. So, connect to: MCHttpRepository location: 'http://www.squeaksource.com/CryptoPharo' user: '' password: '' I pulled the base Cryptography package, and made a few fixes...the SSL package, and tried to get it running...and copied the CryptoPlugins without loading it. The mouse clicks were real jumpy and it automatically copied some versions to PharoInbox, I believe, totally out of my control. I don't have a lot of time to offer, unfortunately, as I am quite busy with other things in my life like rebuilding a 240z. I will see if I can take another look at it later this week, but it would be best if you guys can take the initiative and own it. Below are a few notes I took. Regards, Rob ------------------------------------------ Crypto: Ported the crypto code over. All tests seem to pass except #raisedTo:modulo: is god awful slow and so I bailed on the DiffieHellman and ElGamal tests after a few minutes of thought. The RSA test is a little slow, but ends up passing within 10s of seconds. The chain of calls which end up calling #raisedTo:modulo: is --- PrimesFinder>>primeOfSize: MillerRabin>>isProbablyPrime: LargePositiveInteger>>raisedto:modulo: -------------------------------------------- SSL: HTTPSocket class>>httpGetDocument:args:accept:request: has a problem with: '' asNumber with this line of code: port := (serverName copyFrom: index+1 to: serverName size) asNumber. where serverName = 'https:' and index = 6 Note: this is using HTTPSocket rather than HttpsSocket due to the string conversion to a Url subclass resolving to HttpUrl, rather than HttpsUrl. Initial port of SSL to CryptoPharo. Fixed hex issue with CipherSuite. Problems remain, with testCertStore (setting up private key is referencing RSAKey, which is gone and is using a call: #exponent:modulo: that is a RSAPublicKey thing and not a RSAPrivateKey thing) and with sending and getting data, but the Socket is reaching a connected state, so the handshake seems to be working. Not sure how given the perf issues with DiffieHellman. Actually, I did get a BAD REQUEST response, so data is flowing over the connection. Try: SSLSocket newConnection: 'www.cacert.org' port: 443 and check for connected (isConnected), then send: a command and receive a response.
I port the plugin to VisualSmalltalk and we have it working well (not heavily tested) for half a year. I could help on this project on the plugin part (for windows and unix only) and on the image side. The problem is that i'm going on vacaction on next weeks so i shall participate only since mid-June. Also i have not too much free time. Anyway i will be interested on using and testing it. Guido 2011/5/10 Sven Van Caekenberghe <sven@beta9.be>
SSL/HTTPS - SecureSocketStream/SSLSession for Pharo/Squeak and other Smalltalk implementations
HTTP client and server functionality has become an essential part of any Smalltalk implementation. There exist various open source solutions delivering this functionality.
Users quickly find out that HTTPS is not as readily available as HTTP. Although a solution exists in the form of SqueakSSL, it is not easily portable to Pharo and certainly not to other Smalltalk implementations. Furthermore, SqueakSSL is incomplete and more a working proof of concept than a high quality, high performance, maintainable piece of code, partially because of its dependence on the internals of SocketStream.
Hence, some people wanting HTTPS on Pharo as well as one organisation have come foreword with a bounty to force a solution. Here are the requirements, a plan of action and a number of steps to build such a solution.
First of all, it would be stupid not to start from the work already done for SqueakSSL. Any new solution should start from the existing plugin, from the existing set of primitives and from the current implementation of these primitives for the Windows, Mac OS X and Linux platforms.
The Smalltalk part of the solution should be as platform independent as possible. We therefor need a new, clean implementation of SocketStream, with proper internal buffering and optimised versions of the bulk input and output primitives. The code should be time and space efficient. At first, only binary I/O is needed. Encoding/decoding is best done by wrapping the stream. Maybe a bivalent stream could be an option. The current ASCII support in quite limited.
Next a SecureSocketStream can be implemented using this clean base combined with the SSLSession primitives. Here too, time and space efficiency are important although SSL will by definition be less efficient.
Eventually, HTTP frameworks can then use this SecureSocketStream to actually implement HTTPS. Although the primary requirement is client functionality, server functionality should be provided as well.
Next the existing issues with certificates need to be resolved, on all 3 platforms.
Finally, the C code of the plugin for each of the 3 platforms needs to be cleaned up and improved where necessary. This requires contributions from developers who know and understand a platform as well as how SSL is supposed to work. Furthermore they have to understand and be motivated to work on Smalltalk plugins. Up to 3 different developers might be needed.
The current implementation on Mac OS X does not seem to (directly) use the standard OpenSSL library from Linux although this library exists on Mac OS X. This could be an opportunity to reduce the number of implementations of the plugin to 2 API's.
Needless to say the whole implementation should be open source licensed (MIT), be documented and have a number of units tests to cover it's main functionality as well edge cases encountered in the field.
Friendly cooperation with other open source projects in the Smalltalk world is a plus. This project should benefit the whole community.
The bounty should be split in different parts.
The first part is setting up the new project, delivering the new SocketStream, SSLSession and SecureSocketStream, including the HTTPS client proof of concept. Traction within the community has to be developed.
Next the issues with the plugin have to be identified. Then the work on the plugin code for each platform has to be defined and 3 more bounties could be offered.
The goal should be to include the plugin in VM's by default.
With a proper solution to the plugin issues, SSL server functionality should be no problem.
I offer to take on part one and help manage the coordination of this project.
So is there anyone capable and willing to help out on the plugin on on one or more platforms for part of the bounty ?
Are there others who wish to raise the bounty ?
We will need a couple of good beta testers who understand this field as well.
Sven
On 12 May 2011, at 15:59, Guido Chari wrote:
I port the plugin to VisualSmalltalk and we have it working well (not heavily tested) for half a year.
I could help on this project on the plugin part (for windows and unix only) and on the image side. The problem is that i'm going on vacaction on next weeks so i shall participate only since mid-June. Also i have not too much free time.
Anyway i will be interested on using and testing it.
Guido
That is great, Guido! Don't worry, it will take some time, no rush. What OS platforms did you work on ? All 3 ? Sven
VisualSmalltalk runs only on Windows. My port of SqueakSSL is to windows. But i have expierence on Unix too. Never worked on Mac. 2011/5/12 Sven Van Caekenberghe <sven@beta9.be>
On 12 May 2011, at 15:59, Guido Chari wrote:
I port the plugin to VisualSmalltalk and we have it working well (not heavily tested) for half a year.
I could help on this project on the plugin part (for windows and unix only) and on the image side. The problem is that i'm going on vacaction on next weeks so i shall participate only since mid-June. Also i have not too much free time.
Anyway i will be interested on using and testing it.
Guido
That is great, Guido!
Don't worry, it will take some time, no rush.
What OS platforms did you work on ? All 3 ?
Sven
Hello, I can help test the client part of a HTTPS implementation. Currently I use Zinc-HTTP together with stunnel. Note that VA Smalltalk uses OpenSSL on Linux and Windows. So it is possible to use OpenSSL on windows as well [1]. Jan. [1] http://www.openssl.org/related/binaries.html On Tue, May 10, 2011 at 7:42 PM, Sven Van Caekenberghe <sven@beta9.be>wrote:
SSL/HTTPS - SecureSocketStream/SSLSession for Pharo/Squeak and other Smalltalk implementations
HTTP client and server functionality has become an essential part of any Smalltalk implementation. There exist various open source solutions delivering this functionality.
Users quickly find out that HTTPS is not as readily available as HTTP. Although a solution exists in the form of SqueakSSL, it is not easily portable to Pharo and certainly not to other Smalltalk implementations. Furthermore, SqueakSSL is incomplete and more a working proof of concept than a high quality, high performance, maintainable piece of code, partially because of its dependence on the internals of SocketStream.
Hence, some people wanting HTTPS on Pharo as well as one organisation have come foreword with a bounty to force a solution. Here are the requirements, a plan of action and a number of steps to build such a solution.
First of all, it would be stupid not to start from the work already done for SqueakSSL. Any new solution should start from the existing plugin, from the existing set of primitives and from the current implementation of these primitives for the Windows, Mac OS X and Linux platforms.
The Smalltalk part of the solution should be as platform independent as possible. We therefor need a new, clean implementation of SocketStream, with proper internal buffering and optimised versions of the bulk input and output primitives. The code should be time and space efficient. At first, only binary I/O is needed. Encoding/decoding is best done by wrapping the stream. Maybe a bivalent stream could be an option. The current ASCII support in quite limited.
Next a SecureSocketStream can be implemented using this clean base combined with the SSLSession primitives. Here too, time and space efficiency are important although SSL will by definition be less efficient.
Eventually, HTTP frameworks can then use this SecureSocketStream to actually implement HTTPS. Although the primary requirement is client functionality, server functionality should be provided as well.
Next the existing issues with certificates need to be resolved, on all 3 platforms.
Finally, the C code of the plugin for each of the 3 platforms needs to be cleaned up and improved where necessary. This requires contributions from developers who know and understand a platform as well as how SSL is supposed to work. Furthermore they have to understand and be motivated to work on Smalltalk plugins. Up to 3 different developers might be needed.
The current implementation on Mac OS X does not seem to (directly) use the standard OpenSSL library from Linux although this library exists on Mac OS X. This could be an opportunity to reduce the number of implementations of the plugin to 2 API's.
Needless to say the whole implementation should be open source licensed (MIT), be documented and have a number of units tests to cover it's main functionality as well edge cases encountered in the field.
Friendly cooperation with other open source projects in the Smalltalk world is a plus. This project should benefit the whole community.
The bounty should be split in different parts.
The first part is setting up the new project, delivering the new SocketStream, SSLSession and SecureSocketStream, including the HTTPS client proof of concept. Traction within the community has to be developed.
Next the issues with the plugin have to be identified. Then the work on the plugin code for each platform has to be defined and 3 more bounties could be offered.
The goal should be to include the plugin in VM's by default.
With a proper solution to the plugin issues, SSL server functionality should be no problem.
I offer to take on part one and help manage the coordination of this project.
So is there anyone capable and willing to help out on the plugin on on one or more platforms for part of the bounty ?
Are there others who wish to raise the bounty ?
We will need a couple of good beta testers who understand this field as well.
Sven
Hi Jan, On 12 May 2011, at 17:07, Jan van de Sandt wrote:
Hello,
I can help test the client part of a HTTPS implementation. Currently I use Zinc-HTTP together with stunnel.
Note that VA Smalltalk uses OpenSSL on Linux and Windows. So it is possible to use OpenSSL on windows as well [1].
Jan.
That is interesting. Is the VAST plugin open source ? And of course, thanks for the offer, I knew you would be interested ! Sven
Hi, No the VASt plugin is not open source. It is not really a plugin. It is just Smalltalk code that calls the OpenSSL lib using external functions (the FFI of VASt). The OpenSSL library delivered with VASt is a very old version and there are some concurrency issues on windows. So I do think that Instantiations is interested in an upgrade. If technically possible than perhaps some kind of cooperation is possible. Two years ago I created an open source alternative for VASt users on windows WinHttpClient & WinCrypt. This is of no use for Zinc because it depends on windows http stack :-( Jan. [1] http://blog.doit.st/2009/06/17/introducing-winhttpclient-for-va-smalltalk/ On Thu, May 12, 2011 at 5:21 PM, Sven Van Caekenberghe <sven@beta9.be>wrote:
Hi Jan,
On 12 May 2011, at 17:07, Jan van de Sandt wrote:
Hello,
I can help test the client part of a HTTPS implementation. Currently I use Zinc-HTTP together with stunnel.
Note that VA Smalltalk uses OpenSSL on Linux and Windows. So it is possible to use OpenSSL on windows as well [1].
Jan.
That is interesting. Is the VAST plugin open source ?
And of course, thanks for the offer, I knew you would be interested !
Sven
participants (6)
-
Guido Chari -
Jan van de Sandt -
Miguel Cobá -
Rob Withers -
Stéphane Ducasse -
Sven Van Caekenberghe