# 数学代写|密码学作业代写Cryptography代考|Properties of a hash function

#### Doug I. Jones

Lorem ipsum dolor sit amet, cons the all tetur adiscing elit

couryes™为您提供可以保分的包课服务

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

## 数学代写|密码学作业代写Cryptography代考|Properties of a hash function

A hash function is a mathematical function (in other words, a process for converting a numerical input value into a numerical output value) which has two important practical properties and three security properties. Before we review these properties, it is important to appreciate the following:
Hash functions do not have a key. The security properties of a hash function are all provided without the hash function using a key. In this respect, they are unusual cryptographic primitives. Note that the term keyed hash function is sometimes used for a message authentication code, which we will discuss in Section 6.3.

Hash functions are publicly computable. We always assume an attacker knows the details of a hash function. Just as for encryption algorithms, this is the safest security assumption, for all the same reasons we discussed in Section 1.5.3. Since hash functions do not involve a secret key, this means anyone (in particular an attacker) can compute a valid hash for any input value.
PRACTICAL PROPERTY 1: COMPRESSES ARBITRARY LONG INPUTS INTO AFIXED LENGTH OUTPUT
What this means is that regardless of how much data is input, a hash function generates an output (or hash) which is always the same fixed length. This process of applying the hash function to the input data is often referred to as hashing the data. In general, this hash is much smaller than the data input to the hash function. Thus, a hash function performs the useful task of compressing data. Functions with this property are sometimes called compression functions. Because a hash is a small piece of data representing a larger piece of data, it is sometimes referred to as a digest, and the hash function referred to as a message digest function.

Most of the hash functions we are likely to come across in cryptography convert binary inputs into binary outputs. If the binary output of a particular hash function is $n$ bits long, then we refer to the hash function as an $n$-bit hash function. Popular practical values for $n$ lie between 160 and 512 bits (we discuss this issue further in Section 6.2.3).

An immediate consequence of the fact the output of a hash function is (much) smaller than the input is that for any given hash there are likely to be many inputs which compress to the same hash value. To see this is true, consider PINs for payment cards. The process of taking a client’s personal information (name, address, bank details) and using a PIN derivation function to generate from this a four-digit PIN is a good example of a compression function. In practice, a PIN derivation function may or may not be a hash function (see, for example, Section 10.6), but it must be a compression function. If a country has 60 million bank users and PINs consist of only four digits (a maximum of 10 000 different PINs), then there will be many people who end up with the same PIN. If we do this process randomly, then, on average, there will be 6000 people with the same PIN.

## 数学代写|密码学作业代写Cryptography代考|Applications of hash functions

We now look at three examples of applications of hash functions, each one requiring a different security property.
APPLICATION REQUIRING PREIMAGE RESISTANCE
Hash functions provide a simple, and widely adopted, way of implementing password storage protection. The idea is to store the passwords in a password file in ‘disguised’ form so they can be checked, yet anyone who gains access to the password file (including perhaps the system administrator) cannot recover the passwords themselves. In this application, a hash function is used to provide an unusual type of confidentiality for stored data. The unusual aspect is that the data itself (the password) never needs to be recovered. As a result, this type of confidentiality can be provided by a cryptographic primitive which does not use a key.

In advance of a logon attempt, a user’s identity $I$ is stored in the password file, next to the result of passing the user’s password $P$ through a hash function $h$. In other words, the password file consists of a table of pairs of the form $(I, h(P))$. Note the passwords themselves are not stored in the password table.

The password-based logon process, which we discuss at greater length in Section 8.4, for a user attempting to access resources on a device is depicted in Figure 6.2 and operates as follows:

1. The user enters an identity / when prompted by the logon screen.
2. The user enters a password $P$ when prompted by the logon screen.
3. The authentication application running on the device inputs the password $P$ to the hash function and computes $h(P)$.
4. The authentication application running on the device looks up the table entry in the password file corresponding to identity $I$ and compares the stored value of the hashed password with the value $h(P)$ it has just calculated in step 3 . If the entries match, then the user is authenticated. Otherwise the user is rejected.

# 密码学代写

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于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 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。

Days
Hours
Minutes
Seconds

# 15% OFF

## On All Tickets

Don’t hesitate and buy tickets today – All tickets are at a special price until 15.08.2021. Hope to see you there :)