Open mjl0602 opened 4 years ago
There is Java code like this:
GCMParameterSpec parameterSpec = new GCMParameterSpec(32, ivBuffer); SecretKeySpec skSpec = new SecretKeySpec(key, "AES"); Cipher cipher = Cipher.getInstance("AES/CCM/NoPadding"); cipher.init(Cipher.ENCRYPT_MODE, skSpec, parameterSpec); cipher.updateAAD(macKey); outBuffer = cipher.doFinal(plainBuffer);
but i cannot find this in mode Mac("AES/CBC_CMAC"), there is only one KeyParameter.
I am not sure that i found right mode, is AES-CCM same as AES/CBC_CMAC ?
There is Java code like this:
but i cannot find this in mode Mac("AES/CBC_CMAC"), there is only one KeyParameter.
I am not sure that i found right mode, is AES-CCM same as AES/CBC_CMAC ?