Closed ghost closed 6 years ago
ECB is supported, it's exported in the asmcrypto.all.js
file or you can direcly import it from the src/aes/ecb/exports.js
file.
CMAC is not on the shortlist for implementation, however PR is welcome. Eventually it may be supported, however I don't have any spare time in the next month.
What's your use case, is it something with the Web Bluetooth API?
OK, thanks I hadn't realised that. AES-CMAC is used in Bluetooth mesh which is a new Bluetooth technology. It is not related to Web Bluetooth. See https://www.bluetooth.com/bluetooth-technology/topology-options/le-mesh
Btw the README says ECB support is still 'to do' which is why I thought it was not supported. See https://github.com/asmcrypto/asmcrypto.js/blob/master/README.md#aes_ecb
Good point, thanks!
Apparently you're ahead of schedule :-)
@alippai are you certain ECB is supported? Maybe it's a work in progress?
https://github.com/asmcrypto/asmcrypto.js/issues/137
https://github.com/asmcrypto/asmcrypto.js/issues/138
Maybe I'm doing something wrong. If so would you mind providing a very simple code sample, similar to that which I included in https://github.com/asmcrypto/asmcrypto.js/issues/138 ?
Thanks
Do you think you could schedule some time to add support for AES-CMAC? I'm using asmcrypto for all crypto functions in my project except for AES-CMAC and it would be great if I could source all the crypto functions I need for both browser and node.js from the same library.
Thanks in anticipation!
I have to ask @ngg, however based on the NIST papers it should be easy to implement.
OK, that would be great if it's possible.
Added the AES-CMAC mode. It needs further testing, but it's usable.
Thanks very much :-)
It would be great if these two algorithms were supported. The new Bluetooth mesh (https://www.bluetooth.com/bluetooth-technology/topology-options/le-mesh) uses them alongside AES-CCM.