Hi, My first mail here so sorry for any faux pas :) >On Tue, Jul 17, 2012 at 11:40:28AM +0200, Daniel Cegiełka wrote: >> Hi, >> >> I have a proposal to move the crypt* files from misc directory to the >> new crypt directory. > >I'm definitely open to this; the misc directory is presently a mess >and eventually I want to eliminate it completely. If we do go ahead >with moving it, it might make sense to eliminate the crypt_ prefix >from the filenames (i.e. just des.c instead of crypt_des.c) to >eliminate redundancy. >> I want to port to musl crypt_blowfish patch >> (http://www.openwall.com/crypt/) and keeping everything in one >> directory would be more readable. >I would be interested in getting at least this, md5, and sha hash >support added, as long as they can be made compact. 3-5k each would be >ideal but I realize that might be difficult. For inclusion in musl, >they should have no non-const static data (i.e. no global state) and >also avoid using excessive stack space for temporary tables. > >Rich Together with Daniel we've prepared initial patch for inclusion crypt_blowfish and crypt_gensalt in musl. Things to change were rather cosmetic. Both blowfish and gensalt implementations don't use global state, only const statics (which needed simply 'const' to meet musl standard). Besides that code looks quite clean & nice. However, there are some consts arrays used inside functions which may clutter stack like flags_by_subtype from BF_crypt(), test_key, test_setting, test_hash from _crypt_blowfish_rn(). I think that they can be pulled up to global static consts but we haven't done that yet. What do you think about this? By the way, we had some problems with compiling it to libcrypt.a - it seems empty, don't know why. The code is being compiled into libc. Anyway Daniel successfully tested it with gcc-musl -DTEST -D_GNU_SOURCE wrapper.c -o musl_blowfish_test Looking forward to your feedback. Best Regards, Łukasz Sowa