The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Cipher Changes in VW 7.4

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Cipher Changes in VW 7.4 Posted: Jan 9, 2006 12:23 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Cipher Changes in VW 7.4
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

The Security libraries in VW 7.4 have been cleaned up a lot - but some of that might affect backward compatibility. This server is still running on VW 7.1, for instance - I had to do a small bit of work (with Martin's help) to get things to interoperate between the two.

Back in 7.3 and prior versions, here's how I encrypted a string using DES:


	des := DES new.
	cypher := des encrypt: plain with: key.

Now, in 7.4, there's been an API change. The #encrypt:with: method no longer exists. So it looked like all I had to do was this:


	des := DES newBP_ECB.
	des setKey: key asBigEndianByteArray.
	cypher := des encrypt: plain asByteArray.

However, there was another change that this didn't account for. When the Security libraries first came in, they were rushed out the door - the code was hard to follow, and there were other issues. That's cleaned up in 7.4, but it was smacking me in the head for backwards compatibility. After a conversation with Martin, it turned out that the padding scheme used in 7.4 was correct, and that older versions had used something else. To get it to work, I juist had to wrap the DES encryption with the same kind of padding:


	des := SSLBlockPadding on: DES new.
	des setKey: key asBigEndianByteArray.
	cypher := des encrypt: plain asByteArray.

And it all worked. Which means, I can now put together a dev build of BottomFeeder using 7.4. I'll get to that later today, or possibly Wednesday (I'm heading to corporate for meetings tomorrow).

Read: Cipher Changes in VW 7.4

Topic: Cincom Smalltalk Winter Release is out Previous Topic   Next Topic Topic: RSS Identity

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use