google / webcrypto.dart

Cross-platform implementation of Web Cryptography APIs
https://pub.dev/packages/webcrypto
Apache License 2.0
78 stars 44 forks source link

error.0400008d.RSA routines.OPENSSL_internal.TOO_MANY_ITERATIONS #136

Open avinashboy opened 3 months ago

avinashboy commented 3 months ago

Recently, I've been getting this issue while creating the public key in debug mode. However, if I build the APK and test it on an Android box or Android TV,

I get this error: error.0400008d:RSA routines:OPENSSL_internal:TOO_MANY_ITERATIONS in Flutter.

WhatsApp Image 2024-06-17 at 11 33 18 AM

avinashboy commented 3 months ago

Device info is here:

Android TV OS Name: 11 Ram: 4GB Model: Android 11RTC Mini PC Device name: Leoxsys android mini pc

jonasfj commented 3 months ago

What are you trying to do?

I'm not a crypto expert, certainly not an embedded expert, but could this be a combination of low powered platform, little randomness available and aiming for large primes?

A quick search yielded: https://github.com/openssl/openssl/issues/4151

It's possible we should figure out what the error is, and print a nicer message.

Now I wouldn't dare to give advice on how to do cryptographic protocols, but it's thinkable that smaller primes (fewer bits), or a different primitive like ECDSA might have differently.