Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

你好,仿射密码破解这部分有个公式我不太理解。
文中提到:
通过:
y1 = (ax1 + b) mod 26 ①
y2 = (ax2 + b) mod 26 ②
①-②可以得到公式:y1 - y2 = (a(x1-x2)) mod 26
但是对于上述推导,如果:
1 = 6 % 5
2 = 12 % 5
1 - 2 ≠ (6-12)mod 5
应该是:(y1 - y2)mod 26 = (a(x1-x2)) mod 26
是否还有其他约束条件我没注意

You must be logged in to vote

Replies: 1 comment · 2 replies

Comment options

@HinataYiacc 这两个在模意义下是相等的。
1 - 2 = -1 = -1+5 = 4 mod 5
6-12 = -6 = -6 + 2*5 = 4 mod 5

You must be logged in to vote
2 replies
@HinataYiacc
Comment options

原网页写的是“两式相减可得 y1 - y2 = (a(x1-x2)) mod 26 ”,感觉左式漏写了一个“mod 26”~

@iromise
Comment options

欢迎 PR 修改,可能改成同余符号更好一些。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.