Verilog Implementation of SHA 256 ALGORITHM

Slides:



Advertisements
Similar presentations
Hash Functions A hash function takes data of arbitrary size and returns a value in a fixed range. If you compute the hash of the same data at different.
Advertisements

Lecture 5: Cryptographic Hashes
Lecture 7 Overview. Advanced Encryption Standard 10, 12, 14 rounds for 128, 192, 256 bit keys – Regular Rounds (9, 11, 13) – Final Round is different.
SECURE HASHING ALGORITHM By: Ruth Betcher. Purpose: Authentication Not Encryption Authentication Requirements:  Masquerade – Insertion of message from.
ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
PIITMadhumita Chatterjee Security 1 Hashes and Message Digests.
Announcements: 1. HW7 due next Tuesday. 2. Inauguration today! Questions? This week: Discrete Logs, Diffie-Hellman, ElGamal Discrete Logs, Diffie-Hellman,
Hash functions a hash function produces a fingerprint of some file/message/data h = H(M)  condenses a variable-length message M  to a fixed-sized fingerprint.
Announcements:Questions? This week: Discrete Logs, Diffie-Hellman, ElGamal Discrete Logs, Diffie-Hellman, ElGamal Hash Functions and SHA-1 Hash Functions.
Chapter 4  Hash Functions 1 Overview  Cryptographic hash functions are functions that: o Map an arbitrary-length (but finite) input to a fixed-size output.
Secure Hashing and DSS Sultan Almuhammadi ICS 454 Principles of Cryptography.
Cryptography1 CPSC 3730 Cryptography Chapter 11, 12 Message Authentication and Hash Functions.
Cryptography and Network Security Chapter 11 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography and Network Security Chapter 11 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
HASH Functions.
Hash Functions A hash function H accepts a variable-length block of data M as input and produces a fixed-size hash value h = H(M) Principal object is.
Hash and MAC Algorithms Dr. Monther Aldwairi New York Institute of Technology- Amman Campus 12/3/2009 INCS 741: Cryptography 12/3/20091Dr. Monther Aldwairi.
Cryptographic Hash Functions June Topics  Overview of Cryptography Hash Function  Usages  Properties  Hashing Function Structure 
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Hashing Algorithms: Basic Concepts and SHA-2 CSCI 5857: Encoding and Encryption.
Hash and MAC Functions CS427 – Computer Security
1 Network Security Lecture 5 Hashes and Message Digests Waleed Ejaz
Hash and Mac Algorithms. Contents Hash Functions Secure Hash Algorithm HMAC.
Chapter 4 Message Authentication MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.
H ASHING : SHA256 T AYLER A NGEVINE B ACHELOR OF A RTS D R. K EN B LAHA 3/13/2014.
Chapter 18: One-Way Hash Functions Based on Schneier.
Cryptographic Hash Functions and Protocol Analysis
Cryptographic Hash Functions Prepared by Dr. Lamiaa Elshenawy
AES Encryption FIPS 197, November 26, Bit Block Encryption Key Lengths 128, 192, 256 Number of Rounds Key Length Rounds Block.
Hash Functions Ramki Thurimella. 2 What is a hash function? Also known as message digest or fingerprint Compression: A function that maps arbitrarily.
Lecture 5B Block Diagrams HASH Example.
CS426Fall 2010/Lecture 51 Computer Security CS 426 Lecture 5 Cryptography: Cryptographic Hash Function.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Information Security and Management 11. Cryptographic Hash Functions Chih-Hung Wang Fall
Data Integrity / Data Authentication. Definition Authentication (Signature) algorithm - A Verification algorithm - V Authentication key – k Verification.
Cryptographic Hash Function. A hash function H accepts a variable-length block of data as input and produces a fixed-size hash value h = H(M). The principal.
High-Speed Architectures of the Cryptographic Hash Function BLAKE E.Umashankar, , M.E,VLSI Design Guide By Ms.M.Saroshree,A.P,ECE.
Chapter 12 – Hash Algorithms
Secure Hash Algorithm A SEARIES OF SHA….
Cryptography Aalto University, autumn 2013.
Cryptographic Hash Functions & Digital Signatures
Computer and Network Security
CSCE 715: Network Systems Security
Network Security Unit-III
Cryptographic Hash Functions
Cryptographic Hash Function
CSCE 715: Network Systems Security
Message Authentication and Hash Functions
Secured Hash Algorithm(SHA)
Introduction to Security
An Analysis and Breakdown of SHA Hashing in Bitcoin
Cryptographic Hash Functions
최신정보보호기술 경일대학교 사이버보안학과 김 현성.
The Advanced Encryption Standard: Rijndael
Cryptographic Hash Functions Part I
ICS 454 Principles of Cryptography
Introduction to Symmetric-key and Public-key Cryptography
Hash and MAC Algorithms
CSCE 715: Network Systems Security
ICS 454 Principles of Cryptography
Chapter -7 CRYPTOGRAPHIC HASH FUNCTIONS
Hashing Hash are the auxiliary values that are used in cryptography.
Seyed Amir Hossain Naseredini
CRYPTOGRAPHY & NETWORK SECURITY
The Secure Hash Function (SHA)
Digital Signature Standard (DSS)
Presentation transcript:

Verilog Implementation of SHA 256 ALGORITHM Presented by Under the guidance of Mr. Mahesh Varma Sir M.Ayyappa K.Srilakshmi kannamma P.Priyanka S.Gangadhar N.Madhu

ABSTRACT : The continued growth of both wired and wireless communications has increased dramatically the amount of the transmitted data. Due to this providing information security has become a more and more important subject. In order to solve these security problems, lots of research and development activities are carried out and has triggered the revolution for the generation of new cryptographic algorithms. On August 26, 2002, NIST announced the Secure Hash Standard 2 which introduces the specifications of three new Secure Hash Algorithms, SHA-2 (256, 384 and 512).The Verilog implementation of SHA-256 are proposed in this work.

HASH FUNCTION: These functions are sort of operations that take an arbitrary length of input and produce a condensed representation of that input. This condensed representation of an arbitrary long input is usually referred as message digest or hash value. The size of the message digest is fixed depending on the particular hash function being used. The security of a hash function is directly related to this message digest length.

PROPERTIES OF HASH FUNCTION: 1. Pre-image Resistance : It means that for all predefined hash values it is computationally very hard to find an input having that particular hash value. 2. Second Pre-image Resistance : It means that given an input, it is computationally very hard to find another input such that both inputs have the same hash value. 3. Collision Resistance : It means that it is computationally very difficult to find two inputs having the same hash value.

SECURE HASH FAMILY STANDARD 2 (SHA-2): The SHA-2 standard supersedes the existing SHA-1,adding three new hash functions, SHA-2(256,384,512), for computing a condensed representation (message digest) of electronic data. The produced message digest ranges in length from 256 to 512-bits, depending on the selected hash function each time. The three new hash functions, specified in this standard, are called secure because for each one of them, it is computationally infeasible.

SHA 256: SHA stands for Secure Hash Algorithm is one of a number of cryptographic hash functions. In 2002, SHA-2 variants SHA-256, SHA-384, and SHA-512 published. SHA-256 is one-way hash function that can process a message to produce a condensed representation called a message digest. SHA-2 includes a significant number of changes from its predecessor, SHA-1.

BASIC PROPERTIES OF SHAS: Algorithm Message Size (bits) Block Size Word Size Message Digest Size Operations SHA-1 < 2^64 512 32 160 +,and,or,xor,rot SHA-256 256 +,and,or,xor,shr,rot SHA-384 < 2^128 1024 64 384 SHA-512

SHA 256 Algorithm Structure Pre Processing Hash Computation

GENERAL HASH COMPUTATIONAL FLOW :

SHA 256 ALGORITHM FLOW: Initialize Variables: first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19) ::::::h[0..7]: 6a09e667, bb67ae85, 3c6ef372, a54ff53a, 510e527f, 9b05688c, 1f83d9ab, 5be0cd19

Initialize Table Of Round Constants : (first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311):: k[0..63] : 428a2f98, 71374491, b5c0fbcf, e9b5dba5, 3956c25b, 59f111f1, 923f82a4, ab1c5ed5, d807aa98, 12835b01, 243185be, 550c7dc3, 72be5d74, 80deb1fe, 9bdc06a7, c19bf174, e49b69c1, efbe4786, 0fc19dc6, 240ca1cc, 2de92c6f, 4a7484aa, 5cb0a9dc, 76f988da, 983e5152, a831c66d, b00327c8, bf597fc7, c6e00bf3, d5a79147, 06ca6351, 14292967, 27b70a85, 2e1b2138, 4d2c6dfc, 53380d13, 650a7354, 766a0abb, 81c2c92e, 92722c85, a2bfe8a1, a81a664b, c24b8b70, c76c51a3, d192e819, d6990624, f40e3585, 106aa070, 19a4c116, 1e376c08, 2748774c, 34b0bcb5, 391c0cb3, 4ed8aa4a, 5b9cca4f, 682e6ff3, 748f82ee, 78a5636f, 84c87814, 8cc70208, 90befffa, a4506ceb, bef9a3f7, c67178f2

PRE PROCESSING: STEPS: Take Input Message Of Length “l” Bits. Append “1” To Input Message Calculate “K” using equation K=[448-l-1] && Then Append K Number Of Zeros To Get 448 Length Take Binary Representation Of “l” As 64 Bit Length Finally Append This 64 Bit To Message To Get Required 512 Bit Length Divide This 512 Bit Length Into 16 Input Words for i=0 to 15.

w[i] := w[i-16] + s0 + w[i-7] + s1 Extend the sixteen 32-bit words into sixty-four 32-bit words: for i from 16 to 63 s0 = (w[i-15] right rotate 7) xor (w[i-15] right rotate 18) xor (w[i-15] right shift 3) s1 = (w[i-2] right rotate 17) xor (w[i-2] right rotate 19) xor (w[i-2] right shift 10) w[i] := w[i-16] + s0 + w[i-7] + s1

Initialize hash value for this Variables: A = H0 B = H1 C = H2 D = H3 E = H4 F = H5 G = H6 H= H7

T1= h + ∑ 1 + ch (e,f,g)+ k[i] + w[i] Main loop: for i from 0 to 63 ∑ 0= (a right rotate 2) xor (a right rotate 13) xor (a right rotate 22) maj (a,b,c) = (a and b) xor (a and c) xor (b and c) T2= ∑ 0 + maj(a,b,c) ∑ 1 = (e right rotate 6) xor (e right rotate 11) xor (e right rotate 25) ch (e,f,g)= (e and f) xor ((not e) and g) T1= h + ∑ 1 + ch (e,f,g)+ k[i] + w[i] H = G D= C G = F C= B F = E B= A E = D + T1 A=T1+T2

Final hash values: H0 = H0 + A H1 = H1 + B H2 = H2 + C H3 = H3 + D H4 = H4 + E H5 = H5 + F H6 = H6 + G H7 = H7 + H

Message Digest: Finally we can get the 256 bit message after completion of 64 rounds i.e., H0 append H1 append H2 append H3 append H4 append H5 append H6 append H7

SHA 256:

PORT DESCRIPTION: S.NO MODE SIZE PORT DESCRIPTION 1 INPUT 2^64 PLAIN TEXT 2 100ps CLOCK 3 RESET 4 OUTPUT [255:0] ENCRYPTED DATA

SHA-256 OUTPUT:

Applications Verifying Data Integrity: Data integrity is a very important part of a secure system. Any changes made to the files can be detected by generating the message digests of the files using a hash function. Password Authentication : Password authentication is another field that hash functions are used. For computer systems, it is insecure to store passwords in clear-text. Digital Signature: A digital signature is a type of asymmetric cryptography used to simulate the security properties of a signature in digital, rather than in written form

CONCLUSION: My goal of design is to compress a long message to become a short and safe message abstract with an acceptable throughput. SHA is famous message compress standard used in computer cryptography. Its improved version SHA-256 algorithm has been analyzed in this work, and implied by HDL (hardware description language). xilinx 7.1 ISE is used to synthesis the module, and then generated RTL level description circuit and simulated waveform.

REFERENCES: Federal Information Processing Standards (FIPS) Publication 180-1, Secure Hash Standard (SHS), U.S. DoC/NIST, April 17, 1995. NIST, Federal Information Processing Standards Publication 180-2, Secure Hash Standards (SHS), August 2001 D. R. Stinson. Cryptography: Theory and Practice. CRC Press LLC, 1995.

THANK YOU