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

# 数学代写|密码学代写Cryptography Theory代考|CS355 Hash Functions and Passwords

avatest™

## avatest™帮您通过考试

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

•最快12小时交付

•200+ 英语母语导师

•70分以下全额退款

## 数学代写|密码学Cryptography Theory代考|Hash Functions and Passwords

Hash functions have applications other than allowing for quicker digital signatures. Passwords should never be stored on a computer, but there needs to be a way to tell if the correct password has been entered. This is typically done by hashing the password after it is entered and comparing the result with a value that is stored. Because computing any preimage should be difficult for a good hash function, someone gaining access to the hashed values shouldn’t be able to determine the passwords.

In the first edition of this book, I wrote, “The important idea of storing the password in a disguised form doesn’t seem to be strongly associated with anyone. Somebody had to be first to hit on this idea, but I haven’t been able to learn who.” After quoting what was clearly an incorrect account of this innovation from Wikipedia, I wrote, “Anyone who can provide a definitive first is encouraged to contact me!” I soon heard from Steven Bellovin (see Section 2.12). He wrote:
While visiting Cambridge (my 1994 visit, I think), I was told by several people that Roger Needham had invented the idea. I asked him why he had never claimed it publicly; he said that it was invented at the Eagle Pub – then the after-work gathering spot for the Computer Laboratory – and both he and the others present had had sufficiently much India Pale Ale that he wasn’t sure how much was his and how much was anyone else’s… ${ }^{18}$

## 数学代写|密码学Cryptography Theory代考|The Digital Signature Algorithm

The Digital Signature Algorithm, abbreviated DSA, is a modified version of the Elgamal signature scheme. It was proposed by the National Institute of Standards and Technology (NIST) in 1991, and became part of the Digital Signature Standard (DSS) in $1994 .{ }^{34}$ It works as follows:

Randomly generate a prime $q$ with at least 160 bits. Then test $n q+1$ for primality, where $n$ is a positive integer large enough to give the desired level of security. If $n q+1$ is prime, move on to the next step; otherwise, pick another prime $q$ and try again. ${ }^{35}$

We then need an element $g$ of order $q$ in the multiplicative group modulo $p$. This element can be found quickly by computing $g=h^{(p-1) / q}(\bmod p)$, where $h$ is an element of maximal order (a primitive root) modulo $p$. As in Elgamal, another secret value, $s$, must be chosen, and then we calculate $v=g^s(\bmod p) ; p, q, g$, and $v$ are made public, but $s$ is kept secret.

Signing a message consists of calculating two values, $S_1$ and $S_2$. The calculation for $S_2$ requires the hash of the message to be signed and the value of $S_1$. On the other hand, the calculation of $S_1$ doesn’t depend on the message. Thus, $S_1$ values can be created in advance, before the messages exist, to save time. Each $S_1$ does require, though, that we pick a random value $k$ between 1 and $q-1$. We have
$$S_1=\left(g^k(\bmod p)\right)(\bmod q) \text { and } S_2=k^{-1}\left(\operatorname{hash}(M)+s S_1\right)(\bmod q)$$
The inverse of $k$, needed for $S_2$, is calculated $(\bmod q)$. The two values $S_1$ and $S_2$ constitute the signature for message $M$, and are sent with it.
To verify that a signature is genuine, we compute the following
\begin{aligned} & U_1=S_2^{-1} \operatorname{hash}(M)(\bmod q) \ & U_2=S_1 S_2^{-1}(\bmod q) \ & V=\left(g^{U_1} v^{U_2}(\bmod p)\right)(\bmod q) \end{aligned}

## 数学代写|密码学Cryptography Theory代考|The Digital Signature Algorithm

$$S_1=\left(g^k(\bmod p)\right)(\bmod q) \text { and } S_2=k^{-1}\left(\operatorname{hash}(M)+s S_1\right)(\bmod q)$$

$$U_1=S_2^{-1} \operatorname{hash}(M)(\bmod q) \quad U_2=S_1 S_2^{-1}(\bmod q) V=\left(g^{U_1} v^{U_2}(\bmod p)\right)(\bmod q)$$

## MATLAB代写

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