Skip to content
This repository has been archived by the owner on Dec 23, 2020. It is now read-only.

How can i use AES-CCM with Nonce, SecretKey and ADD #234

Open
mjl0602 opened this issue Aug 6, 2020 · 0 comments
Open

How can i use AES-CCM with Nonce, SecretKey and ADD #234

mjl0602 opened this issue Aug 6, 2020 · 0 comments

Comments

@mjl0602
Copy link

mjl0602 commented Aug 6, 2020

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 ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant