# How can I get VMAC Code in pure c?

I had find a paper about VMAC algorithm:VMAC: Message Authentication Code using Universal Hashing.

Now I want to implement this algorithm, But i don't find test vectors about it.

Who can give some advise? Where can i find it's code ?

• Did you see the appendix? tools.ietf.org/html/draft-krovetz-vmac-00#section-7 Mar 29 '20 at 7:54
• Can you give me code about c language?
– Land
Mar 29 '20 at 8:10
• Hmm. Do you want to code it yourself or not? Test vectors are inputs, outputs, and maybe some internals. Sorry, Crypto.SE is not related to coding serve Mar 29 '20 at 8:18
• I have decided against closing this question because it asks for test vectors, a question which is very much on-topic for Crypto.SE. However requests for non-trivial implementations are off-topic across the entirety of SE (except for library requests with that implementation which are for Software Recommendations). I'll leave it to answerers to optionally link to an implementation.
– SEJPM
Mar 29 '20 at 10:55

## 1 Answer

VMAC was a joint work by Wei Dai and Ted Krovetz. It so happens that Wei Dai at that time was also actively working on his own cryptographic library (Crypto++), which of course also includes VMAC.

You can find the test vectors here and the optimized implementation here.

Two examples for VMAC-AES-128 are:

Key: "abcdefghijklmnop"
IV: "bcdefghi"

Message: ""
MAC: 472766C70F74ED23481D6D7DE4E80DAC
Message: "abc"
MAC: 4EE815A06A1D71EDD36FC75D51188A42

• Thanks for your help.
– Land
Apr 1 '20 at 5:22