Shihāb al-Dīn Abu ’l-Abbās Aḥmad ibn Abi ’l-ʿAlāʾ Idrīs ibn ʿAbd al-Raḥmān ibn ʿAbd Allāh ibn Yallīn al-Ṣanhājī al-Ṣaʿīdī al-Bahfashīmī al-Būshī al-Bahnasī al-Miṣrī al-Mālikī (Arabic: شهاب الدين القرافي) (also known as simply known as Shihāb al-Dīn al-Qarāfī or al-Qarāfī, 1228–1285), was a Maliki jurist and legal theoretician of Sanhaja Berber origin who lived in Ayyubid and Mamluk Egypt.