Decrypting encrypted submission using API + python

  • Profile Image
    Asked on June 20, 2020 at 04:40 AM

    Dear Jotform support,

    I am trying to decrypt an encrypted form using your API and python, but I am not successful. I have the generated jotform.key file, but it seems that when decrypting, responses are truncated.

    For example, one of the answers in my original form reads:

    "Provide a description on the entity, relevant areas of activity, experience, products / services, key customers and any other information that can help understand why you are the right entity(ies) to bring the proposed innovation to market."

    Now the form is submitted, and I get the encrypted value of this message through API. Using python's RSA module I created the following code:

    private_key_object = RSA.importKey(private_key)
    dec_message = private_key_object.decrypt(enc_message)

    Where enc_message is the read encrypted submitted message and private_key is the content of the jotform.key file.

    What I get as a result is


    If I clean the escape sequences, the final text looks like

    "Provide a description on the entity, relevant areas of activity, exp"

    which is not the full message. I am sure I am doing something wrong, bu I cannot figure out what exactly.

    Would you be able to provide some help? for our project, PHP is not an option

    Thanks in advance.

  • Profile Image
    Answered on June 20, 2020 at 10:20 AM

    Thank you for reaching support,

    Apologies for the inconvenience, unfortunately, using python to decrypt data is not possible.

    For a more detailed explanation please see this related Support Ticket:

    Let us know if you have any further questions.


  • Profile Image
    Answered on June 21, 2020 at 09:06 AM

     Dear Kenneth_C,

    Thanks for your answer. It has to be possible, since I have been able to decrypt a portion of the message... I will continue trying to figure that out, but if there are any tips you can provide, that will be greatly appreciated.