安全与隐私moserware.com编辑精选
AES 高级加密标准火柴人图解
A Stick Figure Guide to the Advanced Encryption Standard (AES)
2009 — 2022,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
这是一篇用火柴人漫画形式讲解 AES(高级加密标准)算法的经典科普文章。作者从 DES 被破解的历史背景讲起,把 Rijndael 算法的核心步骤(状态矩阵、混淆与扩散等)拆解成多个难度层次,让不同背景的读者都能逐步理解。文章还幽默地提醒读者:看懂原理后也不要自己在生产代码中实现 AES。
为什么经久不衰:它把一个晦涩的学术算法变成了人人可读的漫画,多年来被大学教授用于安全课程,反复登上 HN 首页,至今仍是理解 AES 的最佳入门读物。
HN 评论精选
作者自述创作动机与手绘过程,并惊讶于文章在教学中被广泛采用
两年前写这篇文章时没想到会有 34 万+浏览量。当时读 Rijndael 的书感到挫败——算法很美却被学术术语掩盖了。每个格子都是用纸和马克笔手绘再扫描的,客厅里铺满了漫画格子。最意外的是很多大学教授在计算机安全课上使用它。
moserware查看英文原文
I was a bit surprised to wake up and find this on Hacker News again! I had no idea how popular (~340k+ views) this post would become when I wrote it two years ago. I wrote it out of frustration after reading the Rijndael book that I linked too. I saw a very beautiful algorithm that was mainly obscured in academic-ese. Some general thoughts looking back at my post two years later: * I drew every cell with a sheet of paper and a sharpie and then scanned everything in. My living room was covered with all of the cells of this comic. If I did it again, I'd probably just use my drawing tablet. However, it worked out well being low-tech with paper because I drew a lot of the cells on vacation (i.e. imagine me drawing these scenes on a picnic table next to family by the lake thinking I was a bit crazy). Unfortunately, one unforeseen consequence of doing it by hand was that it became very clear that my handwriting was too hard to read, so I had to manually erase all the writing and redo it using a decent looking font. This took a lot of time. I had originally thought about using comic-sans but am very glad I decided to use the Marker SD font instead. You can see my actual handwriting in the "crib sheet" cell at the end. It was going to be way too much work to make it look pretty. * I was most surprised by how many college professors use my comic in their computer security classes. Hopefully it helps the students. * I tried to emphasize Rijndael's state matrix by having the stick figure guy carry it everywhere as a briefcase, but I don't think that came across very clear. * Although I was inspired by XKCD's style, I didn't copy the critical part of a witty comment in the hover text. If I had to do it again, I probably would have done so. Thanks for all the feedback; it's what encourages me to invest so much time in making posts like this.
指出文中几处史实细节不准确,并强调不要据此自己实现加密
一些小瑕疵:Deep Crack 和 Distributed.net 出现在差分与线性密码分析重创 DES 之后;Triple-DES 从来不是唯一替代品(如 1991 年的 IDEA);抛弃 DES-EDE 更主要的原因是块大小和密钥长度限制,而非速度。AES 数学部分很棒,但别因此尝试自己实现——这只是安全使用 AES 库所需细节的一小部分。
tptacek查看英文原文
Some nits: * "Deep Crack" and Distributed.net came after DES was fatally injured by differential and linear cryptanalysis. * At no point was the only alternative to the broken DES "Triple-DES"; we had (for instance) IDEA since 1991, which is what PGP used. * Speed isn't the biggest reason we ditched DES-EDE; the tiny block size and key size restrictions are bigger reasons. Similarly, "at least as strong as Triple-DES" is misleading; nobody was satisfied with Triple-DES' security bounds. Just nits. The AES math stuff is great. But don't go trying to use any of this; this is just a fraction of the detail you need to safely use an AES library.
文章分层讲解复杂主题的方式堪称典范,值得反复阅读
这篇文章存在很久了,但每次都让我重新读一遍。它也是把极复杂主题拆解成多层次理解的绝佳范例。
bennysaurus查看英文原文
This has been around for a good while but still gets me reading it every time. It's also a great example of taking an incredibly complex subject and cutting it down to various levels of understanding.
幽默的免责声明点出关键:懂原理不等于能安全实现
最喜欢的部分是'防自摆乌龙协议':承诺看懂 AES 有多简单之后,也不会在生产代码中自己实现它,除非能创作出比较缓存、时序等侧信道攻击及其对策的诠释舞蹈。
mildweed查看英文原文
Favorite part: "Foot-Shooting Prevention Agreement: I, (your name), promise that once I see how simple AES really is, I will not implement it in production code even though it would be really fun. This agreement shall be in effect until the undersigned creates a meaningful interpretive dance that compares and contrasts cache-based, timing, and other side channel attacks and their countermeasures. (Signature) (Date)" That being said, for my PHP+MySQL bretheren: http://phpseclib.sourceforge.net/ http://dev.mysql.com/doc/refman/5.1/en/encryption-functions.html#function_aes-encrypt
历次讨论
同类还值得读
非法素数
Illegal prime
维基百科条目,介绍“非法素数”:某些素数之所以被称为“非法”,是因为它们经特定编码后,恰好对应一段被法律禁止传播的数据——最著名的是 DVD 解密程序 DeCSS 的代码,有人把…
安全与隐私上首页 5 次 · 2010–2021en.wikipedia.org编辑精选关于 /dev/urandom 的常见误区
Myths about /dev/urandom
(Thomas Hühn 撰写,2014 年首发并持续更新)逐条反驳关于 /dev/urandom 的常见误解:它与 /dev/random 使用的是同一个 CSPRNG,一旦完…
安全与隐私上首页 5 次 · 2014–20202uo.de编辑精选指纹是用户名,不是密码
Fingerprints are Usernames, not Passwords
作者(eCryptfs 维护者、Ubuntu 安全工程师)认为指纹等生物特征是公开、不可更改的标识,应视作用户名而非密码,不能当作秘密凭据用于认证。
安全与隐私上首页 4 次 · 2013–2017blog.dustinkirkland.comHTTPS 连接的最初几毫秒(2009)
The First Few Milliseconds of an HTTPS Connection (2009)
逐毫秒拆解一次 HTTPS 连接建立时发生了什么,重点讲 TLS 握手、证书验证、RSA 签名与密钥协商等机制,面向不熟悉该领域的读者。
安全与隐私上首页 4 次 · 2009–2020moserware.com编辑精选Google 拥有我的大部分邮件,因为它拥有你所有的邮件(2014)
Google has most of my email because it has all of yours (2014)
作者(2014年)分析了自己社交网络中的邮件往来数据,发现由于大多数联系人都在用 Gmail,Google 实际上能看到他与几乎所有人的通信内容——即使他自己不用 Gmail,隐…
安全与隐私上首页 4 次 · 2014–2025mako.cc