The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Cryptography for Smalltalkers

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
Cryptography for Smalltalkers Posted: Sep 5, 2006 1:48 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Cryptography for Smalltalkers
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

After a good night's sleep, all I need is coffee :) First up today is Martin Kobetic, who's going to reprise his Smalltalk Solutions talk on Cryptography. He's going to cover various algorithms that we've implemented in Cincom Smalltalk, and how to use them with other systems.

That's Martin on the left, starting his talk

Martin's giving a background on public key algorithms - the basic points are:

  • Hard to derive the private key from the public key
  • The keys are based on hard problems

The system is simple to use: You encrypt with the public key, and you decrypt with the private key. This way, anyone can encrypt, but only people with the private key can read the messages. Using this:


keys := RSAKeyGenerator keySize: 512.
allice := RSA new publicKey: keys publicKey.
msg := 'Hello World' asByteArrayEncoding: #utf8.
msg := alice encrypt: msg.

bob := RSA new privateKey: keys privateKey.
msg := bob decrypt: msg.
plain := msg asStringEncoding: #utf8.

Of course, you need to cooperate to generate the private key. You use the public key to establish a private key, and then you need to manage that. The above is just an example using RSA; we also support Diffie-Hellman and others.

There's also support for digital signing and hash functions, which can be used for:

  • integrity
  • authentication
  • non-repudiation

The idea behind digital signatures is that they are authentic, non-reusable, and unalterable. You sign with a private key, and then verify with the public key. You get a boolean response as to the authenticity of the message.


"sign"
alice := RSA new privateKey: keys privateKey.
msg := 'Hello World' asBytArray.
sig := alice sign: msg.
sig asHexString.

"verify"
bob := RSA new publicKey: keys publicKey.
bob verify: sig of: msg.

We also support DSA, including the newer modifications to it. Using DSA is the same as RSA (above), using class DSA instead.

Technorati Tags: ,

Read: Cryptography for Smalltalkers

Topic: SD Best Practices, Boston, September 11-14 Previous Topic   Next Topic Topic: Playing the XPGame

Sponsored Links



Google
  Web Artima.com   

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