MCPcopy Create free account
hub / github.com/S3N4T0R-0X0/PixelCode-Attack / InvCipher

Function InvCipher

payload.cpp:545–567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

543
544#if (defined(CBC) && CBC == 1) || (defined(ECB) && ECB == 1)
545static void InvCipher(state_t* state, const uint8_t* RoundKey)
546{
547 uint8_t round = 0;
548
549 // Add the First round key to the state before starting the rounds.
550 AddRoundKey(Nr, state, RoundKey);
551
552 // There will be Nr rounds.
553 // The first Nr-1 rounds are identical.
554 // These Nr rounds are executed in the loop below.
555 // Last one without InvMixColumn()
556 for (round = (Nr - 1); ; --round)
557 {
558 InvShiftRows(state);
559 InvSubBytes(state);
560 AddRoundKey(round, state, RoundKey);
561 if (round == 0) {
562 break;
563 }
564 InvMixColumns(state);
565 }
566
567}
568#endif // #if (defined(CBC) && CBC == 1) || (defined(ECB) && ECB == 1)
569
570/*****************************************************************************/

Callers 2

AES_ECB_decryptFunction · 0.85
AES_CBC_decrypt_bufferFunction · 0.85

Calls 4

AddRoundKeyFunction · 0.85
InvShiftRowsFunction · 0.85
InvSubBytesFunction · 0.85
InvMixColumnsFunction · 0.85

Tested by

no test coverage detected