aboutsummaryrefslogtreecommitdiff
path: root/doc/TPM
blob: 2b2b2062a1a52363dc5bbff3165076bce6cd493f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
If you'd like to write your own plugins and honor the efforts, Dream Multimedia
puts into developing Enigma 2, you can protect your plugin against execution
on Non-Dream Multimedia Hardware by implementing a TPM (Trusted Platform Module)
check into your plugin.
For ease of use we provide a demo plugin in lib/python/Plugins/DemoPlugins/TPMDemo.

The main TPM check is implemented into the "main" function. You need to provide
this code yourself in your plugin. So copy&paste the code into your own as well
as the needed functions
- bin2long
- long2bin
- rsa_pub1024
- decrypt_block
- validate_cert
- read_random
Importing the functions from somewhere else would spoil the security model. So
you need to provide the code with your plugin.
 
You can either use the given method using the main function (which will run the
TPM check each time the plugin is called) or directly use it in the
Plugins(**kwargs) function and not return the Plugins-list if the TPM check failes
(which will prevent the plugin from showing up at all). You can also implement
a warning message for all possible TPM failure scenarios.