(note that I am using the demo referred to in the link _ same kernel listed above and applied the patches from the same link)
https://source.codeaurora.org/external/imxsupport/imx_sec_apps/tree/demo-caam-blobs/README.txt)
In further testing I have realized that even though I am seeing a bunch of:
"caam_jr 30902000.jr: Decapsulation job failed" messages, the encap, encrypt and decrypt functions appear to be working.
However the "decap" produces a file with all zeros which is not correct.
echo desiredsecretkey > keyfile
dd if=/dev/urandom of=src bs=1 count=1000
./kb_test encap black keyfile blobfile
./kb_test encr black blobfile src srcenc
./kb_test decr black blobfile srcenc srcdec
diff src srcdec
./kb_test decap black blobfile blackkey
hexdump blobfile
0000000 0000 0000 0000 0000 dc80 03b1 fe00 ffff
0000010 8ac0 03c6 fe00 ffff 0000 0000 0000 0000
0000020 0000 0000 0000 0000 0000 0000 0000 0000
*
0000050
hexdump blackkey
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
0000020