From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 17 Oct 1996 11:07:17 +0200 From: Boyd Roberts boyd@france3.fr Subject: encrypt/decrypt not thread safe Topicbox-Message-UUID: 4f7addbe-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19961017090717.lLRHkeqDxa62UVb4--TtSifHg5G90gWdirxicEPJnt8@z> From: forsyth@plan9.cs.york.ac.uk boyd might be able to offer a safe replacement that's not subject to pointless controls. you can certainly take my des from ftp://www.plan9.cs.su.oz.au/~boyd/des.msg but it's not thread safe. it assumes it's being called by a single threaded program. to fix it you need to have a per thread expanded key. all you need to do is to change deskey() to accept a parameter for where to store the expanded key , rather than storing it in a global static. not real hard.