assignmentutor™您的专属作业导师

assignmentutor-lab™ 为您的留学生涯保驾护航 在代写密码学cryptography theory方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写密码学cryptography theory代写方面经验极为丰富，各种代写密码学cryptography theory相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 数学代写|密码学代写cryptography theory代考|Types of S-Boxes

The first issue to discuss is that s-boxes can be divided into two types. These two types are substitution boxes and permutation boxes. A substitution box simply substitutes input bits for output bits. A permutation box transposes the bits. It is often the case that cryptologists simply refer to an “s-box” possibly meaning either type.

Let us first consider a simple 3-bit s-box. This s-box simply performs substitution. Each 3 bits of input are mapped with the 3 bits of output. This s-box is shown in Fig. 8.1. The first bit of input is on the left, the second two bits on the top. By matching those you will identify the output bits.

For example, an input of 110 would produce an output of 100 . An input of 100 would produce an output of 101 . This s-box is very simple and does not perform any transposition. The values of output were simply chosen at random. The other general type of s-box is the p-box or permutation box. A p-box is an s-box that transposes or permutes the input bits. It may, or may not, also perform substitution. You can see a p-box in Fig. 8.2.

Of course, in the process of permutation, the bit is also substituted. For example, if the least significant bit in the input is transposed with some other bit, then the least significant bit in the output is likely to have been changed. In the literature, you will often see the term s-box used to denote either a substitution box or a permutation box. This makes complete sense when you consider that, regardless of which type it is, one inputs some bits and the output is different bits. So, for the remainder of this chapter, we simply use the term s-box to denote either a substitution or permutation box.

Whether it is a simple s-box or a p-box there are three sub-classifications: straight, compressed, and expansion. A straight s-box takes in a given number of bits and puts out the same number of bits. This is the design approach used with the Rijndael cipher. This is frankly the easiest and most common form of s-box.

A compression s-box puts out fewer bits than it takes in. A good example of this is the s-box used in DES. In the case of DES, each s-box takes in 6 bits but only outputs 4 bits. However, keep in mind that in the DES algorithm there is a bit expansion phase earlier in the round function. In that case, the 32 input bits are expanded by 16 bits to create 48 bits. So, when 8 inputs of 6 bits each are put into each DES s-box, and only 4 produced, the difference is $16(8 \mathrm{X} 2)$. Therefore, the bits being dropped off are simply those that were previously added. You can see a compression s-box in Fig. 8.3.

The third type of s-box is similar compression s-box, it is the expansion s-box. The s-box puts out more bits than it takes in. One simple method whereby this can be accomplished is by simply duplicating some of the input bits. This is shown in Fig. 8.4.

There are significant issues associated with both compression and expansion s-boxes. The first issue is reversibility, or decryption. Since either type of s-box alters the total number of bits, reversing the process is difficult. One has to be very careful in the design of such an algorithm, or it is likely that decryption will not be possible. The second issue is a loss of information, particularly with compression s-boxes. In the case of DES, prior to the s-box, certain bits are replicated. Thus, what is lost in the compression step are duplicate bits and no information is lost.

## 数学代写|密码学代写cryptography theory代考|Strict Avalanche Criteria

Strict Avalanche Criteria (SAC) is an important feature of an s-box (Easttom $2018 \mathrm{a}$ ). Remember from Chap. 3 that avalanche is a term that indicates that when one bit in the plaintext is changed, multiple bits in the resultant ciphertext are changed. Consider the following example:
We begin with a plaintext 10110011
Then after applying our cipher we have this text 11100100.
But what if, prior to encrypting the plaintext, we change just one bit of the plaintext. For example, the third bit from the left we have 10010011.

In a cipher with no avalanche, the resulting ciphertext would only change by one bit, perhaps 11100101 . Note that the only difference between this ciphertext and the first ciphertext is the last or least significant bit. This shows that a change of 1 bit in the plaintext only changed 1 bit in the ciphertext. That is no avalanche. However, if our algorithm has some avalanche, then changing the plaintext from
10110011 to 10010011
will change more than one bit in the ciphertext. In this case, before the change in plaintext, remember our ciphertext was:
11100100
Now, if our cipher has some avalanche, we expect more than one bit in the ciphertext to change, perhaps two bits:

Notice the second and last bits are different. So, a change in one bit of the plaintext produced a change in two bits in the ciphertext. Ideally one would like to get more avalanche than this, as much as having a change in a single bit of plaintext change $1 / 2$ the ciphertext bits. Without some level of avalanche, a cryptanalyst can examine changes in input and the corresponding changes in output and make predictions about the key. It is therefore critical that any cipher exhibit at least some avalanche.

In most block ciphers, the primary way to achieve avalanche is the use of the s-box. Strict Avalanche Criteria is one way of measuring this phenomenon. Strict Avalanche Criteria requires that for any input bit, the output bit should be changed with a probability of $0.5$. In other words, if you change any given input bit, there is a $50 / 50$ chance that the corresponding output bit will change. One measurement of strict avalanche criteria is the Hamming weight. Remember from Chap. 3 that the Hamming weight of a specific binary vector, denoted by hwt( $\mathrm{x})$, is the number of ones in that vector. Therefore, if you have an input of 8 bits with 3 one’s and an output of 4 one’s, the Hamming weight of the output is 4 . Simply measuring the Hamming weight of the input and the output and comparing them will give one indication of whether or not SAC is satisfied. This is a simple test that one should subject any s-box too.

# 密码学代写

## 数学代写|密码学代写cryptography theory代考|Strict Avalanche Criteria

.

10110011更改为10010011

11100100

## 有限元方法代写

assignmentutor™作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

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

assignmentutor™您的专属作业导师
assignmentutor™您的专属作业导师