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

# 数学代写|密码学代写Cryptography Theory代考|Cipher Feedback mode

avatest™

## avatest™帮您通过考试

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

•最快12小时交付

•200+ 英语母语导师

•70分以下全额退款

## 数学代写|密码学Cryptography Theory代考|Cipher Feedback mode

An alternative way of providing message dependency is to use Cipher Feedback (CFB) mode. This has broadly similar properties to $\mathrm{CBC}$ mode, but is subtly different in the way it operates.
ENCRYPTION USING CFB MODE
There are several variants of CFB mode. The basic version of CFB mode encryption is illustrated in Figure 4.12. The CFB encryption process proceeds as follows:

1. Put an initialisation vector (IV) into the top register. As in $\mathrm{CBC}$ mode, the $\mathrm{IV}$ has to be known by the sender and receiver (see Section 4.6.2 for a discussion of how this could be facilitated).
2. Encrypt the contents of the top register with the key, and place the result in the bottom register. Note, however, even though we have just performed encryption using the block cipher:
• the ‘plaintext’ block we have just encrypted was not the real plaintext we are trying to encrypt (we have not used this yet); and
• the ‘ciphertext’ block we have just produced is not the final ciphertext (clearly it cannot be, since it was not computed using the real plaintext block).
1. Take the first plaintext block $P_1$ and XOR this to the contents of the bottom register. The result of this is $C_1$, our first block of ciphertext.
2. Send $C_1$ to the receiver, and replace the contents of the top register with $C_1$. We have just fed back the ciphertext!
3. Now repeat from step 2. In other words, encrypt the contents of the top register (which now contains $C_1$ ) with the key; place the result in the bottom register; take the next plaintext block $P_2$, and XOR this to the contents of the bottom register to obtain the next block of ciphertext $C_2$; send $C_2$ to the receiver, and replace the contents of the top register with $C_2$. Continue in this manner until the last plaintext block has been XORed to the contents of the bottom register and passed on to the receiver.

## 数学代写|密码学Cryptography Theory代考|Counter mode

The last of the modes of operation we will describe in full is Counter (CTR) mode.
ENCRYPTION AND DECRYPTION USING CTR MODE
Counter mode can be thought of as a counter-based version of CFB mode without the feedback. The main difference is that we assume both the sender and receiver have access to a reliable counter, which computes a new shared value each time a ciphertext block is exchanged. This shared counter is not necessarily a secret value, but both sides must keep the counter synchronised. Both encryption and decryption in CTR mode are depicted in Figure 4.14.

Encryption can proceed as follows:

1. The initial value in the top register is the initial counter value. This value is the same for both the sender and the receiver and plays the same role as the IV in CFB (and CBC) mode.
2. As in CFB mode, encrypt the contents of the top register (the counter value) with the key, and place the result in the bottom register.
3. As in CFB mode, take the first plaintext block $P_1$, and XOR this to the contents of the bottom register. The result of this is $C_1$, our first block of ciphertext.
4. Send $C_1$ to the receiver and update the counter, placing the new counter value into the top register (thus, the counter update replaces the ciphertext feedback in CFB mode). Now repeat from step 2. Continue in this manner until the last plaintext block has been XORed to the contents of the bottom register and passed on to the receiver. (In fact, this entire process can be parallelised, as we will shortly discuss.)

Thus, CTR mode does not have message dependency (a ciphertext block does not depend on the previous plaintext blocks), but it does have positional dependency since a ciphertext block depends on the position of the current plaintext block within the message.
Decryption, which is similar to encryption, proceeds as follows:

1. Start by placing the initial counter value in the top register.
2. As in CFB mode, encrypt the contents of the top register (the counter value) with the key, and place the result in the bottom register.
3. As in CFB mode, take the first ciphertext block $C_1$, and XOR this to the contents of the bottom register. The result of this is $P_1$, our first block of plaintext.
4. Update the counter, placing the new counter value in the top register.
5. Now repeat from step 6. Continue in this manner until the last ciphertext block has been XORed to the contents of the bottom register to generate the last plaintext block.

## 数学代写|密码学Cryptography Theory代考|Cipher Feedback mode

CFB模式有几种变体。CFB模式加密的基本版本如图4.12所示。CFB加密过程如下:

## MATLAB代写

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