The free FVP simulator can implement Pointer Authentication, but it defaults to an Implementation Defined algorithm. Specifically, ID_AA64ISAR1.API (bits 11:8) is non-0 indicating an IMPLEMENTATION DEFINED crypto algorithm is used. I've tried to turn on QARMA3 with cluster0.has_qarma3_pac=1, but this is ignored (since I assume the free FVP doesn't support it for some reason).
Can someone point me to a description of the pointer authentication algorithm the simulator is using? The Arm ARM gives the algorithm for QARMA3 and QARMA5 in the function ComputePACQARMA, so the algorithm should not need to be a secret (it's only in the FVP in any case).
Are you loading the crypto plugin?https://developer.arm.com/Tools%20and%20Software/Fast%20Models#DownloadsWith the Linux 11.31_28 build of the Rev C Base Platform model plus matching crypto plugin, and the following plugin + parameters:
export FM_TRACE_PLUGINS=$(pwd)/plugins/TarmacTrace.so:$(pwd)/../FastModels_11.31_28/plugins/Linux64_GCC-9.3/Crypto.soFVP_Base_RevC-2xAEMvA -C bp.secure_memory=0 -C cluster0.NUM_CORES=1 -C cluster1.NUM_CORES=0 -C cluster0.has_arm_v9-7=1 --application=test.axf --cyclelimit=40 -C cluster0.has_qarma3_pac=1 -C CRYPTO.Crypto.authentication_algorithm=QARAM3
(note - your file paths might be different of course)
I then get:
32 clk IT (32) 8000007c d5380620 O EL3h_s : MRS x0,ID_AA64ISAR1_EL132 clk R X0 011112110021100233 clk IT (33) 80000080 d5380640 O EL3h_s : MRS x0,ID_AA64ISAR2_EL133 clk R X0 00200_000_1011_3102 (underscores added by me for readability)
Which looking at ID_AA64ISAR2_EL1.APA3 (bits 15:12) is 0x3, meaning QARMA3 is implemented.