bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: namespace conflict for des


From: Simon Josefsson
Subject: Re: namespace conflict for des
Date: Tue, 25 Oct 2005 00:35:10 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Simon Josefsson <address@hidden> writes:

> Oh.  There is a POSIX "setkey" function.  It is not thread safe, so I
> can't use it.  But GNU has setkey_r and encrypt_r in crypt.h.  I think
> gnulib should duplicate that API instead.

I changed my mind -- that API uses as input 64 byte long strings,
where each char is either "0" or "1".  I.e., it uses an ASCII-encoding
of each block.  That is definitely not something we should promote.

However, I discovered that glibc has another DES implementation:
ecb_crypt and cbc_crypt in rpc/des_crypt.h.  The interface seem
somewhat inefficient, because you can't do a "setkey" operation and
then use the scheduled key for several operations.  It has a strange
license:

 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
 * unrestricted use provided that this legend is included on all tape
 * media and as a part of the software program in whole or part.  Users
 * may copy or modify Sun RPC without charge, but are not authorized
 * to license or distribute it to anyone else except as part of a product or
 * program developed by the user.

However, detecting and replacing that code seem like real work, and
I'm not sure we want to promote an RPC API either.

Unless someone feel strongly (and, preferably, even want to do the leg
work...) I'll simply fix the namespace of the current DES module.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]