如何让 Ubuntu 的 crypt(3) 支持 Blowfish? [英] How to make Ubuntu's crypt(3) support Blowfish?

查看:97
本文介绍了如何让 Ubuntu 的 crypt(3) 支持 Blowfish?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据 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?

推荐答案

首先,如果主线"glibc 不支持 Blowfish,那么哪个 glibc 支持?

First of all, if "mainline" glibc does not support Blowfish, then which glibc does?

由 openwall 页面上列出的发行版构建,例如ALT Linux 和 SUSE.如果您对它感兴趣,为什么它不在主线中,您可以阅读 Ulrich Drepper 的文章.

Built by distributions listed at openwall page, e.g. ALT Linux and SUSE. If it's interesting for you, why it is not in mainline, you can read Ulrich Drepper's article.

为什么在 Ubuntu 中默认没有启用?

Why is it not enabled by default in Ubuntu?

此处讨论了此问题:LP#1349252.

最后但并非最不重要的一点是,让 Ubuntu 中的 C crypt() 函数理解 Blowfish 哈希的最简单方法是什么?

And last but not least, what is the easiest way to make the C crypt() function in Ubuntu understand Blowfish hashes?

很可能,如果不构建自己的 glibc 包,就没有办法做到这一点.

Probably, there is no way to make it without building your own glibc package.

这篇关于如何让 Ubuntu 的 crypt(3) 支持 Blowfish?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆