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

# 数学代写|密码学代写Cryptography Theory代考|Cell Phone Stream Cipher A5/1

avatest™

## avatest™帮您通过考试

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

•最快12小时交付

•200+ 英语母语导师

•70分以下全额退款

## 数学代写|密码学Cryptography Theory代考|Cell Phone Stream Cipher A5/1

There are several ways to strengthen LFSRs. One is to remove the linearity constraint and use other methods of combining elements in the register, such as multiplication. Another approach is to combine LFSRs, as in the following cell phone cipher designed in 1987, which is shown in Figure 19.2.

Figure 19.2 indicates that the $\mathrm{A} / 1$ stream cipher consists of three linear feedback shift registers. The first XORs the bits in positions $13,16,17$, and 18 to get a new bit, which is then placed at the end, forcing all of the bits to shift one position to the left. The last bit, formerly in position 18, shifts off the register and is XORed with bits from the other two LFSRs to finally provide the bit that is XORed with the message to yield a bit of ciphertext.

Because all three LFSRs must be seeded, the key is $19+22+23=64$ bits long. Notice that we count the bit in position 0 for each LFSR, along with the rest. Each of the three LFSRs has a length that is relatively prime to the lengths of the others. This would generate a period that’s the product of all three. However, there’s another feature that lengthens the period. Notice that the diagram for $\mathrm{A} 5 / 1$ has bits labeled in positions 8,10 , and 10 . These are called clocking bits. In each cycle, the bits in the clocking positions are examined. Because there is an odd number of clocking bits, there must be either more 1 s than 0 s or more 0 s than 1 s in these positions. The registers that have the more popular bit in their clocking positions advance. If all three bits match, all of the registers advance.

In defiance of Kerckhoffs’s rules, the algorithm provided above was kept secret, while it was being placed in over 100 million cell phones. In compliance with Kerckhoffs’s rules the public learned it anyway! It was part of the Global System for Mobile Communications (GSM) cellphone standard. Various attacks have made it clear that the system is insecure. Details may be found in the papers in the References and Further Reading list at the end of this chapter.

A5/2 made use of four LFSRs that advance in an irregular manner, like those of A5/1. Although this might make $A 5 / 2$ sound stronger than $A 5 / 1$ (4 is bigger than 3 , right?), it isn’t. It was purposely made weaker, intended for use in certain countries, while Americans and Europeans used the stronger A5/1. A5/2 was made public in August 1999, and before the month ended, Ian Goldberg, David A. Wagner, and Lucky Green broke it. ${ }^8$ For details, see the References and Further Reading section at the end of this chapter.

## 数学代写|密码学Cryptography Theory代考|RC4

RC4 (Rivest Cipher 4), designed by Ron Rivest in 1987, was a very popular stream cipher. Again, in denial of Kerckhoff’s laws, the details of this cipher were kept secret and could only be obtained by signing a nondisclosure agreement with RSA Data Security Inc. In September 1994, however, the source code was anonymously posted to the Cypherpunks mailing list.’
The cipher starts off with a list of all 8-bit numbers, in order. These bytes are
$$\begin{gathered} S_0=00000000 \ S_1=00000001 \ S_2=00000010 \ S_3=00000011 \ S_4=00000100 \ S_5=00000101 \ \vdots \ S_{255}=1111111 . \end{gathered}$$
Each $S_i$ is just the binary expression for the base-10 number $i$.

These bytes are then shuffled so that their new order appears random. To do this, another set of 256 bytes is initialized using the key. The key may be any length up to 256 bytes. At the low end, there are attacks that can break RC4 if the key is just 40 bits.

Whatever length key is selected, we simply split it into bytes and label them $K_0, K_1, K_2, K_3, \ldots$ $K_{255}$. If we reach the end of our key before we fill 256 bytes, we continue filling bytes using our key over again, from the start. For example, if our key was only 64 bytes long, we’d have to lay it end to end four times in order to have enough bytes to fill $K_0$ through $K_{255}$. The shuffling of the $S_i$ is then carried out by the following loop:
\begin{aligned} & j=0 \ & \text { for } i=0 \text { to } 255 \ & \qquad j=\left(j+S_i+K_i\right)(\bmod 256) \end{aligned}
Swap $S_i$ and $S_j$
next $i$

## 数学代写|密码学Cryptography Theory代考|Cell Phone Stream Cipher A5/1

$\mathrm{A} 5 / 2$ 与 $\mathrm{A} 5 / 1$ 一样，利用了 4 个不规则推进的 LFSR。虽然伩可能使 $A 5 / 2$ 听起来比 $A 5 / 1$ ( 4 大于 3 ，对吧?），它不是。它被故意做得更弱，用于某些国家，而美国人和欧洲人使用更强的 $A 5 / 1$ 。 A5/2 于 1999 年 8 月公开，在月底之前， Ian Goldberg、David A. Wagner 和 Lucky Green 破 解了它。 ${ }^8$ 有关详细信息，请参阅本章末尾的参考资料和进一步阅读部分。

## 数学代写|密码学Cryptography Theory代考|RC4

RC4 (Rivest Cipher 4) 由 Ron Rivest 于 1987 年设计，是一种非常流行的流密码。同样，在否认 Kerckhoff 定律的情况下，该密码的详细信息被保密，并且只能通过与 RSA Data Security Inc. 签 署保密协议才能获得。然而，1994 年 9 月，源代码被匿名发布到 Cypherpunks 邮件列表。 密码以所有 8 位数字的列表开始，按顺序排列。这些字节是
$$S_0=00000000 S_1=00000001 S_2=00000010 S_3=00000011 S_4=00000100 S_5=00000101: S_{255}=111111$$

$$j=0 \quad \text { for } i=0 \text { to } 255 \quad j=\left(j+S_i+K_i\right)(\bmod 256)$$

$$\text { 下一个 } i$$

## MATLAB代写

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