These kinds of errors are almost always caused by conflicting jar-files in the userlib folder where two or more modules import jar-files in different versions. Please check for jar-files in different versions in your userlib folder (especially the bouncycastle related ones, starting with “bc”), and move the jar-files with the older version out of the userlib folder.
Also, have a look at this question, especially the comment by Casper Leenmans: https://forum.mendix.com/link/questions/115161