Skip to content
Snoopy87 edited this page Jul 22, 2019 · 7 revisions

Overview

Key-Hash message authentication code (HMAC) is a type of MAC (Message Authentication Code) which is used to verify the integrity and the authenticity of a message. HMAC is computed by using a secret key and a hash function (MD5, SHA-1, SHA-2, ...).

HMAC

Core available

  • HMACCore_Std

Measure

Core Target Performance Aera RAM
*_Std Altera Cyclone V (C6) - - -

Example

import spinal.crypto.hash._
import spinal.crypto.hash.md5._

val md5  = new MD5Core_Std()
val hmac = new HMACCore_Std(HMACCoreStdConfig(md5.g.hashBlockWidth, md5.g))

hmac.io.hashCore <> md5.io
hmac.io.hmacCore <> ... // connect the hmac interface 
Clone this wiki locally