Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
codecrypt — 后量子密码学工具(本仓库仅是主仓库的镜像,请勿在此提交问题) | Kitploit
工具/GitHubGitHub/exaexa/codecrypt
加密/解密工具密码学隐私保护论文与研究
GitHubexaexa/codecrypt

codecrypt

后量子密码学工具(本仓库仅是主仓库的镜像,请勿在此提交问题)

查看仓库网站
3254243年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

Codecrypt

后量子密码学工具。

Codecrypt 目前不再维护,不过我至今仍在使用它。如果你有兴趣开发/维护它,请联系我。

关于

这是一个类似 GnuPG 的 Unix 程序,用于加密和签名,仅使用抗量子计算机的算法:

  • McEliece 密码系统(紧凑型 QC-MDPC 变体)用于加密
  • 基于哈希的 Merkle 树算法(FMTSeq 变体)用于数字签名

Codecrypt 是自由软件。代码以 LGPL3 条款授权,希望这能使其更容易与其他工具组合使用。

为什么选择这个?

去读读 http://pqcrypto.org/

链接

  • 信息页:http://e-x-a.org/codecrypt/
  • 软件包下载:http://e-x-a.org/codecrypt/files/

发行版软件包

  • Gentoo 软件包:https://packages.gentoo.org/packages/app-crypt/codecrypt 当前 ebuild 通常可在 http://e-x-a.org/codecrypt/files 获取
  • Debian 软件包:apt-get install codecrypt
  • Arch Linux:参见 https://aur.archlinux.org/packages/codecrypt/
  • Windows 移植版在此单独维护:https://github.com/mike805/codecrypt-win32

语言封装:

  • Python 绑定:https://github.com/mike805/codecrypt-python/

文档

软件包附带了一份完整的 UNIX 风格手册页。你可以在此在线查看:http://e-x-a.org/codecrypt/ccr.1.html

所用密码学概述

为实现既定目标,codecrypt 使用了大量(传统但“量子安全”的)密码学原语。原语的选择基于设计的易审计性、简洁性以及所提供的安全性。

codecrypt 的 git 仓库中包含 doc/papers,里面有一堆未分类的、关于相关主题的学术论文和幻灯片。

使用的流密码:

  • ChaCha20,djb 的推荐选择
  • XSynd 流密码,一个有趣且非传统的候选方案,同样基于编码理论的假设;所使用的 NUMS(它需要大量 NUMS)在仓库的 doc/nums 目录中有说明。
  • Arcfour 最初因其实现简单而采用。在最近的统计攻击之后,我不能再推荐使用任何 RC4 变体;但所提供的填充以及 codecrypt 的“仅离线”使用方式使其使用基本保持安全。

使用的 CRHF:

  • 选择 Cubehash 变体是因为实现容易、设计非常简洁、速度相当不错以及参数选择灵活。当 Crypto++ 库未与 codecrypt 链接时,这也是唯一可用的哈希选项。KeyID 是相应序列化公钥的 CUBE256 哈希。
  • ripemd128 用于短哈希
  • tiger192 用作 Cubehash 的替代方案,用于 192 位哈希
  • 始终提供带有 SHA-256、SHA-384 或 SHA-512 的变体。

签名算法:

  • FMTSeq,支持上述 CRHF 的多种可能性和组合
  • SPHINCS256 支持计划在下一版本中提供

加密算法:

  • 基于准循环矩阵的 MDPC McEliece。该实现使用了一些技巧来加速(相当慢的)循环矩阵乘法(此版本中最值得注意的是 libfftm3)。对于使用 Fujisaki-Okamoto 方案的填充,该密码需要流密码和 CRHF;所使用的密码和 CRHF 在算法名称中指定——例如 MCEQCMDPC128FO-CUBE256-CHACHA20 表示参数经过调整以提供 128 位安全性,使用 CUBE256 哈希和 ChaCha20 流密码。
  • 准二元(Quasi-dyadic)McEliece 曾作为原始算法包含在 codecrypt 中,但现在已被攻破,任何使用都会打印一条警告消息。

注意事项:

密码学不适用于“在线”使用,因为某些算法(尤其是 MDPC 解码)(稍微)容易受到时序攻击。

快速入门

一切的设计理念是使其工作方式大致类似于 GnuPG,但留有良好的简洁性余量。让我们用随机数据来玩玩!

root@kitploit:~
ccr -g help
ccr -g sig --name "John Doe"    # your signature key
ccr -g enc --name "John Doe"    # your encryption key

ccr -K  #watch the generated keys
ccr -k

ccr -p -a -o my_pubkeys.asc -F Doe  # export your pubkeys for friends

#(now you should exchange the pubkeys with friends)

#see what people sent us, possibly check the fingerprints
ccr -inaf < friends_pubkeys.asc

#import Frank's key and rename it
ccr -ia -R friends_pubkeys.asc --name "Friendly Frank"

#send a nice message to Frank (you can also specify him by @12345 keyid)
ccr -se -r Frank < Document.doc > Message_to_frank.ccr

#receive a reply
ccr -dv -o Decrypted_verified_reply.doc <Reply_from_frank.ccr

#rename other's keys
ccr -m Frank -N "Unfriendly Frank"

#and delete pukeys of everyone who's Unfriendly
ccr -x Unfri

#create hashfile from a large file
ccr -sS hashfile.ccr < big_data.iso

#verify the hashfile
ccr -vS hashfile.ccr < the_same_big_data.iso

#create (ascii-armored) symmetric key and encrypt a large file
ccr -g sha256,chacha20 -aS symkey.asc
ccr -eaS symkey.asc -R big_data.iso -o big_data_encrypted.iso

#decrypt a large file
ccr -daS symkey.asc <big_data_encrypted.iso >big_data.iso

#password-protect all your private keys
ccr -L

#protect a symmetric key using another symmetric key
ccr -L -S symkey1 -w symkey2

#password-protect symkey2 with a custom cipher
ccr -L -S symkey2 -w @xsynd,cube512

选项参考

为完整起见,我在此列出所有选项(也可通过 ccr --help 获取)

root@kitploit:~
Usage: ./ccr [options]

Common options:
 -h, --help     display this help
 -V, --version  display version information
 -T, --test     perform (probably nonexistent) testing/debugging stuff

Global options:
 -R, --in      set input file, default is stdin
 -o, --out     set output file, default is stdout
 -E, --err     the same for stderr
 -a, --armor   use ascii-armored I/O
 -y, --yes     assume that answer is `yes' everytime

Actions:
 -s, --sign     sign a message
 -v, --verify   verify a signed message
 -e, --encrypt  encrypt a message
 -d, --decrypt  decrypt an encrypted message

Action options:
 -r, --recipient    encrypt for given user
 -u, --user         use specified secret key
 -C, --clearsign    work with cleartext signatures
 -b, --detach-sign  specify file with detached signature
 -S, --symmetric    enable symmetric mode of operation where encryption
		    is done using symmetric cipher and signatures are
		    hashes, and specify a filename of symmetric key or hashes

Key management:
 -g, --gen-key        generate keys for specified algorithm
 -g help              list available cryptographic algorithms
 -k, --list           list the contents of keyring
 -K, --list-secret
 -i, --import         import keys
 -I, --import-secret
 -p, --export         export keys
 -P, --export-secret
 -x, --delete         delete matching keys
 -X, --delete-secret
 -m, --rename         rename matching keys
 -M, --rename-secret
 -L, --lock           lock secrets
 -U, --unlock         unlock secrets

Key management options:
 -F, --filter       only work with keys with matching names
 -f, --fingerprint  format full key IDs nicely for human eyes
 -N, --name         specify a new name for renaming or importing
 -n, --no-action    on import, only show what would be imported
 -w, --with-lock    specify the symmetric key for (un)locking the secrets
 -w @SPEC           ask for password and expand it to a symmetric key
                    of type SPEC for (un)locking the secret

免责声明

Codecrypt 会吃掉数据。请谨慎使用。阅读 F 手册。

作者是自学成才的密码学家。

下载工具