Failed to read key - DerValue.getBigIntegerInternal, not expected 48

While creating a mobile build I get this error.
Any idea of what might be causing it and how to fix it?

* What went wrong:
Execution failed for task ':app:signReleaseBundle'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.FinalizeBundleTask$BundleToolRunnable
 > Failed to read key <email> from store "/certificates/android.keystore": DerValue.getBigIntegerInternal, not expected 48

I guess that the keyword to find the problem starts here:
“DerValue.getBigIntegerInternal, not expected 48”

How did you generate your certificates?

Problem solved.

Must have been a special character used in the certificate passwords.

After creating a new certificate using the cmd command

keytool -genkey -v -keystore [keystore_name].keystore -alias [alias_name] -keyalg RSA -keysize 2048 -validity 10000

everything worked as expected.