-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
port Zinc-WebSocket packages to GemStone #58
Comments
Paul (@pdebruic), Just this week, Sebastian (@HeSe) has blown the dust off the Cryptography project[1] to support his port of Web-Sockets to GemStone[2]. Since my inclination is to move projects off of GemSource and onto GitHub when we start active work, I started poking around the current state of Cryptography, since the last time that project had been touched was 4 years ago. On SqueakSource there is a Cryptography project[3] that appears to have a newer versions of the Cryptography and PasswordHashingFFI packages. this project has a number of interestingly named packages that may or may not be useful to have ported to GemStone. The Blowfish package is interesting because there's a pretty recent version not to mention the fact that you've got a blowfish project up on github[4]. In the pharo universe it seems that there is some recent activity with ApplicationSecurity[5] and Nacl[6] projects. I am a little baffled by the lay of the land as there seem to be quite a variety of apis available and I'm not sure which ones apply to which problems ... Soo ... I am curious about your thoughts on these various projects and the idea of consolidating the current work on GsDevKit ... part of the trick here is to define the "current work" and also look at where we "should be" ... Of course, I want to support existing packages that are used in existing projects and I'd like to start addressing performance issues ... I would like to support packages that are available on Pharo and Squeak and get them ported to GemStone... If GemStone needs to add fundamental capabilities at the image level then now is a good time as we start work on the 3.3 release ... Dale [1] http://seaside.gemtalksystems.com/ss/Cryptography.html |
…s-ci for testing ... for GemStone that includes Zinc-WebSocket-Tests ... expect failures since Cryptography project is not up to snuff...yet
FYI: In the summer of 2013, I (urgently) needed an implementation of SHA256 in GemStone. I tried to blow the dust of the Cryptography package for GS but I had to limit myself to the one or two packages (or parts thereof) of the project I needed to run SHA256. So, not all is in ruins but I did notice that a lot of the things were not working. Also in Pharo, the project does not load anymore as various parts have been copy/pasted into the image. |
Hi Johan, Well, I just had a look. Whereas in gemstone hex is delivered in lowercase it is uppercase in Pharo. Would it make sense to at least do obvious changes and add Cryptography Sebastian On 2014-11-02 7:36 AM, Johan Brichau wrote:
|
Hi Dale, We should probably hop on the cryptography list: http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography I've cc'd it for now. I still use the PasswordHashingFFI code on squeak/pharo and GemStone. Its pretty basic, but useful. With libxcrypt installed, & on linux, it lets a user hash passwords using bcrypt or SHA-512 (but the password hashing version). A primer on why you'd want to do that is here: http://codahale.com/how-to-safely-store-a-password/ . Another good, slow, password hashing algorithm is scrypt (https://en.wikipedia.org/wiki/Scrypt) but we don't have an FFI library for it yet. In addtiion to Hernan's Application Security project Pierce Ng has some projects he mentions on his blog: http://www.samadhiweb.com/tags/cryptography Blowfish is a 2 way encryption algorithm which allows someone to encrypt something and then decrypt it later. The version I wrote only encrypts an 8 byte block at a time. Anything longer looks encrypted but isn't. To do longer things someone would need to add code that does cipher block chaining (CBC) (e.g. https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher-block_chaining_.28CBC.29) I never added the CBC code because I wrote the Blowfish code while investigating having a Smalltalk bcrypt password hashing implementation. Bcrypt uses blowfish while hashing passwords for long term storage. The Smalltalk implementation ended up being more than 5,000x slower than the FFI version and not usable in practice. From my point of view right now the Blowfish code shouldn't be used for anything without adding the CBC code and even then a person may be better off using a newer algorithm than Blowfish for 2 way encryption because of both hardware and algorithm advances (e.g. the NaCl library you mention). That being said the Smalltalk Blowfish implementation does work for 8 byte blocks and is only Smalltalk, no FFI. I think its a good idea for some tidying in the Cryptography ecosystem, but don't have a strong idea of what the end state (packages and their location on the internet) should be. Hope this helps Paul On Nov 1, 2014, at 11:20 AM, Dale Henrichs [email protected] wrote:
|
Thanks @pdebruic, @HeSe and @jbrichau ... I've subscribed to the cryptography list so that I can follow any responses there, but I I am inclined to think that we in the GemStone community are the only ones with a vested interest in a cross-platform cryptography library so it seems that for us the best solution would be to create a Cryptography project on GsDevKit and try to maintain the subset of the library that is being actively used by the GemStone community (with tests on Pharo and Squeak) and expand the subset as needed ... we should try to mirror the new packages on the SqueakSource list as we do with zinc, seaside, etc. If the discussion on the cryptography list heats up, I'm inclined to follow their liead ... What do you guys think? |
Sound like a plan. Johan
|
For starters we'll be referencing the new Cryptography project from Zinc on On Mon, Nov 3, 2014 at 12:41 PM, Johan Brichau [email protected]
|
…oad issue resolved Issue #60: fix NeoJSON specification and add 'REST' to 'CI' group ... defer reference to GsDevKit/NeoJSON project until travis tests have been enabled ...
…r to get straightened out as both NeoJSON and WebSockets have issues
…hings are for NeoJSON and and zinc core
…roject and add backin into CI group, since the project should now load without errors
@pdebruic, @HeSe and @jbrichau ... Cryptography project added for now it is just serving the two packages that have been ported to GemStone, slthough I did copy all of the packages from the SqueakSource project for good measure. Didn't add them to baseline because at this moment don't know which ones run in Squeak or Pharo or nowhere ... On the issue_58 branch I've updated the baseline to reference the GsDevKit/Cryptography project, but we have a number of test failures ... Hooked up the NeoJSON project as well, and it has some failing tests, too ... I'm setting up the Cryptography project on travis so I'll be looking into getting things to pass there ... |
@pdebruic, @HeSe and @jbrichau ... Cryptography tests are green across the range of GemStone version |
…or all required projects for zinc ... may need to pull in tests vi CI group
Switched to running all unit tests in image to pick up errors that may be introduced (like SentButNotImplemented and UndefinedSymbols) and that may be failing from required projects and here's the tale of tape... mainly websocket test failures:
|
slug of sentButNotImplemented messages (not sure where they are all coming from) |
Note that the class ZnServerStarter is needed for the ZnWebSocketTests and that class will need a custom bash script for starting a separate server for the tests (thanks @HeSe ). So we may have to wait until I change buiderCI to use gsDevKitHome for installing GLASS/GsDevKit before getting the tests to run clean... |
It looks like some of the websocket code depends upon some methods that are in STON ... so will need to migrate those methods into GsSqueakCommon or GsPharo .... |
The class ZNServerStarter is over in https://github.com/HeSe/gsApplicationTools |
…pping GsSocket references in a TransientStackValue. Add ZnTransactionSafeManagingMultiThreadedServer a subclass of ZnManagingMultiThreadedServer where all references to GsSockets are wrapped by a TransientStackValue ... including places where GsSockets are passed as arguments ... this makes the server instance transaction safe, so continuations can be snapped off and transactions can be safely used in delegates ...
…ls to GsProcess since GsProcess calls are 3.x specific
…erver for seaside ... fine tune logging and honor debugMode in terms of passing exceptions when set ....
…r ZnServerTests with class ZNGsServerTests
… support full range of ZnServer options in ZnGemServer
…erver, but it is natural for ZnGemServer to refer to ports ... a bow to compat
new test method testAcceptsEncodingGzip
No description provided.
The text was updated successfully, but these errors were encountered: