我需要为 RSA 密钥创建用户可以记住或至少可以轻松识别的指纹。我想到了以下想法:
- 将 SHA1 哈希分解为 4 位等部分,并将它们用作贝塞尔样条线的坐标。绘制样条线并将该图片用作指纹。
- 使用 SHA1 哈希作为某些分形算法的输入。对于给定的输入,结果需要是唯一的,即输出不能有一半时间是实心正方形。
- 将 SHA1 哈希映射到单词列表中的条目(如拼写检查器或密码列表中使用的)。这将创建一个由真实单词组成的密码。
- 使用其他一些大型数据集(例如 Google 地图)代替单词列表(将 SHA1 哈希映射到地图坐标并使用地图区域作为指纹)
还有其他想法吗?我确信这已经以一种或另一种形式实施了。
I need to create fingerprints for RSA keys that users can memorize or at least easily recognize. The following ideas have come to mind:
- Break the SHA1 hash into portions of, say 4 bits and use them as coordinates for Bezier splines. Draw the splines and use that picture as a fingerprint.
- Use the SHA1 hash as input for some fractal algorithm. The result would need to be unique for a given input, i.e. the output can't be a solid square half the time.
- Map the SHA1 hash to entries in a word list (as used in spell checkers or password lists). This would create a passphrase consisting of real words.
- Instead of a word list, use some other large data set like Google maps (map the SHA1 hash to map coordinates and use the map region(s) as a fingerprint)
Any other ideas? I'm sure this has been implemented in one form or another.
发布评论
评论(4)
OpenSSH 包含类似的内容,名称为“可视主机密钥”。试试这个:
其中
somesshhost
是运行 SSH 服务器的某台机器。它将打印出服务器密钥的“指纹”,以十六进制和 ASCII 艺术图像的形式打印出来,可能如下所示:或者像这样:
显然,这是受到 这篇文章。 OpenSSH 是开源的,具有类似 BSD 的许可证,因此您可以简单地重用他们的代码(它似乎位于
key.c
文件,函数key_fingerprint_randomart()
)。OpenSSH contains something like that, under the name "visual host key". Try this:
where
somesshhost
is some machine with a SSH server running. It will print out a "fingerprint" of the server key, both in hexadecimal, and as an ASCII-art image which may look like this:Or like this:
Apparently, this is inspired from techniques described in this article. OpenSSH is opensource, with a BSD-like license, so chances are that you could simply reuse their code (it seems to be in the
key.c
file, functionkey_fingerprint_randomart()
).对于第 3 项(单词列表中的条目),请参阅 RFC-1751 - 人类可读 128 位密钥约定,其中指出
您还可以使用复合指纹来提高记忆性,例如英文单词后面(或前面)是一个或多个与密钥相关的图像。
为了生成图像,您可以使用 Identicon、Wavatar, MonsterID< /a> 或 Robo哈希。
例子:
For item 3 (entries in a word list), see RFC-1751 - A Convention for Human-Readable 128-bit Keys, which notes that
You could also use a compound fingerprint to improve memorability, like english words followed (or preceeded) by one or more key-dependent images.
For generating the image, you could use things like Identicon, Wavatar, MonsterID, or RoboHash.
Example:
我发现了一种叫做随机艺术的东西,它可以根据哈希值生成图像。有一个 Python 实现可供下载: http://www.random-art.org/about/
还有一篇关于使用随机艺术进行身份验证的论文: http://sparrow.ece.cmu.edu/~adrian/projects/validation/validation.pdf
这是 1999 年的;不知道这方面是否有进一步的研究。
I found something called random art which generates an image from a hash. There is a Python implementation available for download: http://www.random-art.org/about/
There is also a paper about using random art for authentication: http://sparrow.ece.cmu.edu/~adrian/projects/validation/validation.pdf
It's from 1999; I don't know if further research has been done on this.
您的第一个建议(每四个字节绘制样条线的路径,然后使用 非零进行填充fill 规则)正是我在 hashblot 中用于可视化的规则。
Your first suggestion (draw the path of splines for every four bytes, then fill using the nonzero fill rule) is exactly what I use for visualization in hashblot.