Posted on Categories:Cryptography, 密码学, 数学代写

# 数学代写|密码学代写Cryptography代考|CS/ECE407 Playfair Cryptanalysis

avatest™

## avatest™帮您通过考试

avatest™的各个学科专家已帮了学生顺利通过达上千场考试。我们保证您快速准时完成各时长和类型的考试，包括in class、take home、online、proctor。写手整理各样的资源来或按照您学校的资料教您，创造模拟试题，提供所有的问题例子，以保证您在真实考试中取得的通过率是85%以上。如果您有即将到来的每周、季考、期中或期末考试，我们都能帮助您！

•最快12小时交付

•200+ 英语母语导师

•70分以下全额退款

## 数学代写|密码学代写CRYPTOGRAPHY代考|Playfair Cryptanalysis

The unicity point for a Playfair cipher is $22.69$ letters, so a message longer than this should have a unique solution. ${ }^{25}$ Sir George Aston issued the following 30-letter Playfair as a challenge. ${ }^{26}$
BUFDA GNPOX IHOQY TKVQM PMBYD AAEQZ
Alf Mongé solved it (by hand) in the following manner. ${ }^{27}$ Splitting the ciphertext into pairs and numbering the pairs for easy reference, we have:
$\begin{array}{llllllllllllllll}1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 \ \mathrm{BU} & \mathrm{FD} & \mathrm{AG} & \mathrm{NP} & \mathrm{OX} & \mathrm{IH} & \mathrm{OQ} & \mathrm{YT} & \mathrm{KV} & \mathrm{QM} & \mathrm{PM} & \mathrm{BY} & \mathrm{DA} & \mathrm{AE} & \mathrm{QZ}\end{array}$
Indicating the pairs $\mathrm{OQ}$ and $\mathrm{QM}$ in positions 7 and 10 , Mongé pointed out that $\mathrm{O}$ and $\mathrm{Q}$ are close to each other in a straight alphabet, as are $Q$ and $M$. Looking for two other high frequency digraphs with letters that are close to each other in the alphabet and have a letter in common between the pairs, Mongé came up with NO and OU. (He did not say how many other possibilities he tried first!) The proposed ciphertext/plaintext pairings would arise from the following square.

$\begin{array}{rrrrr}1 & 2 & 3 & 4 & 5 \ 6 & 7 & 8 & 9 & 10 \ 11 & 12 & 13 & 14 & 15 \ \mathrm{M} & \mathrm{N} & \mathrm{O} & \mathrm{Q} & \mathrm{U} \ \mathrm{V} & \mathrm{W} & \mathrm{X} & \mathrm{Y} & \mathrm{Z}\end{array}$
Thus, Mongé determined $40 \%$ of the square already! Returning to the ciphertext, he filled in as much as he could, indicating multiple possibilities where they existed and were not too numerous.
Which letters do you think would make the best choices for positions 8 and 9 ? Think about it for a minute before reading the answer below!

## 数学代写|密码学代写CRYPTOGRAPHY代考|Computer Cryptanalysis

In 2008, a paper by Michael Cowan described a new attack against short (80-120 letters) Playfair ciphers. ${ }^{30}$ This attack has nothing in common with Mongé’s approach. In fact, it would be completely impractical to try to implement Cowan’s attack by hand; however, with the benefit of the computer, it is a very efficient approach. It’s important to note that Cowan’s attack doesn’t assume the key is based on a word. The order of the letters in the enciphering square may be random. Cowan’s approach was to use simulated annealing, which is a modification of hill climbing.
In hill climbing, we start by guessing at a solution (be it a substitution alphabet for a monoalphabetic substitution cipher or a key for a Playfair cipher). Then we make a change to the guess (switch a few letters around, for example). The original guess and the new slightly changed guess are compared. Some method of scoring assigns a value to each, based on how close they are to readable messages in whatever language is expected. Scoring can be done, for example, by summing the frequencies of the individual letters or digraphs. We keep whichever guess, the original or the modified, scores higher and discard the other. Then we make another small change and compare again. This process is repeated thousands of times, which is why it is not practical to do by hand. The idea is that the scores continue to climb until we get to the top, where the correct solution is found.

The analogy of physically climbing a real hill allows us to see how this method can fail. Suppose we seek to get to the highest point in our neighborhood. Taking random steps and only backtracking if we do not ascend in that particular direction seems like a good idea, but we could end up at the top of a small hill from which we can see a higher peak but cannot get there, as a step in any direction will take us downhill. In mathematical lingo, we have found a local (or relative) max, but not the global (or absolute) max.

Simulated annealing provides an opportunity to escape from local maxima and make it to the global maximum by only moving in the uphill direction (to a higher scoring guess) with a certain probability. That is, after scoring two guesses, we might move to the lower scoring guess $40 \%$ of the time. This percentage is known as the temperature of the process. The temperature is lowered slowly over the course of tens of thousands of modifications. The name simulated annealing makes an analogy with the annealing process in metallurgy in which a metal is heated to a specific temperature and then slowly cooled to make it softer.

Cowan’s changes to the key, for the purpose of comparing the resulting scores, consisted of a mix of row swaps, column swaps, and individual letter swaps, as well as the occasional flip of the square around the NE-SW axis. For scoring, he found tetragraph frequencies worked best.

## 数学代写|密码学代写CRYPTOGRAPHY代考|Playfair Cryptanalysis

Playfair密码的唯一性点是$22.69$字母，因此长于此值的消息应该有唯一解。${ }^{25}$乔治·阿斯顿爵士发布了以下30个字母的Playfair作为挑战。${ }^{26}$
BUFDA GNPOX IHOQY TKVQM PMBYD AAEQZ
Alf Mongé用以下方法(手工)解决了它。${ }^{27}$将密文分成对并编号以方便参考，我们有:
$\begin{array}{llllllllllllllll}1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 \ \mathrm{BU} & \mathrm{FD} & \mathrm{AG} & \mathrm{NP} & \mathrm{OX} & \mathrm{IH} & \mathrm{OQ} & \mathrm{YT} & \mathrm{KV} & \mathrm{QM} & \mathrm{PM} & \mathrm{BY} & \mathrm{DA} & \mathrm{AE} & \mathrm{QZ}\end{array}$

$\begin{array}{rrrrr}1 & 2 & 3 & 4 & 5 \ 6 & 7 & 8 & 9 & 10 \ 11 & 12 & 13 & 14 & 15 \ \mathrm{M} & \mathrm{N} & \mathrm{O} & \mathrm{Q} & \mathrm{U} \ \mathrm{V} & \mathrm{W} & \mathrm{X} & \mathrm{Y} & \mathrm{Z}\end{array}$

## 数学代写|密码学代写CRYPTOGRAPHY代考|Computer Cryptanalysis

2008年，Michael Cowan的一篇论文描述了一种针对短(80-120个字母)Playfair密码的新攻击。${ }^{30}$这种攻击与Mongé的方法毫无共同之处。事实上，试图手动实现Cowan的攻击是完全不切实际的;然而，有了计算机的好处，这是一种非常有效的方法。值得注意的是，Cowan的攻击并没有假设密钥是基于一个单词。加密方块中字母的顺序可能是随机的。考恩的方法是使用模拟退火，这是对爬坡的一种改进。在爬山时，我们从猜测一个解开始(它可能是一个单字母替换密码的替换字母或一个Playfair密码的密钥)。然后我们对猜测进行更改(例如，调换几个字母)。对原猜想和略有变化的新猜想进行了比较。一些评分方法根据它们与期望的任何语言的可读消息的接近程度为它们分配一个值。例如，可以通过将单个字母或有向图的频率相加来进行评分。我们保留其中一个猜测，原始的或修改过的，得分较高，而丢弃另一个。然后我们再做一个小的改变，再次进行比较。这个过程要重复成千上万次，这就是为什么用手来做是不实际的。我们的想法是，分数会不断攀升，直到我们到达顶端，在那里我们找到了正确的答案

Cowan对键的更改，为了比较结果的分数，包括混合行交换、列交换和单个字母交换，以及偶尔围绕NE-SW轴翻转正方形。对于评分，他发现四次频率效果最好

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。