Reference:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1011698
The errors are similar to the ones that were seen with bouncycastle 1.70 on Fedora (#28).
Those were fixed by backporting a fix in bouncycastle 1.70.
However, bouncycastel 1.71 has this fix, so the issue seems to be triggered again with 1.71 even with that fix.