0

Is there a Node.js module that handles AES-CMAC (RFC 4493)?

I've been searching around NPM, Google, and the like, but haven't found one. Somebody within my company built one that wraps Crypto++ as a C++ addon for Node.js, but unfortunately it doesn't build on Windows (depends on make). Just looking for possible alternatives.

This is similar to this other question, but I'm hoping for a Node.js specific implementation instead of a plain JavaScript one. Ideally something that makes use of Node's crypto library or a C/C++ addon for performance.

It seems like it wouldn't be too hard to build one, but I'd like to avoid doing so if there is already one out there.

Community
  • 1
  • 1
Allan
  • 1,063
  • 10
  • 18
  • can you build using cygwin? – secretformula Jun 02 '14 at 18:19
  • One of the devs on my team is currently experimenting with using cygwin. Another dev is looking at the possibility of creating an alternate for `make` on Windows to make it more `node-gyp` friendly. But I figured I'd ask this question to see if anyone else might have needed AES-CMAC in Node.js and already built something. – Allan Jun 02 '14 at 18:30
  • Have you got solution for this? if you got any solution, please let me know – Piraba Nov 11 '14 at 09:52
  • @Piraba yes! See below. I finally finished up my own implementation. – Allan Nov 12 '14 at 19:24

1 Answers1

3

Since I couldn't find anything, I ended up creating my own module: node-aes-cmac

As I learned more, I discovered that RFC 4493 is specific for 128 bit keys (AES128). But it references the NIST Special Publication 800-38B which gave the additional information I needed to support 192 and 256 bit keys as well.

Allan
  • 1,063
  • 10
  • 18