.iem.BouncyCastle.3.1.3.source-code.CCMBlockCipher.crysl Maven / Gradle / Ivy
The newest version!
SPEC org.bouncycastle.crypto.modes.CCMBlockCipher
OBJECTS
org.bouncycastle.crypto.BlockCipher engine;
org.bouncycastle.crypto.CipherParameters params;
byte aadByte;
byte[] aadBytes;
int aadOff;
int aadLen;
byte plainTextByte;
byte[] plainText;
int plainTextOffset;
int plainTextLen;
byte[] cipherText;
int cipherTextOffset;
boolean isEncryption;
FORBIDDEN
CCMBlockCipher(org.bouncycastle.crypto.BlockCipher);
EVENTS
c1: newInstance(engine);
Con := c1;
i1: init(isEncryption, params);
Init := i1;
pa1: processAADByte(aadByte);
pa2: processAADBytes(aadBytes, aadOff, aadLen);
ProcessAAD := pa1 | pa2;
p1: processByte(plainTextByte, cipherText, cipherTextOffset);
p2: processBytes(plainText, plainTextOffset, plainTextLen, cipherText, cipherTextOffset);
Process := p1 | p2;
df1: doFinal(cipherText, cipherTextOffset);
DoFinal := df1;
ORDER
Con, Init, ProcessAAD*, Process+, DoFinal
CONSTRAINTS
length[cipherText] >= cipherTextOffset;
length[plainText] >= plainTextOffset + plainTextLen;
plainTextOffset >= 0;
plainTextLen > 0;
cipherTextOffset >= 0;
REQUIRES
generatedAESEngine[engine] || generatedAESLightEngine[engine] || generatedRijndaelEngine[engine];
generatedAEADParameters[params] || generatedParametersWithIV[params];