]> git.ipfire.org Git - thirdparty/man-pages.git/commit
xcrypt.3: Warn folks not to use these functions
authorJason A. Donenfeld <Jason@zx2c4.com>
Fri, 28 Sep 2018 21:15:29 +0000 (23:15 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 28 Sep 2018 22:02:44 +0000 (00:02 +0200)
commit5fcb9ef9cbb5684dea9186a806a8c2e20c7a7dca
tree31c34b5dfb9fd4fde59555e3045a09559870fe44
parent3acd70581db334fcb84cde71a7102351e8bec7cb
xcrypt.3: Warn folks not to use these functions

There is not an acceptable reason to use these functions ever in
new code.  For example, just observe the implementation of the
KDF:

/*
 * Turn password into DES key
 */
void
passwd2des_internal (char *pw, char *key)
{
  int i;

  memset (key, 0, 8);
  for (i = 0; *pw && i < 8; ++i)
    key[i] ^= *pw++ << 1;

  des_setparity (key);
}

This kind of nonsense isn't okay in the year 2017. Therefore, we
enlighten our poor users.

[Note from mtk: I think Jason knows that of which he talks.]

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man3/xcrypt.3