VMAC

Short description: Message authentication code algorithm

VMAC is a block cipher-based message authentication code (MAC) algorithm using a universal hash proposed by Ted Krovetz and Wei Dai in April 2007. The algorithm was designed for high performance backed by a formal analysis.[citation needed]

VMAC is designed to have exceptional performance in software on 64-bit CPU architectures while still performing well on 32-bit architectures.[citation needed] Measured speeds are as fast as one-half CPU cycle per byte (cpb) on 64-bit architectures, under five cpb on desktop 32-bit processors, and around ten cpb on embedded 32-bit architectures.[1] A closely related variant of VMAC that is optimized for 32-bit architectures is given by UMAC.

## Contents

* 1 Overview
* 2 Implementations
* 3 References
* 4 External links

## Overview

VMAC is a MAC in the style of Wegman and Carter.[2][3] A fast "universal" hash function is used to hash an input message M into a short string.[citation needed] This short string is then combined by addition with a pseudorandom pad, resulting in the VMAC tag. Security depends on the sender and receiver sharing a randomly chosen secret hash function and pseudorandom pad. This is achieved by using keyed hash function H and pseudorandom function F. A tag is generated by performing the computation

Tag = HK1(M) + FK2(Nonce)

where K1 and K2 are secret random keys shared by sender and receiver, and Nonce is a value that changes with each generated tag. The receiver needs to know which nonce was used by the sender, so some method of synchronizing nonces needs to be used. This can be done by explicitly sending the nonce along with the message and tag, or agreeing upon the use of some other non-repeating value such as a sequence number. The nonce need not be kept secret, but care needs to be taken to ensure that, over the lifetime of a VMAC key, a different nonce is used with each message.

VMAC uses a function, called VHASH (also specified in this document), as the keyed hash function H and uses a pseudorandom function F whose default implementation uses the AES block cipher. VMAC allows for tag lengths of any 64-bit multiple up to the block size of the block cipher in use. When using AES, this means VMAC can produce 64- or 128-bit tags.

The theory of Wegman-Carter MACs and the analysis of VMAC show that if one "instantiates" VMAC with truly random keys and pads then the probability that an attacker (even a computationally unbounded one) produces a correct tag for messages of its choosing is less than 1/260 or 1/2120 when the tags are of length 64 or 128 bits, respectively. When an attacker makes N forgery attempts the probability of getting one or more tags right increases linearly to less than N/260 or N/2120. In an applied implementation of VMAC, using AES to produce keys and pads, these forgery probabilities increase by a small amount related to the security of AES. As long as AES is secure, this small additive term is insignificant for any practical attack. See specification for more details. Analysis of VMAC security has been carried out by authors Wei Dai and Ted Krovetz.[citation needed][4]

## Implementations

* C [5][6]
* C++ [7][8]
* Python[9]

## References

1. ↑ T. Krovetz and W. Dai (2007). "VMAC: Message Authentication Code using Universal Hashing". CFRG Working Group. IETF. http://www.fastcrypto.org/vmac/draft-krovetz-vmac-01.txt.
2. ↑ J. Carter; M. Wegman (1977). "Universal classes of hash functions (Extended Abstract)". Proceedings of the ninth annual ACM symposium on Theory of computing - STOC '77. ACM. pp. 106–112. doi:10.1145/800105.803400.
3. ↑ J. Carter; M. Wegman (1981). "New hash functions and their use in authentication and set equality". Journal of Computer and System Sciences 22 (3): 265–279. doi:10.1016/0022-0000(81)90033-7.
4. ↑ T. Krovetz (2007). "Message Authentication on 64-Bit Architectures". Selected Areas in Cryptography. Lecture Notes in Computer Science. 4356. Springer-Verlag. pp. 327–341. doi:10.1007/978-3-540-74462-7_23. ISBN 978-3-540-74461-0. http://eprint.iacr.org/2006/037.pdf.
5. ↑ "vmac.h (source code)". https://www.fastcrypto.org/vmac/vmac.h.
6. ↑ "vmac.c (source code)". https://www.fastcrypto.org/vmac/vmac.c.
7. ↑ "Crypto++: vmac.h Source File". https://www.cryptopp.com/docs/ref/vmac_8h_source.html.
8. ↑ "Crypto++: vmac.cpp Source File". https://www.cryptopp.com/docs/ref/vmac_8cpp_source.html.
9. ↑ Krovetz, Ted (2007-04-22). "An unoptimized, straightforward reference implementation of VMAC". https://www.fastcrypto.org/vmac/vmac.txt.

## External links

* VMAC: Message Authentication Code using Universal Hashing \- Internet draft
* VMAC Home page
* Cryptolounge VMAC wiki entry

* v
* t
* e

Cryptographic hash functions & message authentication codes

* List
* Comparison
* Known attacks

Common functions|

* MD5
* SHA-1
* SHA-2
* SHA-3
* BLAKE2

SHA-3 finalists|

* BLAKE
* Grøstl
* JH
* Skein
* Keccak (winner)

Other functions|

* CubeHash
* ECOH
* FSB
* GOST
* HAS-160
* HAVAL
* Kupyna
* LM hash
* MD2
* MD4
* MD6
* MDC-2
* N-Hash
* RIPEMD
* RadioGatún
* SM3
* SWIFFT
* Snefru
* Streebog
* Tiger
* VSH
* Whirlpool

Key derivation functions|

* Argon2
* Balloon
* bcrypt
* crypt
* Lyra2
* PBKDF2
* scrypt

MAC functions|

* DAA
* CBC-MAC
* GMAC
* HMAC
* NMAC
* OMAC/CMAC
* PMAC
* VMAC
* UMAC
* Poly1305
* SipHash

Authenticated
encryption modes|

* CCM
* CWC
* EAX
* GCM
* IAPM
* OCB

Attacks|

* Collision attack
* Preimage attack
* Birthday attack
* Brute-force attack
* Rainbow table
* Side-channel attack
* Length extension attack

Design|

* Avalanche effect
* Hash collision
* Merkle–Damgård construction
* Sponge function
* HAIFA construction

Standardization|

* CRYPTREC
* NESSIE
* NIST hash function competition

Utilization|

* Hash-based cryptography
* Key stretching
* Merkle tree
* Message authentication
* Proof of work
* Salt
* Pepper

* v
* t
* e

Cryptography

* History of cryptography
* Cryptanalysis
* Outline of cryptography

* Symmetric-key algorithm
* Block cipher
* Stream cipher
* Public-key cryptography
* Cryptographic hash function
* Message authentication code
* Random numbers
* Steganography

* Category

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/VMAC. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=VMAC&oldid=3368094"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template