My public key produces "Invalid RSA public key" when saving record

Good day!

How is the community! I just want to ask. I’ve implemented public key encryption in my app and I’ve provided my own public but there is an error that says “Invalid RSA public key”. Is there a valid format for public keys?


Could you also inform the community the android app and version of the app you are using.

Kobo Collect v1.27.3

I followed the process of inserting the public key according to this documentation. Should I change the public_key column according to the type of public key I am using? like ssh2_public_key?

At what level are you stuck? During data collection (with android app)? Or when submitting the data to the server?

During saving of data. After I tap “Save Form and Exit”, it should proceed with the encryption of data but instead it shows the error mentioned above.

I just checked at my end and was able to collect the data in my android app (and then again submit the same to the KoBoToolbox server) with out any issue. Hence i can confirm that it’s not an issue with the KoBoToolbox system. I therefore guess it should be an issue with your base64RsaPublicKey configuration. Kindly please double check and you should solve the issue.

Thank you. I will check it again. Does the kobo system accepts all kind of keys? For example, SSH2 keys.

I don’t think so. Try following the instructions as outlined in the support article and you should be able to encrypt your data successfully.

Yes, I actually followed the article and created my own set of public/private keys. But when I supplied my form with SSH2 public key, it throws an error mentioned above.