essay | tech | year-summary | about

返回上级菜单

Post‑Quantum Cryptography


日期:2026-02-20T01:21:31+08:00

起初是我在连接我的服务器的时候,突然给出了提示。

WARNING: connection is not using a post-quantum key exchange algorithm. This session may be vulnerable to “store now, decrypt later” attacks. The server may need to be upgraded. See https://openssh.com/pq.html

我才发现我是老东西了,几年前还在看量子编程的书,看起来稍微起了点作用的时候了(概念上)。

查了一下

OpenSSH 版本 后量子密钥交换支持 默认使用情况
9.0(2022) 支持混合 PQC (sntrup761x25519‑sha512) 可协商,但非所有客户端都支持
9.9(2024) 新增 mlkem768x25519‑sha256 可协商
10.0+(2025) mlkem768x25519‑sha256 默认 默认,优先于传统算法

看起来先确定一下ssh的版本

ssh -V

ssh -Q kex 来看一下当前ssh支持的算法。

升级一下Debian系统吧,估计老古董Debian的ssh版本不会很高。
查了一下,意外的Debian13已经支持到ssh10了。

https://debian.pkgs.org/13/debian-main-arm64/openssh-client_10.0p1-7_arm64.deb.html
https://debian.pkgs.org/13/debian-main-arm64/openssh-server_10.0p1-7_arm64.deb.html

那迟到的50系显卡的driver支持是怎么回事....算了还是linus的选择Fedora比较香。

把windows的ssh也升级一下

scoop install main/openssh

Windows 10 or higher includes this build of OpenSSH in the system itself, hence it is recommended to use the system OpenSSH there.

这奇怪的警示是什么意思....🤔算了,改一下path好了。注意系统的path优先级似乎高于user的path。

使用 ssh -vvv user@host 测试一下

debug1: kex: algorithm: mlkem768x25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none

跟之前的对比

debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none

大功告成。有数学好的人帮忙托底就是舒服。