Tk Library Source Code

View Ticket
Login
Ticket UUID: 759881
Title: Move TclDES extension into tcllib
Type: RFE Version: None
Submitter: mcody Created on: 2003-06-24 15:22:08
Subsystem: tcllib: request for new module Assigned To: patthoyts
Priority: 9 Immediate Severity:
Status: Closed Last Modified: 2005-10-01 02:05:05
Resolution: Closed By: andreas_kupries
    Closed on: 2005-09-30 19:05:05
Description:
I am interensted in moving my TclDES 0.5 extension into
tcllib. Doing this would make it more accessible to the
Tcl community. I want to continue to be the maintainer
of the extension. The des extension, currently in
tcllib but not listed, would be deprecated or replaced
with the code of TclDES and/or TclDESjr.

There is possibly an issue with import/export
restrictions with TclDES since it contains support for
3DES (considered "strong encryption"). There is not so
much a problem with TclDESjr, which does not contain
3DES. Placing TclDES into the tcllib distribution may
"taint" the entire distribution, per se.

A middle ground may be to place TclDESjr into tcllib,
leaving TclDES as a separate extension. The problem
with this is that plain DES is relatively weak
encryption and not used for many applications these
days. Still, it is easy enough to derive 3DES from
plain DES, so perhaps, TclDESjr is sufficient.
Conversly, if deriving 3DES from plain DES is so
simple, why worry about it and just place both TclDES
and TclDESjr into tcllib.
User Comments: andreas_kupries added on 2005-10-01 02:05:05:
Logged In: YES 
user_id=75003

This has been done, i.e. committed to the CVS head.

patthoyts added on 2005-09-04 19:26:35:

File Added - 148020: des.tcl

patthoyts added on 2005-09-04 19:26:33:
Logged In: YES 
user_id=202636

I'm attaching my TclDES wrapper.

patthoyts added on 2005-09-04 15:35:26:
Logged In: YES 
user_id=202636

What I propose to do is to bring TclDES' des.tcl file into
tcllib's des module and rename it tcldes.tcl. I have written
a wrapper to replace the current des code and re-implements
the current interface in terms of the TclDES interface. This
also permits me to give the des module the same style of
programming api we have for the other crypto packages (ie:
set Key [DES::Init ...]; DES::Encrypt $Key $data; DES::Final
$Key)

I have raised a patch request on the tcldes project because
I found some significant performance improvements for tcldes.

I would prefer to imort the 3des/des version and not deal
with DESjr but if Mac Cody wants to close the TclDES project
and maintain the code in the context of tcllib there is no
problem with having both.

To summarize, [package import tclDES] would load up TclDES'
API as currently released by Mac Cody. [package require des]
will load TclDES and provide a tcllib standard API that
includes backward compatability with the previous tcllib
version.

If someone wants to review the code before I check it in -
contact me.

Attachments: