aboutsummaryrefslogtreecommitdiff
path: root/README
blob: 02695fb392a6c24b105acf4bf8fbd14b1ce4d787 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
GNUPG over web

Copyright (C) 2023 Salahuddin <salahuddin@member.fsf.org>

It allows user to use gnupg over plain web.
===========================================

   user    ---------- public key ---------------->
                                                 |  webserver
                                                 v
   user    <-----HTTP data with GNUPG tag(s)------


   browser -------- encrypted data -------------->
                                                 | local websocket
                                                 v (gpg_websocket.py)
   browser <------- plain text data --------------


Example:

1. users browser receive the following data.

"
<!DOCTYPE html>
function myFunction() {
   const socket = new WebSocket("ws://localhost:8765");
   // send data to local websocket to decrypt
   // and place plain text locally
}
<body onload="myFunction();">
...
<div class="GNUPG_OVER_WEB">
-----BEGIN PGP MESSAGE-----
hQGMAyJ3PpkRYGT1AQv7BTx9T8PpK8kFB5UYfcuhkuvWN1AixXE+12UniO7aRAXz
...
-----END PGP MESSAGE-----
</div>
</body>
</html>
"

2. web browser will send encrypted data to local websocket server "gpg_websocket.py".
Local websocket server will decrypt send back plain text data.

3. browser view.

<div class="GPG_OVER_WEB">
plain text content.
</div>