6.5 definitely messed around with the Felix framework. This was another
issue I found and have Adobe working on
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-6-5-authentication-cipher-issue-with-bouncycastle-that-doesn/qaq-p/372889/comment-id/78427#M78427