Hi, I tried to follow the instructions on Kobotoolbox to encrypt my form and added form_title, form_id, submission_url, and public_key as shown in the screenshot below.
However, when I try to submit the form, I keep getting an error message “Unparsed DER bytes remain after ASN.1 parsing”.
I am pretty sure the submission_url and public_key are correct and wonder if my form_id is wrong (I got the form_id by following the instructions at
How do i find the required form id from my KoBoToolbox account)
Could someone answer why this is happening and which field is causing this problem? Thank you very much for reading!
Welcome to the community, @yu000219! Have you validated your XLSForm through this online validator to see any syntax issues?
Hi Kal_Lam, thank you for responding. I checked but there is no syntax error and the form works perfectly when I remove submission_url and public_key. I really want to know how I can fix this problem. Thank you very much for your time.
Hi @yu000219 ,
your public key is the problem.
your public key is not accepted, it must be “a DER-encoded ASN.1 public key” for example, try the key below and you will see that the problem disappears:
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs/FD53Ix4DsX9Xy+ahvDNyFyxwhmFv6xY+msko2f6FaMDvjw2Z1l0Ef8EHiQugeCH+S3ex/RFpRVATKr9JjV4txgyd2MhB8qZuZdk0AHPh6LCQhCBZSrulvfpL1RSEzs6yhBh/Btvf7L3+wWAsWufnLLpopb8FxAO6wtzpiFjSTjOeNv8spnFkvUzINuk8j1oc3pUQdkU/8uS4FpspWEplAA+YjfdmJ+mVCQJaD//5B/Qr48bmyrIH8qJ0qF/y9m0uHWKmoqGVMWnSCuCUVO6wcqtDSQcvBErzKV2OkstoowBQ1PfY7CDqHyvJd60Jd9UByV17bGQh7STYJcl0b/2wIDAQAB
you need to generate another valid key that meet the requirements I mentioned above.