AES-CMAC module for Node.js?

ε祈祈猫儿з 提交于 2021-02-11 17:23:46

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/24000834/aes-cmac-module-for-node-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!