/* WARNING: Type propagation algorithm not settling */
void CCMP_test_vector(void)
{
int iVar1;
int local_110 [2];
undefined2 local_108;
undefined4 local_104;
undefined4 local_100;
undefined1 auStack_fc [16];
undefined1 auStack_ec [16];
undefined1 auStack_dc [20];
undefined1 auStack_c8 [24];
undefined1 auStack_b0 [24];
undefined1 auStack_98 [28];
undefined1 auStack_7c [104];
memcpy(auStack_ec,&C_506_39057,0x10) //possible issue identified - semgrep
local_108 = 0xb503;
local_110[1] = 0x9776e70c;
memcpy(auStack_b0,C_508_39059,0x18) //possible issue identified - semgrep
memcpy(auStack_c8,C_509_39060,0x16) //possible issue identified - semgrep
local_100 = 0xb5039776;
local_104 = 0x2000e70c;
memcpy(auStack_fc,C_511_39062,0xd) //possible issue identified - semgrep
memcpy(auStack_dc,C_512_39063,0x14) //possible issue identified - semgrep
memcpy(auStack_98,C_513_39064,0x1c) //possible issue identified - semgrep
local_110[0] = 0;
printk("== CCMP test vector == \n");
memset(auStack_7c,0,100) //possible issue identified - semgrep
local_110[0] = 0;
RTMPConstructCCMPAAD(auStack_b0,1,0,0,auStack_7c,local_110);
if ((local_110[0] == 0x16) && (iVar1 = memcmp(auStack_7c,auStack_c8,0x16), iVar1 == 0)) {
printk("Construct AAD is OK!!!\n");
}
else {
printk("\n!!!Construct AAD is FAILURE!!!\n\n");
hex_dump("Calculate AAD",auStack_7c,local_110[0]);
}
memset(auStack_7c,0,100) //possible issue identified - semgrep
local_110[0] = 0;
RTMPConstructCCMPNonce(auStack_b0,0,0,0,local_110 + 1,auStack_7c,local_110);
if ((local_110[0] == 0xd) && (iVar1 = memcmp(auStack_7c,auStack_fc,0xd), iVar1 == 0)) {
printk("Construct NONCE is OK!!!\n");
}
else {
printk("\n!!!Construct NONCE is FAILURE!!!\n\n");
hex_dump("Calculate NONCE",auStack_7c,local_110[0]);
}
memset(auStack_7c,0,100) //possible issue identified - semgrep
local_110[0] = 0;
RTMPConstructCCMPHdr(0,local_110 + 1,auStack_7c);
iVar1 = memcmp(auStack_7c,&local_104,8);
if (iVar1 == 0) {
printk("Construct CCMP_HDR is OK!!!\n");
}
else {
printk("\n!!!Construct CCMP_HDR is FAILURE!!!\n\n");
hex_dump("Calculate CCMP_HDR",auStack_7c,8);
}
memset(auStack_7c,0,100) //possible issue identified - semgrep
memmove(auStack_7c,auStack_dc,0x14) //possible issue identified - semgrep
local_110[0] = 0x1c;
iVar1 = AES_CCM_Encrypt(auStack_7c,0x14,auStack_ec,0x10,auStack_fc,0xd,auStack_c8,0x16,8,
auStack_7c,local_110);
if (iVar1 == 0) {
if ((local_110[0] == 0x1c) && (iVar1 = memcmp(auStack_7c,auStack_98,0x1c), iVar1 == 0)) {
printk("CCM_Encrypt is OK!!!\n");
}
else {
printk("\n!!!CCM_Encrypt is FAILURE!!!\n\n");
hex_dump("CCM_Encrypt",auStack_7c,local_110[0]);
}
}
memset(auStack_7c,0,100) //possible issue identified - semgrep
memmove(auStack_7c,auStack_98,0x1c) //possible issue identified - semgrep
local_110[0] = 0x14;
iVar1 = AES_CCM_Decrypt(auStack_7c,0x1c,auStack_ec,0x10,auStack_fc,0xd,auStack_c8,0x16,8,
auStack_7c,local_110);
if (iVar1 == 0) {
if ((local_110[0] == 0x14) && (iVar1 = memcmp(auStack_7c,auStack_dc,0x14), iVar1 == 0)) {
printk("CCM_Decrypt is OK!!!\n");
}
else {
printk("\n!!!CCM_Decrypt is FAILURE!!!\n\n");
hex_dump("CCM_Decrypt",auStack_7c,local_110[0]);
}
}
printk("== CCMP test vector == \n");
return;
}