Implementation & Benchmarking of Padding Units & HMAC for SHA-3 candidates in FPGAs & ASICs

Size: px
Start display at page:

Download "Implementation & Benchmarking of Padding Units & HMAC for SHA-3 candidates in FPGAs & ASICs"

Transcription

1 Implementation & Benchmarking of Padding Units & HMAC for SHA-3 candidates in FPGAs & ASICs Ambarish Vyas Cryptographic Engineering Research Group (CERG) Department of ECE, Volgenau School of Engineering, George Mason University, Fairfax, VA, USA Master s Thesis Presentation Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 1 / 6

2 Outline Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 2 / 6

3 NIST SHA-3 Contest Hash function Padding Background Assumptions Interface and Protocol 51 candidates 14 5 SHA 3 Oct 200 July 2009 Dec 2010 Mid 2012 NIST announced new competition SHA-3 in Nov 2007, currently in Round 3 5 finalists. Jan 2011-Mar 2012: Evaluation Period for Round 3 Candidates. Evaluation Efficiency in FPGAs and ASICs is an important criteria to evaluate the algorithms. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 3 / 6

4 Cryptographic Hash functions Hash function Padding Background Assumptions Interface and Protocol Arbitrary Length Message M Hash Function Message Digest Fixed Length Cryptographic hash functions takes message as input and gives an output of fixed length called Message Digest. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 4 / 6

5 Application-Digital Signatures Hash function Padding Background Assumptions Interface and Protocol Message Message Alice Hash Function Hash Function Bob Hash value Signature Hash value#1 Signature YES =? NO Alice s Private Key Public Key algorithm Hash value#2 Public Key algorithm Alice s Public Key Provides Message Integrity and User Authentication. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 5 / 6

6 What is Padding? Hash function Padding Background Assumptions Interface and Protocol Majority of the cryptographic hash functions process messages divided in fixed length blocks. M Message K Padding bits N*BlockSize If the size of the input message which is to be hashed is not a multiple of a block size one needs to pad it with a padding string. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 6 / 6

7 Motivation Hash function Padding Background Assumptions Interface and Protocol One of the topic of debate in the cryptographic community is whether padding should be included in hardware design or should it be done externally in software and not taken in consideration while evaluating the designs We propose that padding should be included in the designs for fair evaluations, but should be designed intelligently so that the overall Throughput/Area ratio is not affected by an undesirable amount and the ranking of the algorithms do not change. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 7 / 6

8 Goals Hash function Padding Background Assumptions Interface and Protocol Specialized Padding units in FPGAs for all SHA-3 Round 3 Finalists. Universal Padding Unit in ASIC for all SHA-3 Round 3 Finalists HMAC wrapper for all SHA-3 Round 3 Finalists. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC / 6

9 Previous Work-Padding Unit Hash function Padding Background Assumptions Interface and Protocol To the best of my knowledge there are only two Research groups i.e. Baldwin et al. and Jungk et al. who have implemented padding in hardware for the SHA-3 finalists. Baldwin et al. have designed two versions: 1. Message size is a multiple of a word (32 bits). 2. Message size is not restricted by the padding circuit. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 9 / 6

10 Previous Work Padding Unit Hash function Padding Background Assumptions Interface and Protocol Drawbacks-Jungk They do not give out much details and do not have comprehensive performance analysis and reports on effect of padding when included in hardware. Drawbacks-Baldwin Both designs are extreme cases, one is too optimistic and one is overly pessimistic. They show that padding when included in hardware effects the clock frequnecy by a considerable amount. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 10 / 6

11 Previous Work-HMAC Hash function Padding Background Assumptions Interface and Protocol There are no HMAC implementation based on SHA-3 candidates till date. There is one HMAC implementation based on SHA-2 by Juliato et al. which is comprehensive and has in depth analysis of energy, throughput, throughput/area criteria. Drawbacks-Juliato generated are for Virtex-2 and Virtex-E which are old devices and do not have as many resources as the modern FPGAs. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 11 / 6

12 Assumptions Hash function Padding Background Assumptions Interface and Protocol Padding Assumption Message size M is a multiple of a byte: M mod = 0. FPGA Resources No Embedded Resources like Block Rams, DSP units, or Multipliers are used. Only Configurable Logic Blocks (CLBs) in Xilinx FPGAs and Adaptive Look-Up Tables (ALUTs) in Altera. Interface and Protocol Interface and Protocol proposed by CERG, GMU with slight modification. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 12 / 6

13 Interface Hash function Padding Background Assumptions Interface and Protocol clk rst clk rst clk rst ext_idata w fifoin_full fifoin_write clk rst Input din dout full empty write read FIFO idata w fifoin_empty fifoin_read clk rst SHA Core odata din dout w fifoout_full src_ready dst_ready fifoout_write src_read dst_write clk rst Output ext_odata din dout w fifoout_empty full empty fifoout_read write read FIFO Figure: Interface of SHA core and a typical configuration with surrounding input and output FIFOs. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 13 / 6

14 Protocol Hash function Padding Background Assumptions Interface and Protocol a) w bit last = 1 msg_len b) w bit last = 0 seg_0_len seg_0 Last = 1 indicates last segment of a message. Length of the last segment should be multiple of Byte. message last = 0 seg_1_len seg_1 Note: Segment size must be a multiple of block size unless it is the last segment of a message. last = 1 seg_n 1_len seg_n 1 w = 32 for SHA 2 w = 64 for all SHA 3 candidates Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 14 / 6

15 Outline Overview of Padding Rules SHA-2 Padding Adder Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 15 / 6

16 Padding Schemes Overview of Padding Rules SHA-2 Padding Adder BLAKE M K L Message Length N*BlockSize Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 16 / 6

17 Padding Schemes Overview of Padding Rules SHA-2 Padding Adder BLAKE M K L Message Length Grøstl N*BlockSize M K L Message #Blocks N*BlockSize Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 16 / 6

18 Padding Schemes Overview of Padding Rules SHA-2 Padding Adder BLAKE M K L Message Length Grøstl N*BlockSize M K L Message #Blocks N*BlockSize Keccak M K Message N*BlockSize Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 16 / 6

19 Padding Schemes Overview of Padding Rules SHA-2 Padding Adder BLAKE JH M K L M K L Message Length Message Length Grøstl N*BlockSize M K L Message #Blocks N*BlockSize BlockSize N*BlockSize Keccak M K Message N*BlockSize Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 16 / 6

20 Padding Schemes Overview of Padding Rules SHA-2 Padding Adder BLAKE JH M K L M K L Message Length Message Length Grøstl N*BlockSize M K L Message #Blocks Skein N*BlockSize M K Message BlockSize M K Message Keccak M N*BlockSize K N*BlockSize (a) N*BlockSize (b) Message N*BlockSize Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 16 / 6

21 Padding Schemes Overview of Padding Rules SHA-2 Padding Adder BLAKE JH M K L M K L Message Length Message Length Grøstl N*BlockSize M K L Message #Blocks Skein N*BlockSize M K Message BlockSize M K Message Keccak M N*BlockSize K N*BlockSize (a) SHA-2 N*BlockSize (b) M K L Message N*BlockSize Message Length N*BlockSize Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 16 / 6

22 Padding Schemes Overview of Padding Rules SHA-2 Padding Adder Table: Overview of Padding Schemes of 5 Candidates and SHA-2.( stands for concatenation Sr. No. Algorithm Padding Scheme 1. BLAKE-256 M (Message Length) 64 BLAKE-512 M (Message Length) Grøstl M (Number of Blocks) Keccak M JH M (Message Length) Skein If Message length is a Multiple of a byte : M Else : M SHA-256 M (Message Length) 64 SHA-512 M (Message Length) 12 Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 17 / 6

23 Padding Schemes Overview of Padding Rules SHA-2 Padding Adder Table: Minimum and Maximum number of bits required to be added by the Padding schemes Sr. No. Algorithm Minimum bits Maximum bits 1. BLAKE L+2 BlockSize+L+1 2. Grøstl L+1 BlockSize+L 3. Keccak 2 BlockSize+1 4. JH BlockSize 2*BlockSize-1 5. Skein 1 BlockSize-1 6. SHA-2 L+1 BlockSize+L Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 1 / 6

24 SHA-2 Padding Rule Overview of Padding Rules SHA-2 Padding Adder Message Length S P M P M P S-P : Start Pad String, M-P : Middle Pad String. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 19 / 6

25 Padding Unit with comparators Overview of Padding Rules SHA-2 Padding Adder i== i<64 S P M P S P M P din (63:56) din (7:0) i< i== 64 dout Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 20 / 6

26 Calculation of i Overview of Padding Rules SHA-2 Padding Adder Case i = Case i = 64 (Length mod 64) Length mod 64 i = 16 Case 3 i = 65 Case 1: Complete words of message. Case 2: Incomplete word of message. Case 3: Complete words of padding. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 21 / 6

27 LUT-Decoder Logic Overview of Padding Rules SHA-2 Padding Adder S P M P S P M P SelPad(7) SelInp(7) din (63:56) din (7:0) SelPad(0) SelInp(0) 64 dout Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 22 / 6

28 LUT-Decoder Logic Overview of Padding Rules SHA-2 Padding Adder Length(5:3) LUT 1 LUT 2 x"ff" x"00" Case 1 Case 3 SelInp SelPad LUT 1 b" " b" " b" " b" " b" " b" " b" " b" " LUT 2 b" " b" " b" " b" 10000" b" 1000" b" 100" b" 10" b" 1" Note: stands for do not care Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 23 / 6

29 Comparator Vs Decoder Overview of Padding Rules SHA-2 Padding Adder Padding Unit Virtex 5 Virtex 6 Area Max.Clock Area Max.Clock Type [CLB slices] [MHz] [CLB slices] [MHz] Comparator Decoder V6 V5 V6 Comparator Decoder Max.Clock[MHz] V Area[CLB slices] Figure: Maximum clock frequnecy vs. Area of general padding for both versions in two Xilinx families. V5- Virtex 5 and V6- Virtex 6. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 24 / 6

30 Adder size Overview of Padding Rules SHA-2 Padding Adder Table: Counter Size used in the the Padding rules Algorithm Variant Counter Size BLAKE JH Grøstl SHA bit bit bit bit bit bit bit bit JH and SHA-2 have a very short critical path and such a wide adder is certain to increase the critical path due to the carry chain propagation and thus can decrease the high performance of the algorithm. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 25 / 6

31 Adder configuration Overview of Padding Rules SHA-2 Padding Adder INPUT #1 INPUT #2 ADD OUTPUT INPUT #1 INPUT #2 ADD OUTPUT SHA 256 SHA 512 JH 256/512 Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 26 / 6

32 Multistage Adder Overview of Padding Rules SHA-2 Padding Adder w=32 : N=4 ; w=64 : N= din w carry[n 1] carry[n 2] carry[2] carry[1] REG (N 1) REG (N 2) REG 1 REG *w dout Each adder is 16-bits wide and it takes clock cycles for 12-bit output and 4 clock cycles for 64-bit output. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 27 / 6

33 SCCA Vs Multistage Adder Overview of Padding Rules SHA-2 Padding Adder Table: Area and maximum clock frequency results for combinational standard carry chain adder ( + in VHDL) Virtex 5 Virtex 6 Stratix III Stratix IV Area Max.Clock Area Max.Clock Area Max.Clock Area Max.Clock Adder size [CLB slices] [MHz] [CLB slices] [MHz] [ALUTs] [MHz] [ALUTs] [MHz] 64-bits bits Table: Area and maximum clock frequency results for Multi-Stage adder Virtex 5 Virtex 6 Stratix III Stratix IV Area Max.Clock Area Max.Clock Area Max.Clock Area Max.Clock Adder size [CLB slices] [MHz] [CLB slices] [MHz] [ALUTs] [MHz] [ALUTs] [MHz] 64-bits bits Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 2 / 6

34 Overview of Padding Rules SHA-2 Padding Adder Max.Clock[MHz] (a) SCCA Multi Stage V6 V5 V5 V Area[CLB slices] Max.Clock[MHz] (b) SCCA Multi Stage S4 S3 S4 S Area[ALUTs] Figure: Maximum clock frequnecy vs. Area for both versions of adders on 2 xilinx families and 2 Altera families.(a) plot for 64-bit adder,(b) plot for 12-bit adder. V5- Virtex 5, V6- Virtex 6, S3- Stratix III, and S4- Stratix 4 Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 29 / 6

35 BLAKE-Top Overview of Padding Rules SHA-2 Padding Adder Figure: BLAKE-256 DataIn 64 Figure: BLAKE-512 DataIn 64 BytePadBK 0 64 len DataOut BytePadBK len 127:64 len 63: DataOut Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 30 / 6

36 BLAKE- BytePadBK Overview of Padding Rules SHA-2 Padding Adder SelPad(7) SelPad(6) SelPad(1) 1 0 DataIn(63:56) DataIn(55:4) DataIn(15:) DataIn(7:0) LastWord SelPad(0) SelInp(7) SelInp(6) SelInp(1) SelInp(0) 64 Note: All Constants are in Hexadecimal notation DataOut Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 31 / 6

37 Keccak Overview of Padding Rules SHA-2 Padding Adder Figure: Top Figure: BytePadKK DataIn 64 BytePadKK SelPad(7) SelPad(6) SelPad(1) LastWord SelPad(0) DataIn(63:56) DataIn(55:4) DataIn(15:) DataIn(7:0) SelInp(7) SelInp(6) SelInp(1) SelInp(0) DataOut 64 Note: All Constants are in Hexadecimal notation DataOut Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 32 / 6

38 Skein Overview of Padding Rules SHA-2 Padding Adder Figure: Top DataIn 64 BytePadSK 64 DataOut SelInp(7) 00 DataIn(63:56) Figure: BytePadSK DataIn(55:4) DataIn(15:) DataIn(7:0) 1 0 SelInp(6) 64 SelInp(1) SelInp(0) DataOut Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 33 / 6

39 Grøstl,JH,SHA-2:BytePadMul Overview of Padding Rules SHA-2 Padding Adder SelPad(7) SelPad(6) SelPad(1) DataIn(63:56) DataIn(55:4) DataIn(15:) DataIn(7:0) SelInp(7) SelInp(6) SelInp(1) SelPad(0) SelInp(0) 64 DataOut Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 34 / 6

40 JH,Grøstl-Top Overview of Padding Rules SHA-2 Padding Adder Figure: Grøstl DataIn 64 Figure: JH DataIn 64 BytePadMul 64 # Blocks 64 len 127:64 BytePadMul len 63: DataOut DataOut Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 35 / 6

41 SHA2-Top Overview of Padding Rules SHA-2 Padding Adder Figure: SHA-256 DataIn 32 Figure: SHA-512 DataIn 64 BytePadSH 32 len 64 63:32 31:0 len 127:64 BytePadMul len 63: DataOut DataOut Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 36 / 6

42 Overview of Padding Rules SHA-2 Padding Adder Architecture with Padding Vs without Padding: 256-bit Architecture Virtex 5 Virtex 6 Stratix III Stratix IV Tp A Tp/A Tp A Tp/A Tp A Tp/A Tp A Tp/A BLAKE-256 No-Pad Pad [%] Grøstl-256 No-Pad Pad [%] JH-256 No-Pad Pad [%] Keccak-256 No-Pad Pad [%] Skein-256 No-Pad Pad [%] SHA-256 No-Pad Pad [%] Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 37 / 6

43 Overview of Padding Rules SHA-2 Padding Adder Architecture with Padding Vs without Padding: 512-bit Architecture Virtex 5 Virtex 6 Stratix III Stratix IV Tp A Tp/A Tp A Tp/A Tp A Tp/A Tp A Tp/A BLAKE-512 No-Pad Pad [%] Grøstl-512 No-Pad Pad [%] JH-512 No-Pad Pad [%] Keccak-512 No-Pad Pad [%] Skein-512 No-Pad Pad [%] SHA-512 No-Pad Pad [%] Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 3 / 6

44 Throughput/Area: Altera 256-bit Overview of Padding Rules SHA-2 Padding Adder Throughput/Area (a) No Pad Pad 0 BLAKE Groestl JH Keccak Skein SHA 2 Throughput/Area (b) No Pad Pad 0 BLAKE Groestl JH Keccak Skein SHA 2 Figure: (a) is graph for Stratix III and (b) is Stratix IV Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 39 / 6

45 Throughput/Area: Altera 512-bit Overview of Padding Rules SHA-2 Padding Adder Throughput/Area (a) No Pad Pad 0 BLAKE Groestl JH Keccak Skein SHA 2 Throughput/Area (b) No Pad Pad 0 BLAKE Groestl JH Keccak Skein SHA 2 Figure: (a) is graph for Stratix III and (b) is Stratix IV Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 40 / 6

46 Throughput/Area: Xilinx 256-bit Overview of Padding Rules SHA-2 Padding Adder Throughput/Area (a) No Pad Pad 0 BLAKE Groestl JH Keccak Skein SHA 2 Throughput/Area (b) No Pad Pad 0 BLAKE Groestl JH Keccak Skein SHA 2 Figure: (a) is graph for Virtex 5 and (b) is Virtex 6 Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 41 / 6

47 Throughput/Area: Xilinx 512-bit Overview of Padding Rules SHA-2 Padding Adder Throughput/Area (a) No Pad Pad 0 BLAKE Groestl JH Keccak Skein SHA 2 Throughput/Area (b) No Pad Pad 0 BLAKE Groestl JH Keccak Skein SHA 2 Figure: (a) is graph for Virtex 5 and (b) is Virtex 6 Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 42 / 6

48 Outline Block Diagram Byte Pad Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 43 / 6

49 Universal Padding Unit Block Diagram Byte Pad Two groups George Mason University, Virginia USA (GMU) and Swiss Federal Institute of Technology Zurich (ETHZ) contributed one set of implementations each of all candiates (256-bit variants) with Round 3 tweaks. Standard-cell based 65nm CMOS technology was used to implement all 12 hash cores along with SHA-2 as a reference. As area was limited on the chip having individual padding unit for each algorithm was not a buyable solution. Solution Universal padding unit independent of the core was developed which pads the input depending on the algorithm. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 44 / 6

50 Placement of the Padding Unit. Block Diagram Byte Pad InpWordWrxSI FinWordxSI FinBlockxSI InWrEnxSI MsgLenxDI 64 Input Block AlgSelxSI 3 LFSR 64 PadDataxDI Padding Unit PadDataxDO 64 Input Register DataxDI N DataxDO 512/10 HASH CORE 256 DataCntxDI 64 OutWordWrxSO FinBlockxSO OutRdyxSI SipoEnxSI PenUltCyclexSO OutWrEnxSO FinWordxSI : Set when Final word of message written to padding unit. OutWordxSO : Set when valid output is written to SIPO. FinBlockxSO : Set when final Block is written to the Hash core. OutRdyxSI : Set when Padding Unit can start writing a new block. DataxDO Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 45 / 6

51 Universal Padding Unit Block Diagram Byte Pad Two versions were developed of the Universal Padding Unit. Universal Byte Pad Message ending on the boundary of a byte. Universal Word Pad Message ending on the boundary of a word (w = 64 bits). Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 46 / 6

52 Universal Byte Pad Block Diagram Byte Pad AlgSelxSI == Keccak AlgSelxSI /= Skein SelPad(7) AND PadDataxDI(63:56) PadDataxDI(7:0) 2 SelPadLast 1 0 SelPadLast AlgSelxSI == Keccak AlgSelxSI /= Skein 0 LastWord SelPad(0) SelInp(7) SelInp(0) 64 DoutPadded Note: All Constants are in Hexadecimal notation Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 47 / 6

53 Universal Padding Block Diagram Byte Pad DataCntxDI 64 LastWord SelInp SelPad AlgSelxSI 3 PadDataxDI 64 Byte Pad Len 127:64 << 3 Len 63: >>6 # Blocks ExtraBlock SelData PadDataxDO Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 4 / 6

54 Block Diagram Byte Pad Padding Unit Version Area [kge] Max.Clock[MHz] Byte Word Table: Area and maximum clock frequency results for implemented cores 256-bit variant on ASIC Algorithm Group Area [kge] Max.Clock[MHz] Overhead[%] BLAKE Grøstl JH Keccak Skein SHA-2 GMU ETHZ GMU ETHZ GMU ETHZ GMU ETHZ GMU ETHZ GMU ETHZ Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 49 / 6

55 Block Diagram Byte Pad Table: Area and maximum clock frequency results for both version of universal padding unit on Xilinx FPGAs Padding Unit Virtex 5 Virtex 6 Area Max.Clock Area Max.Clock Version [CLB slices] [MHz] [CLB slices] [MHz] Byte Word Table: Area and maximum clock frequency results for both version of universal padding unit on Altera FPGAs Padding Unit Stratix III Stratix IV Area Max.Clock Area Max.Clock Version [ALUTs] [MHz] [ALUTs] [MHz] Byte Word Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 50 / 6

56 Graphs Block Diagram Byte Pad (a) Hash unit Pad unit Area[kGE] BLAKEGroestl JH Keccak Skein SHA 2 (b) Area[kGE] BLAKEGroestl JH Keccak Skein SHA 2 Figure: Area overhead due to addition of universal padding unit byte version for GMU and ETHZ implementations in ASIC. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 51 / 6

57 Block Diagram Byte Pad Area[CLB slices] (a) Hash unit Pad unit 0 BLAKE Groestl JH Keccak Skein SHA 2 Area[ALUTs] (b) Hash unit Pad unit 0 BLAKE Groestl JH Keccak Skein SHA 2 Figure: Area overhead due to addition of universal padding unit byte version for GMU implementations in FPGA. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 52 / 6

58 Outline MAC HMAC Algorithm Interface and Protocol HMAC HMAC Top Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 53 / 6

59 Message Aunthentication Code MAC HMAC Algorithm Interface and Protocol HMAC HMAC Top MAC is a secret key algorithm which provides Message Integrity and Message Authentication. A B Insecure Channel MAC Function MAC Function MAC Accept Y = N MAC Reject Figure: Communication between User A and User B over an unsecured channel. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 54 / 6

60 Hash based MAC MAC HMAC Algorithm Interface and Protocol HMAC HMAC Top The operation can be described in 4 steps: Step 1: Pre-Processing of Key Key size=blocksize: K=Key, Key<Blocksize: K=Key , Key>Blocksize: K=H(Key) Step 2: XOR with ipad and HASH H(K ipad) msg Step 3: XOR with opad and HASH H((K opad) H((K ipad) msg)) Step 4: Truncate MAC MAC = truncate[h((k opad) H((K ipad) msg))] Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 55 / 6

61 Hash based MAC MAC HMAC Algorithm Interface and Protocol HMAC HMAC Top PAD to blocksize b Note: b: Block size of hash function. ipad = 0x36 repeated b/ times. opad = 0x5C repeated b/ times. IPAD b b Message K i M1 M2 Mn b PAD to blocksize b OPAD b b Hash Function b h Intermediate HMAC PAD to blocksize K o HMAC b Hash Function h MAC Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 56 / 6

62 Interface MAC HMAC Algorithm Interface and Protocol HMAC HMAC Top Interface is the same as discussed in Padding Unit section with the exception of Hash Core replaced by HMAC Unit. clk rst clk rst clk rst ext_idata w fifoin_full fifoin_write clk rst Input din dout full empty write read FIFO idata w fifoin_empty fifoin_read clk rst din HMAC Unit dout w odata fifoout_full src_ready dst_ready fifoout_write src_read dst_write clk rst Output ext_odata din dout w fifoout_empty full empty fifoout_read write read FIFO Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 57 / 6

63 Protocol MAC HMAC Algorithm Interface and Protocol HMAC HMAC Top Input to HMAC unit Input to SHA core w bit last = 0 KeySize w bit last = 0 BlockSize w bit last = 0 BlockSize KEY K IPAD K OPAD last = 1 MsgLen last = 1 MsgLen last = 1 HashSize Message Message Intermediate HMAC Note: K = preprocess(key) Part 1 Input Part 2 Input Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 5 / 6

64 MAC HMAC Algorithm Interface and Protocol HMAC HMAC Top KeyWrite KeyRead SelPad clk write read w din rst dout RAM wdin w ShaCoreOut w 0 SelDin 2 ipad opad 0 0 w din w 1 w 2 w w din w BlockSize w 1 HashSize w 1 din w w SelInp w clk din Hash Core rst dst_ready src_ready src_read dst_write dout w DestOutReady SourceInReady CoreRead CoreWrite dout HmacIn dout din ShaCoreOut HmacWrite HmacRead write read RAM clk rst Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 59 / 6

65 Top level MAC HMAC Algorithm Interface and Protocol HMAC HMAC Top din rst clk w rst clk w w KeyRead KeyWrite src_read dst_read src_ready dst_ready CONTROLLER SelPad 2 SelInp 3 SelDin 2 SourceInReady DestOutReady CoreWrite CoreRead HmacWrite DATAPATH w dout HmacRead Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 60 / 6

66 -256 bit MAC HMAC Algorithm Interface and Protocol HMAC HMAC Top Architecture Stratix III Stratix IV Tp A Tp/A Tp A Tp/A BLAKE-256 Hash Core HMAC [%] Grøstl-256 Hash Core HMAC [%] JH-256 Hash Core HMAC [%] Keccak-256 Hash Core HMAC [%] Skein-256 Hash Core HMAC [%] SHA-256 Hash Core HMAC [%] Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 61 / 6

67 -512 bit MAC HMAC Algorithm Interface and Protocol HMAC HMAC Top Architecture Stratix III Stratix IV Tp A Tp/A Tp A Tp/A BLAKE-512 Hash Core HMAC [%] Grøstl-512 Hash Core HMAC [%] JH-512 Hash Core HMAC [%] Keccak-512 Hash Core HMAC [%] Skein-512 Hash Core HMAC [%] SHA-512 Hash Core HMAC [%] Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 62 / 6

68 Outline Conclusions Future work Questions?? Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 63 / 6

69 Conclusions Conclusions Future work Questions?? Padding Unit in FPGAs The rankings of the algorithms is not affected after adding support to Padding rule. Padding Unit in FPGAs The worst hit on Throughput/Area ratio over all the devices is 1%. Padding Unit in FPGAs The worst affected in terms of the Throughput/Area ratio in both 256 and 512-bit variants on Virtex 5 and Stratix IV is JH. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 64 / 6

70 Conclusions Conclusions Future work Questions?? Padding Unit in FPGAs The worst affected in terms of the Throughput/Area ratio in both 256 and 512-bit variants on Stratix III is Keccak. Padding Unit in FPGAs Skein is the least affected except for Virtex 6. It is due to the fact that it has a very simple Padding scheme with no counter. Padding Unit in FPGAs BLAKE is also less affected because it is one of the biggest of the 5 algorithms and also has small throughput. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 65 / 6

71 Conclusions Conclusions Future work Questions?? Universal Padding Unit in ASICs It can run at a maximum clock frequency of 1.42 GHz, which is faster than all the algorithms. Universal Padding Unit in ASICs The area is 2.13 kge for the byte version which results in around maximum of 6% area overhead. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 66 / 6

72 Conclusions Future work Questions?? Future Work Implementing all algorithms supporting padding in hardware on FPGA boards and doing experimental testing to see if the testing results are the same as what obtained after Post-Place and Routing. Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 67 / 6

73 Questions!!!! Conclusions Future work Questions?? THANK YOU!! Master s Thesis Presentation Vyas SHA-3:Implementation of Padding Units & HMAC 6 / 6

Low-Area Implementations of SHA-3 Candidates

Low-Area Implementations of SHA-3 Candidates Jens-Peter Cryptographic Engineering Research Group (CERG) http://cryptography.gmu.edu Department of ECE, Volgenau School of IT&E, George Mason University, Fairfax, VA, USA SHA-3 Project Review Meeting

More information

Lightweight Implementations of SHA-3 Candidates on FPGAs

Lightweight Implementations of SHA-3 Candidates on FPGAs Lightweight of SHA-3 Candidates on FPGAs Jens-Peter Kaps Panasayya Yalla Kishore Kumar Surapathi Bilal Habib Susheel Vadlamudi Smriti Gurung John Pham Cryptographic Engineering Research Group (CERG) http://cryptography.gmu.edu

More information

ECE 545 Lecture 8b. Hardware Architectures of Secret-Key Block Ciphers and Hash Functions. George Mason University

ECE 545 Lecture 8b. Hardware Architectures of Secret-Key Block Ciphers and Hash Functions. George Mason University ECE 545 Lecture 8b Hardware Architectures of Secret-Key Block Ciphers and Hash Functions George Mason University Recommended reading K. Gaj and P. Chodowiec, FPGA and ASIC Implementations of AES, Chapter

More information

A High-Speed Unified Hardware Architecture for AES and the SHA-3 Candidate Grøstl

A High-Speed Unified Hardware Architecture for AES and the SHA-3 Candidate Grøstl A High-Speed Unified Hardware Architecture for AES and the SHA-3 Candidate Grøstl Marcin Rogawski Kris Gaj Cryptographic Engineering Research Group (CERG) http://cryptography.gmu.edu Department of ECE,

More information

Use of Embedded FPGA Resources in Implementations of Five Round Three SHA-3 Candidates

Use of Embedded FPGA Resources in Implementations of Five Round Three SHA-3 Candidates Use of Embedded FPGA Resources in Implementations of Five Round Three SHA-3 Candidates Malik Umar Sharif, Rabia Shahid, Marcin Rogawski and Kris Gaj George Mason University, USA Agenda SHA-3 High Speed

More information

GMU SHA Core Interface & Hash Function Performance Metrics

GMU SHA Core Interface & Hash Function Performance Metrics GMU SHA Core Interface & Hash Function Performance Metrics Interface Why Interface Matters? Pin limit Total number of i/o ports Total number of an FPGA i/o pins Support for the maximum throughput Time

More information

GMU SHA Core Interface & Hash Function Performance Metrics Interface

GMU SHA Core Interface & Hash Function Performance Metrics Interface GMU SHA Core Interface & Hash Function Performance Metrics Interface 1 Why Interface Matters? Pin limit Total number of i/o ports Total number of an FPGA i/o pins Support for the maximum throughput Time

More information

Use of Embedded FPGA Resources in Implementa:ons of 14 Round 2 SHA- 3 Candidates

Use of Embedded FPGA Resources in Implementa:ons of 14 Round 2 SHA- 3 Candidates Use of Embedded FPGA Resources in Implementa:ons of 14 Round 2 SHA- 3 Candidates Kris Gaj, Rabia Shahid, Malik Umar Sharif, and Marcin Rogawski George Mason University U.S.A. Co-Authors Rabia Shahid Malik

More information

Vivado HLS Implementation of Round-2 SHA-3 Candidates

Vivado HLS Implementation of Round-2 SHA-3 Candidates Farnoud Farahmand ECE 646 Fall 2015 Vivado HLS Implementation of Round-2 SHA-3 Candidates Introduction NIST announced a public competition on November 2007 to develop a new cryptographic hash algorithm,

More information

Fair and Comprehensive Methodology for Comparing Hardware Performance of Fourteen Round Two SHA-3 Candidates using FPGAs

Fair and Comprehensive Methodology for Comparing Hardware Performance of Fourteen Round Two SHA-3 Candidates using FPGAs Fair and Comprehensive Methodology for Comparing Hardware Performance of Fourteen Round Two SHA-3 Candidates using FPGAs Kris Gaj, Ekawat Homsirikamol, and Marcin Rogawski ECE Department, George Mason

More information

Groestl Tweaks and their Effect on FPGA Results

Groestl Tweaks and their Effect on FPGA Results Groestl Tweaks and their Effect on FPGA Results Marcin Rogawski and Kris Gaj George Mason University {kgaj, mrogawsk}@gmu.edu Abstract. In January 2011, Groestl team published tweaks to their specification

More information

Use of Embedded FPGA Resources in Implementations of Five Round Three SHA-3 Candidates

Use of Embedded FPGA Resources in Implementations of Five Round Three SHA-3 Candidates Use of Embedded FPGA Resources in Implementations of Five Round Three SHA-3 Candidates Malik Umar Sharif, Rabia Shahid, Marcin Rogawski, Kris Gaj Abstract In this paper, we present results of the comprehensive

More information

Benchmarking of Cryptographic Algorithms in Hardware. Ekawat Homsirikamol & Kris Gaj George Mason University USA

Benchmarking of Cryptographic Algorithms in Hardware. Ekawat Homsirikamol & Kris Gaj George Mason University USA Benchmarking of Cryptographic Algorithms in Hardware Ekawat Homsirikamol & Kris Gaj George Mason University USA 1 Co-Author Ekawat Homsirikamol a.k.a Ice Working on the PhD Thesis entitled A New Approach

More information

Cryptographic Hash Functions

Cryptographic Hash Functions Cryptographic Hash Functions Çetin Kaya Koç koc@cs.ucsb.edu Çetin Kaya Koç http://koclab.org Winter 2017 1 / 34 Cryptographic Hash Functions A hash function provides message integrity and authentication

More information

Hardware Benchmarking of Cryptographic Algorithms Using High-Level Synthesis Tools: The SHA-3 Contest Case Study

Hardware Benchmarking of Cryptographic Algorithms Using High-Level Synthesis Tools: The SHA-3 Contest Case Study Hardware Benchmarking of Cryptographic Algorithms Using High-Level Synthesis Tools: The SHA-3 Contest Case Study Ekawat Homsirikamol and Kris Gaj Volgenau School of Engineering George Mason University

More information

Hash functions & MACs

Hash functions & MACs ECE 646 Lecture 11 Hash functions & MACs Required Reading W. Stallings, "Cryptography and Network-Security, Chapter 11 Cryptographic Hash Functions Appendix 11A Mathematical Basis of Birthday Attack Chapter

More information

Environment for Fair and Comprehensive Performance Evalua7on of Cryptographic Hardware and So=ware. ASIC Status Update

Environment for Fair and Comprehensive Performance Evalua7on of Cryptographic Hardware and So=ware. ASIC Status Update Environment for Fair and Comprehensive Performance Evalua7on of Cryptographic Hardware and So=ware ASIC Status Update ECE Department, Virginia Tech Faculty - Patrick Schaumont, Leyla Nazhandali Students

More information

ECE 545. Digital System Design with VHDL

ECE 545. Digital System Design with VHDL ECE 545 Digital System Design with VHDL Course web page: ECE web page Courses Course web pages ECE 545 http://ece.gmu.edu/coursewebpages/ece/ece545/f10/ Kris Gaj Research and teaching interests: Contact:

More information

NIST SHA-3 ASIC Datasheet

NIST SHA-3 ASIC Datasheet NIST SHA-3 ASIC Datasheet -- NIST SHA-3 Competition Five Finalists on a Chip (Version 1.1) Technology: IBM MOSIS 0.13µm CMR8SF-RVT Standard-Cell Library: ARM s Artisan SAGE-X V2.0 Area: 5mm 2 (Core: 1.656mm

More information

SHA3 Core Specification. Author: Homer Hsing

SHA3 Core Specification. Author: Homer Hsing SHA3 Core Specification Author: Homer Hsing homer.hsing@gmail.com Rev. 0.1 January 29, 2013 This page has been intentionally left blank. www.opencores.org Rev 0.1 ii Rev. Date Author Description 0.1 01/29/2013

More information

Federal standards NIST FIPS 46-1 DES FIPS 46-2 DES. FIPS 81 Modes of. operation. FIPS 46-3 Triple DES FIPS 197 AES. industry.

Federal standards NIST FIPS 46-1 DES FIPS 46-2 DES. FIPS 81 Modes of. operation. FIPS 46-3 Triple DES FIPS 197 AES. industry. ECE 646 Lecture 12 Federal Secret- cryptography Banking International Cryptographic Standards NIST FIPS 46-1 DES FIPS 46-2 DES FIPS 81 Modes of operation FIPS 46-3 Triple DES FIPS 197 AES X3.92 DES ANSI

More information

GMU Hardware API for Authen4cated Ciphers

GMU Hardware API for Authen4cated Ciphers GMU Hardware API for Authen4cated Ciphers Ekawat Homsirikamol, William Diehl, Ahmed Ferozpuri, Farnoud Farahmand, Malik Umar Sharif, and Kris Gaj George Mason University USA http:/cryptography.gmu.edu

More information

ECE 545 Fall 2010 Exam 1

ECE 545 Fall 2010 Exam 1 ECE 545 Fall 2010 Exam 1 Introduction & tasks: The SHA-1 (Secure Hash Algorithm-1) circuit is specified below using its a. pseudocode b. block diagram of one of its units called Message Scheduler c. top-level

More information

C vs. VHDL: Benchmarking CAESAR Candidates Using High- Level Synthesis and Register- Transfer Level Methodologies

C vs. VHDL: Benchmarking CAESAR Candidates Using High- Level Synthesis and Register- Transfer Level Methodologies C vs. VHDL: Benchmarking CAESAR Candidates Using High- Level Synthesis and Register- Transfer Level Methodologies Ekawat Homsirikamol, William Diehl, Ahmed Ferozpuri, Farnoud Farahmand, and Kris Gaj George

More information

ECE 646 Lecture 12. Cryptographic Standards. Secret-key cryptography standards

ECE 646 Lecture 12. Cryptographic Standards. Secret-key cryptography standards ECE 646 Lecture 12 Cryptographic Standards Secret-key cryptography Federal Banking International NIST FIPS 46-1 DES FIPS 46-2 DES FIPS 81 Modes of operation FIPS 46-3 Triple DES FIPS 197 AES X3.92 DES

More information

Two Hardware Designs of BLAKE-256 Based on Final Round Tweak

Two Hardware Designs of BLAKE-256 Based on Final Round Tweak Two Hardware Designs of BLAKE-256 Based on Final Round Tweak Muh Syafiq Irsyadi and Shuichi Ichikawa Dept. Knowledge-based Information Engineering Toyohashi University of Technology, Hibarigaoka, Tempaku,

More information

High-Speed Hardware for NTRUEncrypt-SVES: Lessons Learned Malik Umar Sharif, and Kris Gaj George Mason University USA

High-Speed Hardware for NTRUEncrypt-SVES: Lessons Learned Malik Umar Sharif, and Kris Gaj George Mason University USA High-Speed Hardware for NTRUEncrypt-SVES: Lessons Learned Malik Umar Sharif, and Kris Gaj George Mason University USA Partially supported by NIST under grant no. 60NANB15D058 1 Co-Author Malik Umar Sharif

More information

ECE 645: Lecture 1. Basic Adders and Counters. Implementation of Adders in FPGAs

ECE 645: Lecture 1. Basic Adders and Counters. Implementation of Adders in FPGAs ECE 645: Lecture Basic Adders and Counters Implementation of Adders in FPGAs Required Reading Behrooz Parhami, Computer Arithmetic: Algorithms and Hardware Design Chapter 5, Basic Addition and Counting,

More information

Comparison of the Hardware Performance of the AES Candidates Using Reconfigurable Hardware

Comparison of the Hardware Performance of the AES Candidates Using Reconfigurable Hardware Comparison of the Hardware Performance of the AES Candidates Using Reconfigurable Hardware Master s Thesis Pawel Chodowiec MS CpE Candidate, ECE George Mason University Advisor: Dr. Kris Gaj, ECE George

More information

Evaluation of Hardware Performance for the SHA-3 Candidates Using SASEBO-GII

Evaluation of Hardware Performance for the SHA-3 Candidates Using SASEBO-GII Evaluation of Hardware Performance for the SHA-3 Candidates Using SASEBO-GII Kazuyuki Kobayashi 1, Jun Ikegami 1, Shin ichiro Matsuo 2, Kazuo Sakiyama 1 and Kazuo Ohta 1 1 The University of Electro-Communications,

More information

Comparing Hardware Performance of Fourteen Round Two SHA-3 Candidates Using FPGAs

Comparing Hardware Performance of Fourteen Round Two SHA-3 Candidates Using FPGAs Comparing Hardware Performance of Fourteen Round Two SHA-3 Candidates Using FPGAs Ekawat Homsirikamol Marcin Rogawski Kris Gaj George Mason University ehomsiri, mrogawsk, kgaj@gmu.edu Last revised: Decemer

More information

Winter 2011 Josh Benaloh Brian LaMacchia

Winter 2011 Josh Benaloh Brian LaMacchia Winter 2011 Josh Benaloh Brian LaMacchia Symmetric Cryptography January 20, 2011 Practical Aspects of Modern Cryptography 2 Agenda Symmetric key ciphers Stream ciphers Block ciphers Cryptographic hash

More information

On Optimized FPGA Implementations of the SHA-3 Candidate Grøstl

On Optimized FPGA Implementations of the SHA-3 Candidate Grøstl On Optimized FPGA Implementations of the SHA-3 Candidate Grøstl Bernhard Jungk, Steffen Reith, and Jürgen Apfelbeck Fachhochschule Wiesbaden University of Applied Sciences {jungk reith}@informatik.fh-wiesbaden.de

More information

Fast implementation and fair comparison of the final candidates for Advanced Encryption Standard using Field Programmable Gate Arrays

Fast implementation and fair comparison of the final candidates for Advanced Encryption Standard using Field Programmable Gate Arrays Kris Gaj and Pawel Chodowiec Electrical and Computer Engineering George Mason University Fast implementation and fair comparison of the final candidates for Advanced Encryption Standard using Field Programmable

More information

CAESAR Hardware API. Ekawat Homsirikamol, William Diehl, Ahmed Ferozpuri, Farnoud Farahmand, Panasayya Yalla, Jens-Peter Kaps, and Kris Gaj

CAESAR Hardware API. Ekawat Homsirikamol, William Diehl, Ahmed Ferozpuri, Farnoud Farahmand, Panasayya Yalla, Jens-Peter Kaps, and Kris Gaj CAESAR Hardware API Ekawat Homsirikamol, William Diehl, Ahmed Ferozpuri, Farnoud Farahmand, Panasayya Yalla, Jens-Peter Kaps, and Kris Gaj Cryptographic Engineering Research Group George Mason University

More information

Hardware Architectures

Hardware Architectures Hardware Architectures Secret-key Cryptography Public-key Cryptography Cryptanalysis AES & AES candidates estream candidates Hash Functions SHA-3 Montgomery Multipliers ECC cryptosystems Pairing-based

More information

Hardware Implementation of the Code-based Key Encapsulation Mechanism using Dyadic GS Codes (DAGS)

Hardware Implementation of the Code-based Key Encapsulation Mechanism using Dyadic GS Codes (DAGS) Hardware Implementation of the Code-based Key Encapsulation Mechanism using Dyadic GS Codes (DAGS) Viet Dang and Kris Gaj ECE Department George Mason University Fairfax, VA, USA Introduction to DAGS The

More information

Pushing the Limits of SHA-3 Hardware Implementations to Fit on RFID

Pushing the Limits of SHA-3 Hardware Implementations to Fit on RFID Motivation Keccak Our Designs Results Comparison Conclusions 1 / 24 Pushing the Limits of SHA-3 Hardware Implementations to Fit on RFID Peter Pessl and Michael Hutter Motivation Keccak Our Designs Results

More information

CS-E4320 Cryptography and Data Security Lecture 5: Hash Functions

CS-E4320 Cryptography and Data Security Lecture 5: Hash Functions Lecture 5: Hash Functions Céline Blondeau Email: celine.blondeau@aalto.fi Department of Computer Science Aalto University, School of Science Hash Functions Birthday Paradox Design of Hash Functions SHA-3

More information

A Zynq-based Testbed for the Experimental Benchmarking of Algorithms Competing in Cryptographic Contests

A Zynq-based Testbed for the Experimental Benchmarking of Algorithms Competing in Cryptographic Contests A Zynq-based Testbed for the Experimental Benchmarking of Algorithms Competing in Cryptographic Contests Farnoud Farahmand, Ekawat Homsirikamol, and Kris Gaj George Mason University Fairfax, Virginia 22030

More information

CSCI 454/554 Computer and Network Security. Topic 4. Cryptographic Hash Functions

CSCI 454/554 Computer and Network Security. Topic 4. Cryptographic Hash Functions CSCI 454/554 Computer and Network Security Topic 4. Cryptographic Hash Functions Hash function lengths Outline Hash function applications MD5 standard SHA-1 standard Hashed Message Authentication Code

More information

Outline. Hash Function. Length of Hash Image. AIT 682: Network and Systems Security. Hash Function Properties. Question

Outline. Hash Function. Length of Hash Image. AIT 682: Network and Systems Security. Hash Function Properties. Question Hash function lengths Outline AIT 682: Network and Systems Security Topic 4. Cryptographic Hash Functions Instructor: Dr. Kun Sun Hash function applications MD5 standard SHA-1 standard Hashed Message Authentication

More information

Outline. AIT 682: Network and Systems Security. Hash Function Properties. Topic 4. Cryptographic Hash Functions. Instructor: Dr.

Outline. AIT 682: Network and Systems Security. Hash Function Properties. Topic 4. Cryptographic Hash Functions. Instructor: Dr. AIT 682: Network and Systems Security Topic 4. Cryptographic Hash Functions Instructor: Dr. Kun Sun Hash function lengths Outline Hash function applications MD5 standard SHA-1 standard Hashed Message Authentication

More information

Can High-Level Synthesis Compete Against a Hand-Written Code in the Cryptographic Domain? A Case Study

Can High-Level Synthesis Compete Against a Hand-Written Code in the Cryptographic Domain? A Case Study Can High-Level Synthesis Compete Against a Hand-Written Code in the Cryptographic Domain? A Case Study Ekawat Homsirikamol & Kris Gaj George Mason University USA Project supported by NSF Grant #1314540

More information

Fast implementations of secret-key block ciphers using mixed inner- and outer-round pipelining

Fast implementations of secret-key block ciphers using mixed inner- and outer-round pipelining Pawel Chodowiec, Po Khuon, Kris Gaj Electrical and Computer Engineering George Mason University Fast implementations of secret-key block ciphers using mixed inner- and outer-round pipelining http://ece.gmu.edu/crypto-text.htm

More information

Cryptographic Hash Functions. Rocky K. C. Chang, February 5, 2015

Cryptographic Hash Functions. Rocky K. C. Chang, February 5, 2015 Cryptographic Hash Functions Rocky K. C. Chang, February 5, 2015 1 This set of slides addresses 2 Outline Cryptographic hash functions Unkeyed and keyed hash functions Security of cryptographic hash functions

More information

Lecture 4: Authentication and Hashing

Lecture 4: Authentication and Hashing Lecture 4: Authentication and Hashing Introduction to Modern Cryptography 1 Benny Applebaum Tel-Aviv University Fall Semester, 2011 12 1 These slides are based on Benny Chor s slides. Some Changes in Grading

More information

ECE 545 Lecture 12. FPGA Resources. George Mason University

ECE 545 Lecture 12. FPGA Resources. George Mason University ECE 545 Lecture 2 FPGA Resources George Mason University Recommended reading 7 Series FPGAs Configurable Logic Block: User Guide Overview Functional Details 2 What is an FPGA? Configurable Logic Blocks

More information

Benchmarking of Round 3 CAESAR Candidates in Hardware: Methodology, Designs & Results

Benchmarking of Round 3 CAESAR Candidates in Hardware: Methodology, Designs & Results Benchmarking of Round 3 CAESAR Candidates in Hardware: Methodology, Designs & Results Ekawat Homsirikamol, Farnoud Farahmand, William Diehl, and Kris Gaj George Mason University USA http://cryptography.gmu.edu

More information

INTRODUCTION TO FPGA ARCHITECTURE

INTRODUCTION TO FPGA ARCHITECTURE 3/3/25 INTRODUCTION TO FPGA ARCHITECTURE DIGITAL LOGIC DESIGN (BASIC TECHNIQUES) a b a y 2input Black Box y b Functional Schematic a b y a b y a b y 2 Truth Table (AND) Truth Table (OR) Truth Table (XOR)

More information

HOST Cryptography III ECE 525 ECE UNM 1 (1/18/18)

HOST Cryptography III ECE 525 ECE UNM 1 (1/18/18) AES Block Cipher Blockciphers are central tool in the design of protocols for shared-key cryptography What is a blockcipher? It is a function E of parameters k and n that maps { 0, 1} k { 0, 1} n { 0,

More information

ECE 646 Lecture 12. Hash functions & MACs. Digital Signature. Required Reading. Recommended Reading. m message. hash function hash value.

ECE 646 Lecture 12. Hash functions & MACs. Digital Signature. Required Reading. Recommended Reading. m message. hash function hash value. ECE 646 Lecture 12 Required Reading W. Stallings, "Cryptography and Network-Security, Chapter 11 Cryptographic Hash Functions & MACs Appendix 11A Mathematical Basis of Birthday Attack Chapter 12 Message

More information

Sharing Resources Between AES and the SHA-3 Second Round Candidates Fugue and Grøstl

Sharing Resources Between AES and the SHA-3 Second Round Candidates Fugue and Grøstl Sharing Resources Between AES and the SHA-3 Second Round Candidates Fugue and Grøstl Kimmo Järvinen Department of Information and Computer Science Aalto University, School of Science and Technology Espoo,

More information

Cryptography. Summer Term 2010

Cryptography. Summer Term 2010 Summer Term 2010 Chapter 2: Hash Functions Contents Definition and basic properties Basic design principles and SHA-1 The SHA-3 competition 2 Contents Definition and basic properties Basic design principles

More information

ECE 699: Lecture 9. Programmable Logic Memories

ECE 699: Lecture 9. Programmable Logic Memories ECE 699: Lecture 9 Programmable Logic Memories Recommended reading XST User Guide for Virtex-6, Spartan-6, and 7 Series Devices Chapter 7, HDL Coding Techniques Sections: RAM HDL Coding Techniques ROM

More information

An 80Gbps FPGA Implementation of a Universal Hash Function based Message Authentication Code

An 80Gbps FPGA Implementation of a Universal Hash Function based Message Authentication Code An 8Gbps FPGA Implementation of a Universal Hash Function based Message Authentication Code Abstract We developed an architecture optimization technique called divide-and-concatenate and applied it to

More information

Compact Hardware Implementations of ChaCha, BLAKE, Threefish, and Skein on FPGA

Compact Hardware Implementations of ChaCha, BLAKE, Threefish, and Skein on FPGA Compact Hardware Implementations of ChaCha, BLAKE, Threefish, and Skein on FPGA Nuray At, Jean-Luc Beuchat, Eiji Okamoto, İsmail San, and Teppei Yamazaki Department of Electrical and Electronics Engineering,

More information

Lecture 5. Cryptographic Hash Functions. Read: Chapter 5 in KPS

Lecture 5. Cryptographic Hash Functions. Read: Chapter 5 in KPS Lecture 5 Cryptographic Hash Functions Read: Chapter 5 in KPS 1 Purpose CHF one of the most important tools in modern cryptography and security CHF-s are used for many authentication, integrity, digital

More information

ECE 545 Fall 2013 Final Exam

ECE 545 Fall 2013 Final Exam ECE 545 Fall 2013 Final Exam Problem 1 Develop an ASM chart for the circuit EXAM from your Midterm Exam, described below using its A. pseudocode B. table of input/output ports C. block diagram D. interface

More information

Message Authentication and Hash function 2

Message Authentication and Hash function 2 Message Authentication and Hash function 2 Concept and Example 1 SHA : Secure Hash Algorithm Four secure hash algorithms, SHA-11, SHA-256, SHA-384, and SHA-512. All four of the algorithms are iterative,

More information

Introduction to Network Security Missouri S&T University CPE 5420 Data Integrity Algorithms

Introduction to Network Security Missouri S&T University CPE 5420 Data Integrity Algorithms Introduction to Network Security Missouri S&T University CPE 5420 Data Integrity Algorithms Egemen K. Çetinkaya Egemen K. Çetinkaya Department of Electrical & Computer Engineering Missouri University of

More information

ECE 545: Lecture 11. Programmable Logic Memories

ECE 545: Lecture 11. Programmable Logic Memories ECE 545: Lecture 11 Programmable Logic Memories Recommended reading Vivado Design Suite User Guide: Synthesis Chapter 4 RAM HDL Coding Techniques Initializing RAM Contents 7 Series FPGAs Memory Resources:

More information

ECE 545: Lecture 11. Programmable Logic Memories. Recommended reading. Memory Types. Memory Types. Memory Types specific to Xilinx FPGAs

ECE 545: Lecture 11. Programmable Logic Memories. Recommended reading. Memory Types. Memory Types. Memory Types specific to Xilinx FPGAs ECE 545: Lecture 11 Programmable Logic Memories Recommended reading Vivado Design Suite User Guide: Synthesis Chapter 4 RAM HDL Coding Techniques Initializing RAM Contents 7 Series FPGAs Resources: User

More information

Implementation and Comparative Analysis of AES as a Stream Cipher

Implementation and Comparative Analysis of AES as a Stream Cipher Implementation and Comparative Analysis of AES as a Stream Cipher Bin ZHOU, Yingning Peng Dept. of Electronic Engineering, Tsinghua University, Beijing, China, 100084 e-mail: zhoubin06@mails.tsinghua.edu.cn

More information

Compact Implementation of Threefish and Skein on FPGA

Compact Implementation of Threefish and Skein on FPGA Compact Implementation of Threefish and Skein on FPGA Nuray At, Jean-Luc Beuchat, and İsmail San Department of Electrical and Electronics Engineering, Anadolu University, Eskişehir, Turkey Email: {nat,

More information

FPGA for Complex System Implementation. National Chiao Tung University Chun-Jen Tsai 04/14/2011

FPGA for Complex System Implementation. National Chiao Tung University Chun-Jen Tsai 04/14/2011 FPGA for Complex System Implementation National Chiao Tung University Chun-Jen Tsai 04/14/2011 About FPGA FPGA was invented by Ross Freeman in 1989 SRAM-based FPGA properties Standard parts Allowing multi-level

More information

FPGA Implementation of an HMAC Processor based on the SHA-2 Family of Hash Functions

FPGA Implementation of an HMAC Processor based on the SHA-2 Family of Hash Functions FPGA Implementation of an HMAC Processor based on the SHA-2 Family of Hash Functions Marcio Juliato Dept. of Electrical and Computer Engineering University of Waterloo 200 University Avenue West Waterloo,

More information

Benchmarking of Round 2 CAESAR Candidates in Hardware: Methodology, Designs & Results

Benchmarking of Round 2 CAESAR Candidates in Hardware: Methodology, Designs & Results Benchmarking of Round 2 CAESAR Candidates in Hardware: Methodology, Designs & Results Ekawat Homsirikamol, Panasayya Yalla, Ahmed Ferozpuri, William Diehl, Farnoud Farahmand, Michael X. Lyons, and Kris

More information

Introduction to Field Programmable Gate Arrays

Introduction to Field Programmable Gate Arrays Introduction to Field Programmable Gate Arrays Lecture 1/3 CERN Accelerator School on Digital Signal Processing Sigtuna, Sweden, 31 May 9 June 2007 Javier Serrano, CERN AB-CO-HT Outline Historical introduction.

More information

Compact implementations of Grøstl, JH and Skein for FPGAs

Compact implementations of Grøstl, JH and Skein for FPGAs Compact implementations of Grøstl, JH and Skein for FPGAs Bernhard Jungk Hochschule RheinMain University of Applied Sciences Wiesbaden Rüsselsheim Geisenheim bernhard.jungk@hs-rm.de Abstract. This work

More information

CSCE 715: Network Systems Security

CSCE 715: Network Systems Security CSCE 715: Network Systems Security Chin-Tser Huang huangct@cse.sc.edu University of South Carolina Next Topic in Cryptographic Tools Symmetric key encryption Asymmetric key encryption Hash functions and

More information

Fast implementation and fair comparison of the final candidates for Advanced Encryption Standard using Field Programmable Gate Arrays

Fast implementation and fair comparison of the final candidates for Advanced Encryption Standard using Field Programmable Gate Arrays Fast implementation and fair comparison of the final candidates for Advanced Encryption Standard using Field Programmable Gate Arrays Kris Gaj and Pawel Chodowiec George Mason University, Electrical and

More information

Performance Evaluation of Cryptographic Algorithms on Reconfigurable Hardware: MD5 based on Timing and Area Implementation

Performance Evaluation of Cryptographic Algorithms on Reconfigurable Hardware: MD5 based on Timing and Area Implementation Performance Evaluation of Cryptographic Algorithms on Reconfigurable Hardware: MD5 based on Timing and Area Implementation S. Suhaili *,1,a and T. Watanabe 2,b 1 Faculty of Engineering, Universiti Malaysia

More information

Implementation and Analysis of the PRIMATEs Family of Authenticated Ciphers

Implementation and Analysis of the PRIMATEs Family of Authenticated Ciphers Implementation and Analysis of the PRIMATEs Family of Authenticated Ciphers Ahmed Ferozpuri Abstract Lightweight devices used for encrypted communication require a scheme that can operate in a low resource

More information

RC-6 CRYPTOSYSTEM IN VHDL. BY:- Deepak Singh Samant

RC-6 CRYPTOSYSTEM IN VHDL. BY:- Deepak Singh Samant RC-6 CRYPTOSYSTEM IN VHDL BY:- Deepak Singh Samant OBJECTIVE: TO IMPLEMENT A CRYPTOSYSTEM USING RIVEST CIPHER-6 (RC6) ALGORITHM IN VHDL(FPGA) What is CRYPTOLOGY? CRYPTOGRAPHY is the art and science of

More information

AES as A Stream Cipher

AES as A Stream Cipher > AES as A Stream Cipher < AES as A Stream Cipher Bin ZHOU, Kris Gaj, Department of ECE, George Mason University Abstract This paper presents implementation of advanced encryption standard (AES) as a stream

More information

Basic FPGA Architectures. Actel FPGAs. PLD Technologies: Antifuse. 3 Digital Systems Implementation Programmable Logic Devices

Basic FPGA Architectures. Actel FPGAs. PLD Technologies: Antifuse. 3 Digital Systems Implementation Programmable Logic Devices 3 Digital Systems Implementation Programmable Logic Devices Basic FPGA Architectures Why Programmable Logic Devices (PLDs)? Low cost, low risk way of implementing digital circuits as application specific

More information

TABLE OF CONTENTS CHAPTER NO. TITLE PAGE NO.

TABLE OF CONTENTS CHAPTER NO. TITLE PAGE NO. vii TABLE OF CONTENTS CHAPTER NO. TITLE PAGE NO. ABSTRACT LIST OF TABLES LIST OF FIGURES LIST OF SYMBOLS AND ABBREVIATION iii xii xiv xvii 1 INTRODUCTION 1 1.1 GENERAL 1 1.2 TYPES OF WIRELESS COMMUNICATION

More information

Hardware Performance Evaluation of SHA-3 Candidate Algorithms

Hardware Performance Evaluation of SHA-3 Candidate Algorithms Journal of Information Security, 2012, 3, 69-76 http://dx.doi.org/10.4236/jis.2012.32008 Published Online April 2012 (http://www.scirp.org/journal/jis) Hardware Performance Evaluation of SHA-3 Candidate

More information

Section III. Transport and Communication

Section III. Transport and Communication Section III. Transport and Communication This section describes communication and transport peripherals provided for SOPC Builder systems. This section includes the following chapters: Chapter 16, SPI

More information

Lightweight Implementations of SHA-3 Candidates on FPGAs

Lightweight Implementations of SHA-3 Candidates on FPGAs Lightweight Implementations of SHA-3 Candidates on FPGAs Jens-Peter Kaps, Panasayya Yalla, Kishore Kumar Surapathi, Bilal Habib, Susheel Vadlamudi, Smriti Gurung, and John Pham ECE Department, George Mason

More information

On the parallelization of slice-based Keccak implementations on Xilinx FPGAs

On the parallelization of slice-based Keccak implementations on Xilinx FPGAs On the parallelization of slice-based Keccak implementations on Xilinx FPGAs Jori Winderickx, Joan Daemen and Nele Mentens KU Leuven, ESAT/COSIC & iminds, Leuven, Belgium STMicroelectronics Belgium & Radboud

More information

CubeHash parameter tweak: 10 smaller MAC overhead

CubeHash parameter tweak: 10 smaller MAC overhead CubeHash parameter tweak: 10 smaller MAC overhead Daniel J. Bernstein Department of Computer Science University of Illinois at Chicago Chicago, IL 60607 7045 cubehash@box.cr.yp.to 1 Introduction CubeHashi+r/b+f

More information

Secure Hash Algorithm-3(SHA-3) implementation on Xilinx FPGAs, Suitable for IoT Applications

Secure Hash Algorithm-3(SHA-3) implementation on Xilinx FPGAs, Suitable for IoT Applications Secure Hash Algorithm-3(SHA-3) implementation on Xilinx FPGAs, Suitable for IoT Applications Muzaffar Rao, Thomas Newe and Ian Grout University of Limerick, Ireland muhammad.rao @ ul.ie, thomas.newe @

More information

CSE 127: Computer Security Cryptography. Kirill Levchenko

CSE 127: Computer Security Cryptography. Kirill Levchenko CSE 127: Computer Security Cryptography Kirill Levchenko October 24, 2017 Motivation Two parties want to communicate securely Secrecy: No one else can read messages Integrity: messages cannot be modified

More information

Efficient Hardware Implementations of High Throughput SHA-3 Candidates Keccak, Luffa and Blue Midnight Wish for Single- and Multi-Message Hashing

Efficient Hardware Implementations of High Throughput SHA-3 Candidates Keccak, Luffa and Blue Midnight Wish for Single- and Multi-Message Hashing Efficient Hardware Implementations of High Throughput SHA-3 Candidates Keccak, Luffa and Blue Midnight Wish for Single- and Multi-Message Hashing Abdulkadir Akın, Aydın Aysu, Onur Can Ulusel, and Erkay

More information

Toward a New Methodology for Hardware Benchmarking of Candidates in Cryptographic Competitions: The CAESAR Contest Case Study

Toward a New Methodology for Hardware Benchmarking of Candidates in Cryptographic Competitions: The CAESAR Contest Case Study Toward a New Methodology for Hardware Benchmarking of Candidates in Cryptographic Competitions: The CAESAR Contest Case Study Ekawat Homsirikamol and Kris Gaj George Mason University, U.S.A. Fairfax, Virginia

More information

CS408 Cryptography & Internet Security

CS408 Cryptography & Internet Security CS408 Cryptography & Internet Security Lecture 18: Cryptographic hash functions, Message authentication codes Functions Definition Given two sets, X and Y, a function f : X Y (from set X to set Y), is

More information

A hash function is strongly collision-free if it is computationally infeasible to find different messages M and M such that H(M) = H(M ).

A hash function is strongly collision-free if it is computationally infeasible to find different messages M and M such that H(M) = H(M ). CA4005: CRYPTOGRAPHY AND SECURITY PROTOCOLS 1 5 5.1 A hash function is an efficient function mapping binary strings of arbitrary length to binary strings of fixed length (e.g. 128 bits), called the hash-value

More information

Efficient Hardware Design and Implementation of AES Cryptosystem

Efficient Hardware Design and Implementation of AES Cryptosystem Efficient Hardware Design and Implementation of AES Cryptosystem PRAVIN B. GHEWARI 1 MRS. JAYMALA K. PATIL 1 AMIT B. CHOUGULE 2 1 Department of Electronics & Telecommunication 2 Department of Computer

More information

Cryptographic Checksums

Cryptographic Checksums Cryptographic Checksums Mathematical function to generate a set of k bits from a set of n bits (where k n). k is smaller then n except in unusual circumstances Example: ASCII parity bit ASCII has 7 bits;

More information

Jaap van Ginkel Security of Systems and Networks

Jaap van Ginkel Security of Systems and Networks Jaap van Ginkel Security of Systems and Networks November 17, 2016 Part 3 Modern Crypto SSN Modern Cryptography Hashes MD5 SHA Secret key cryptography AES Public key cryptography DES Presentations Minimum

More information

Lecture 8. RTL Design Methodology. Transition from Pseudocode & Interface to a Corresponding Block Diagram

Lecture 8. RTL Design Methodology. Transition from Pseudocode & Interface to a Corresponding Block Diagram Lecture 8 RTL Design Methodology Transition from Pseudocode & Interface to a Corresponding Block Diagram Structure of a Typical Digital Data Inputs Datapath (Execution Unit) Data Outputs System Control

More information

Network Security. Cryptographic Hash Functions Add-on. Benjamin s slides are authoritative. Chair for Network Architectures and Services

Network Security. Cryptographic Hash Functions Add-on. Benjamin s slides are authoritative. Chair for Network Architectures and Services Chair for Network Architectures and Services Technische Universität München Network Security Cryptographic Hash Functions Add-on Benjamin s slides are authoritative Motivation (1) Common practice in data

More information

EECS 151/251A Spring 2019 Digital Design and Integrated Circuits. Instructor: John Wawrzynek. Lecture 18 EE141

EECS 151/251A Spring 2019 Digital Design and Integrated Circuits. Instructor: John Wawrzynek. Lecture 18 EE141 EECS 151/251A Spring 2019 Digital Design and Integrated Circuits Instructor: John Wawrzynek Lecture 18 Memory Blocks Multi-ported RAM Combining Memory blocks FIFOs FPGA memory blocks Memory block synthesis

More information

The SHA-3 Process. Keccak & SHA-3 day Brussels, 27 March 2013

The SHA-3 Process. Keccak & SHA-3 day Brussels, 27 March 2013 The SHA-3 Process Keccak & SHA-3 day Brussels, 27 March 2013 Timeline 05 06 07 08 09 10 11 12 13 Summer 2005: Attacks on MD5, RIPEMD, SHA-0, SHA-1 The Wang effect Before 2005 MD4 (Dobbertin) MD5 (Boss.,

More information

Keccak discussion. Soham Sadhu. January 9, 2012

Keccak discussion. Soham Sadhu. January 9, 2012 Keccak discussion Soham Sadhu January 9, 2012 Keccak (pronounced like Ketchak ) is a cryptographic hash function designed by Guido Bertoni, Joan Daemen, Michaël Peeters and Gilles Van Assche. Keccak is

More information

Security IP-Cores. AES Encryption & decryption RSA Public Key Crypto System H-MAC SHA1 Authentication & Hashing. l e a d i n g t h e w a y

Security IP-Cores. AES Encryption & decryption RSA Public Key Crypto System H-MAC SHA1 Authentication & Hashing. l e a d i n g t h e w a y AES Encryption & decryption RSA Public Key Crypto System H-MAC SHA1 Authentication & Hashing l e a d i n g t h e w a y l e a d i n g t h e w a y Secure your sensitive content, guarantee its integrity and

More information

Integrity of messages

Integrity of messages Lecturers: Mark D. Ryan and David Galindo. Cryptography 2016. Slide: 106 Integrity of messages Goal: Ensure change of message by attacker can be detected Key tool: Cryptographic hash function Definition

More information