Currently this code runs in Python, without issue :
#!/usr/bin/python
print('Content-type: text/html\r\n\r')
#! /usr/bin/env python -2
from binascii import hexlify, unhexlify
from Crypto.Cipher import AES
#
# PICCData decryption
# PICCData = AES-128_DECRYPT(KSDMMetaRead; PICCDataTag[||UID] [||SDMReadCtr]||RandomPadding)
IV = 16 * '\x00'
key = 16 * '\x00' # FileAR.SDMMetaRead Key
# Enc_PICC_Data = '\xEF\x96\x3F\xF7\x82\x86\x58\xA5\x99\xF3\x04\x15\x10\x67\x1E\x88'
Enc_PICC_Data = 'EF963FF7828658A599F3041510671E88'
myaes = AES.new(key, AES.MODE_CBC, IV=IV)
PICCData = myaes.decrypt(unhexlify(Enc_PICC_Data))
print (hexlify(PICCData))
Response is :
b'c704de5f1eacc0403d0000da5cf60941'
I am unable to essentially migrate this code over. I have tried variations of the following which does not return any response no matter what I do. I might be doing something painfully stupid :
$e = 'EF963FF7828658A599F3041510671E88';
$key = '00000000000000000000000000000000';
$iv = '00000000000000000000000000000000';
$output = openssl_decrypt($e, 'AES-128-CBC', $key, 0, $iv);
echo $output;
Many thanks in advance, any help is appreciated.