问题描述
根据 crypt(3) 手册,河豚(由 $2a$ 前缀表示)是受支持的密码方法之一:
According to the crypt(3) manual, Blowfish (indicated by the $2a$ prefix) is one of the supported cypher methods:
ID | Method
─────────────────────────────────────────────────────────
1 | MD5
2a | Blowfish (not in mainline glibc; added in some
| Linux distributions)
5 | SHA-256 (since glibc 2.7)
6 | SHA-512 (since glibc 2.7)
但是,Blowfish(不在主线 glibc 中;在某些 Linux 发行版中添加) 的部分令人困惑且文档不足,所以我有几个问题.
However the part saying Blowfish (not in mainline glibc; added in some Linux distributions) is confusing and underdocumented, so I have a few questions.
首先,如果主线"glibc 不支持 Blowfish,那么哪个 glibc 支持?Ubuntu 14.04 使用 glibc 2.19,打包在 libc6/libc6-dev 包中.假设这是主线"glibc,则不支持 Blowfish.显然有一个名为 crypt_blowfish 的补丁为 glibc 添加了 Blowfish 支持.为什么在 Ubuntu 中默认不启用它?最后但并非最不重要的一点是,让 Ubuntu 中的 C crypt() 函数理解 Blowfish 哈希的最简单方法是什么?
First of all, if "mainline" glibc does not support Blowfish, then which glibc does?Ubuntu 14.04 uses glibc 2.19, packaged in libc6 / libc6-dev packages. Assuming this is the "mainline" glibc, then Blowfish is not supported. Apparently there is a patch called crypt_blowfish adding Blowfish support to glibc. Why is it not enabled by default in Ubuntu? And last but not least, what is the easiest way to make the C crypt() function in Ubuntu understand Blowfish hashes?
推荐答案
由 openwall 页面上列出的发行版构建,例如ALT Linux 和 SUSE.如果您对它感兴趣,为什么它不在主线中,您可以阅读 Ulrich Drepper 的文章.
最后但并非最不重要的一点是,让 Ubuntu 中的 C crypt() 函数理解 Blowfish 哈希的最简单方法是什么?
很可能,如果不构建自己的 glibc 包,就没有办法做到这一点.
Probably, there is no way to make it without building your own glibc package.
这篇关于如何让 Ubuntu 的 crypt(3) 支持 Blowfish?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!