I would like (PGP / GPG) to sign python code. Yes, I read this and many other sites that talk about protecting and obfuscating python code - this is all not what I want. I do NOT want to obfuscate the code. I want clients and users to see the code, they can change the code, copy it and do derivative work, I would like to have software for GPLv3. But I want the plugins to be โsignedโ, so at runtime they can be trusted .
Is this possible in Python? Is it possible to import a library after checking its signature? Which would be easy: check the signing of the gpg file, and then load it using the import, otherwise throw an exception. But this is only possible for files with a single import file, not a python directory.
It is clear that if the client changes the GPG key in the program or deletes some lines on its own in the verification algorithm, everything has passed - but this is not a problem. He could do whatever he wanted, but that would be stupid. He wants credulity. I want him to add a plug-in for third-party developers by copying it to the "plugins" directory and asking the program to check the plug-in "reliability", and then import it. (This way, he can run plugins that are not signed, but at his own risk.)
python import gnupg pgp
nerdoc
source share