힐 Cipher
Free online Hill Cipher encrypt/decrypt tool. Based on matrix multiplication (2x2/3x3) classical polyalphabetic cipher, pure JS implementation.
사용법
기능
- Hill 密码:1929 年 Lester Hill 提出的矩阵加密,多表替换密码
- 支持 2x2 / 3x3 密钥矩阵(2x2 输入 4数,3x3 输入 9数)
- 加密:C = K × P mod 26(明文列向量乘密钥矩阵)
- 解密:P = K⁻¹ × C mod 26(密钥矩阵求逆 mod 26)
- 非 A-Z 字符被忽略,长度不是矩阵阶数倍数时末尾补 X
활용 사례
- 输入 2x2 矩阵示例:"3 3 2 5" 对应 [[3,3],[2,5]]
- HELLO 加密([[3,3],[2,5]])→ HECCF(经典示例)
- 密钥矩阵需在 mod 26 下可逆(det 与 26 互质)
나이nt API 사용법
This tool is pure frontend,Data is processed in the browser,never sent to a server。
manifest 中 api_url 为空,
/api/hill_cipher/ endpoint does not exist(返回 404)。
Agent 请读取 schema.json 理解字段,Please execute the tool logic in the browser first。
// Step 1: 读取工具 Schema GET https://clawam.com/tools/hill_cipher/schema.json // Step 2: 在浏览器中执行工具逻辑 // Hill 密码 在工具页 JS 中实现