指纹数据好记吗?

发布于 2024-09-16 10:54:54 字数 358 浏览 2 评论 0 原文

我需要为 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

遇到 2024-09-23 10:54:54

OpenSSH 包含类似的内容,名称为“可视主机密钥”。试试这个:

ssh -o VisualHostKey=yes somesshhost

其中 somesshhost 是运行 SSH 服务器的某台机器。它将打印出服务器密钥的“指纹”,以十六进制和 ASCII 艺术图像的形式打印出来,可能如下所示:

+--[ RSA 2048]----+
|   .+            |
|   + o           |
|  o o +          |
|   + o +         |
|  . o E S        |
|   + * .         |
|    X o .        |
|   . * o         |
|   .o .          |
+-----------------+

或者像这样:

+--[ RSA 1024]----+
|        .*BB+    |
|       . .++o    |
|        = oo.    |
|       . =o+..   |
|        So+..    |
|        ..E.     |
|                 |
|                 |
|                 |
+-----------------+

显然,这是受到 这篇文章。 OpenSSH 是开源的,具有类似 BSD 的许可证,因此您可以简单地重用他们的代码(它似乎位于 key.c 文件,函数key_fingerprint_randomart())。

OpenSSH contains something like that, under the name "visual host key". Try this:

ssh -o VisualHostKey=yes somesshhost

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:

+--[ RSA 2048]----+
|   .+            |
|   + o           |
|  o o +          |
|   + o +         |
|  . o E S        |
|   + * .         |
|    X o .        |
|   . * o         |
|   .o .          |
+-----------------+

Or like this:

+--[ RSA 1024]----+
|        .*BB+    |
|       . .++o    |
|        = oo.    |
|       . =o+..   |
|        So+..    |
|        ..E.     |
|                 |
|                 |
|                 |
+-----------------+

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, function key_fingerprint_randomart()).

独自唱情﹋歌 2024-09-23 10:54:54

对于第 3 项(单词列表中的条目),请参阅 RFC-1751 - 人类可读 128 位密钥约定,其中指出

S/Key 的作者设计了一种系统来一次性制作 64 位
密码易于人们输入。

他们的想法是将密码转换成一串小数字
英语单词。人们更容易理解英语单词
既能记住又能打字。 S/Key 的作者从
包含 2048 个英语单词的词典,长度从 1 到 4
人物。 64位密钥(2^64)所覆盖的空间可以被覆盖
字典中的六个单词 (2^66) 剩余空间
平价。例如,十六进制值的 S/Key 一次性密码:

<前><代码> EB33 F77E E73D 4053

会变成以下六个英文单词:

 潮汐痒慢规则莫特

您还可以使用复合指纹来提高记忆性,例如英文单词后面(或前面)是一个或多个与密钥相关的图像。

为了生成图像,您可以使用 IdenticonWavatar, MonsterID< /a> 或 Robo哈希

例子:

在此处输入图像描述
在此处输入图像描述

在此处输入图像描述
在此处输入图像描述

潮痒缓慢

控制规则 MOT

For item 3 (entries in a word list), see RFC-1751 - A Convention for Human-Readable 128-bit Keys, which notes that

The authors of S/Key devised a system to make the 64-bit one-time
password easy for people to enter.

Their idea was to transform the password into a string of small
English words. English words are significantly easier for people to
both remember and type. The authors of S/Key started with a
dictionary of 2048 English words, ranging in length from one to four
characters. The space covered by a 64-bit key (2^64) could be covered
by six words from this dictionary (2^66) with room remaining for
parity. For example, an S/Key one-time password of hex value:

    EB33 F77E E73D 4053

would become the following six English words:

    TIDE ITCH SLOW REIN RULE MOT

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:

enter image description here
enter image description here

enter image description here
enter image description here

TIDE ITCH SLOW

REIN RULE MOT

无畏 2024-09-23 10:54:54

我发现了一种叫做随机艺术的东西,它可以根据哈希值生成图像。有一个 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.

佞臣 2024-09-23 10:54:54

您的第一个建议(每四个字节绘制样条线的路径,然后使用 非零进行填充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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文