Do not let user have access to script data

Asked

Viewed 279 times

4

I have a script generated in python and calls functions in R.

At first it was developed for internal use, but now they are thinking of releasing for customer use. However, they do not want users to have access to the calculations used.

I would like the user not to have access to the data.

Script is used within the platform QGIS.

  • Possible duplicate of How to decrypt MD5?

  • 1

    Encrypt what? Passwords? Data in transit? Data in rest? If you specify better what your goal is, we can probably help you more.

  • I re-asked the question. I think it’s clearer.

  • 1

    Complicated... what you’re looking for is basically a form of DRM, and as far as I know is not possible to do [guaranteed]. Take a look at my answer to the question "How to protect source code?". If the client’s machine needs to do operations with this data, then: a) you can’t hide the algorithm; b) you can’t hide the data unless you use it homomorphic cryptography - something theoretical, which has already been proven possible but which is not available for practical use.

  • @Guilherme Lima, from a look at this tool, might be useful for this case: http://www.moernaut.com/default.aspx?item=supercrypt I’ve used it but with vbs.

  • nice, but he’s not a performer

  • @Guilhermelima you generate the lsc file with the software and use the executable to call lsc that way: supercrypt /lscfile:"c:\google.lsc" You cannot call a command line like this in the environment in which it is running?

  • Good afternoon William, you don’t want him to access the dice or you do not want it to access the content of the script as for example the algorithm you used to do the calculation?

  • Good afternoon, my dear.

  • No entedi kkk! Sorry I asked A ou B? and you said it is exatamente isso. But I don’t know if it’s the data or the algorithm you want to protect, I expect a kind of response é o A or o B

  • 1

    I wish he didn’t see the algorithm used.

  • It’s a cool question, I just think you need to improve the text a little, anyway +1

  • @Guilhermelima the Supercrypt I quoted above does exactly what you are asking. You do not provide the script, but rather the.lsc file that will be called by the executable that comes along with the tool. You tried to use it?

  • Yes, but my script is being used on another "Qgis" platform, that’s the problem.

  • @Guilhermelima understood, unfortunately I know nothing about Qgis. The only possibility is to run the file . py? Is the script called by Qgis? Or the script that calls the software?

  • Only by Qgis, why it performs actions that require Qgis

  • @Guilhermelima this question is similar to what you need: http://stackoverflow.com/questions/261638/how-do-i-protect-python-code But unfortunately there is no way to protect. The solution would be to check in Qgis if there really is no other way to call the script, or if instead of the script there is no way to call an executable. In this case I don’t know how to do it. If I put this as a translation response or if I just put the link.

Show 12 more comments

1 answer

1


Python is an interpreted language, so , it is very difficult to block access to source code. Even if you use a Converter exe as py2exe, the executable layout is known as it is only compressed into a zip.

Usually, in cases like this, you have to make a choice. How important is protecting the code? Are there real secrets there (like a key to symmetric encryption of bank transfers), or are you just being paranoid? Choose the language that allows you to develop the best product faster and be realistic about how important your innovative ideas are.

If you decide that you really need to protect the script, write it as a small extension C, however I do not know if this would apply to the platform QGis. If it were possible for him to call an executable you would have considered the first suggestion I left in the comments regarding the SuperCrypt, or even use a compiled language.

Translated and adapted from another issue of the English SUS.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.