docs/diploma
changeset 172:5c873e6478ef
wrote about encryption
author | meillo@marmaro.de |
---|---|
date | Mon, 22 Dec 2008 20:42:33 +0100 |
parents | 9415e41e765e |
children | c51f1be54224 |
files | thesis/bib/websites.bib thesis/tex/4-MasqmailsFuture.tex thesis/thesis.sty |
diffstat | 3 files changed, 42 insertions(+), 76 deletions(-) [+] |
line diff
1.1 --- a/thesis/bib/websites.bib Sat Dec 20 20:51:48 2008 +0100 1.2 +++ b/thesis/bib/websites.bib Mon Dec 22 20:42:33 2008 +0100 1.3 @@ -198,6 +198,12 @@ 1.4 1.5 1.6 1.7 +@misc{wikipedia:tls, 1.8 + author = "Wikipedia", 1.9 + title = "\emph{Transport Layer Security}", 1.10 + howpublished = "On the Internet: {\small\url{http://en.wikipedia.org/w/index.php?title=Transport_Layer_Security&oldid=258890258} (2008-12-22)}", 1.11 +} 1.12 + 1.13 1.14 1.15
2.1 --- a/thesis/tex/4-MasqmailsFuture.tex Sat Dec 20 20:51:48 2008 +0100 2.2 +++ b/thesis/tex/4-MasqmailsFuture.tex Mon Dec 22 20:42:33 2008 +0100 2.3 @@ -193,15 +193,9 @@ 2.4 \item a list of users (e.g.\ ``\texttt{bob: alice, john@example.com}'') 2.5 \item a command (e.g.\ ``\texttt{bob: |foo}'') 2.6 \end{itemize} 2.7 -Aliases can be cascaded like in the following example: 2.8 -\begin{verbatim} 2.9 -team: alice, bob 2.10 -bob: bob@example.com 2.11 -\end{verbatim} 2.12 - 2.13 Addresses expanding to lists of users lead to more envelopes. Aliases changing the reciptients domain part may require a different route to use. 2.14 2.15 -Aliasing is often handled in expanding the alias and reinjecting the mail into the system. Unfortunately, the mail is processed twice using this approach; also does the system need to handle more mail this way. Is it needed to check the new recipient address for acceptance, or should it be accepted generally? (The aliase actually came from inside the system.) A second point for access control seems to be no choice. 2.16 +Aliasing is often handled in expanding the alias and reinjecting the mail into the system. Unfortunately, the mail is processed twice then; additionally does the system have to handle more mail this way. If it is wanted to check the new recipient address for acceptance and do all processing again, then reinjecting it is the best choice. 2.17 2.18 2.19 2.20 @@ -242,85 +236,50 @@ 2.21 2.22 \subsubsection*{Encryption} 2.23 2.24 -TLS/SSL prevents attackers to listen on the cable 2.25 -but it does not prevent man-in-the-middle attacks 2.26 -signed certificates help here 2.27 +Electronic mail is very weak to sniffing attacks, because all data transfer is unencrypted. This concerns the message's content, as well as the email addresses in header and envelope, but also authentication dialogs that may transfer plain text passwords (\NAME{PLAIN} and \NAME{LOGIN} are examples). Adding encryption is therefor wanted. 2.28 2.29 +The common way to encrypt \SMTP\ dialogs is using \name{Transport Layer Security} (short: \TLS, successor of \NAME{SSL}). \TLS\ encrypts the datagrams of the \name{transport layer}. This means it works below the application protocols and can be used by any of them\citeweb{wikipedia:tls}. 2.30 2.31 -ch /usr/share/ssl/misc 2.32 +\TLS\ allows to create secure tunnels through which arbitrary programs can communicate. Hence one can add secure communication afterwards to programs without changing them. \name{OpenSSL} for example---a free implementation---allows traffic to be piped into a command; a secure tunnel is created and the traffic is forwarded through it. Or a secure tunnel can be set up between a local and a remote port; this tunnel can then be used by any application. 2.33 2.34 -create new CA: 2.35 -\begin{verbatim} 2.36 - CA.pl -newca 2.37 - country: DE 2.38 - state: schwaben 2.39 - city: Ulm 2.40 - company: 2.41 - section: 2.42 - name: 2.43 - emailaddress: 2.44 -\end{verbatim} 2.45 +The \NAME{POP} protocol, for example, is good suited for such tunneling, but \SMTP\ is is not generally. Outgoing \SMTP\ client connections can be tunneled without problem---\masqmail\ already provides a configure option called \texttt{wrapper} to do so. Tunneling incomming connections to a server leads to problems with \SMTP. As data comes encrypted through the tunnel to the receiving host and gets then decrypted and forwarded on local to the port the application listens on. From the \MTA's view, this makes all connections appear to come from localhost, unfortunately. Figure \ref{fig:stunnel} depicts the data flow. 2.46 2.47 -generate ssl key: 2.48 -\begin{verbatim} 2.49 - CA.pl -newreq 2.50 - ... the same questions 2.51 -\end{verbatim} 2.52 +\begin{figure} 2.53 + \begin{center} 2.54 + \input{input/stunnel.tex} 2.55 + \end{center} 2.56 + \caption{Data flow using \name{stunnel}} 2.57 + \label{fig:stunnel} 2.58 +\end{figure} 2.59 2.60 -sign request with CA: 2.61 -\begin{verbatim} 2.62 - CA.pl -sign 2.63 -\end{verbatim} 2.64 +For incoming connections, \NAME{STARTTLS}---defined in \RFC2487---is what \mta{}s implement. 2.65 2.66 -remove passphrase from private key: 2.67 -\begin{verbatim} 2.68 - openssl rsa <newreq.pem >key.pem 2.69 - (to be used by programs automaticly) 2.70 -\end{verbatim} 2.71 +\masqmail\ is already able to encrypt outgoing connections, but encryption of incoming connections, using \NAME{STARTTLS} should be implemented. This only affects the \SMTP\ server module. 2.72 2.73 -secure: 2.74 -\begin{verbatim} 2.75 - chmod 400 *.pem 2.76 - cp newcert.pem /etc/postfix/cert.pem 2.77 - cp key.pem /etc/postfix/key.pem 2.78 - cp demoCA/cacert.pem /etc/postfix/CAcert.pem 2.79 - chmode 400 /etc/postfix/*.pem 2.80 +%TLS/SSL prevents attackers to listen on the cable 2.81 +%but it does not prevent man-in-the-middle attacks 2.82 +%signed certificates help here 2.83 +% or PGP encryption 2.84 2.85 - mkdir /etc/stunnel 2.86 - cat newcert.pem key.pem >/etc/stunnel/stunnel.pem 2.87 - chmod 400 /etc/stunnel/stunnel.pem 2.88 - (check /etc/stunnel with `stunnel -V') 2.89 -\end{verbatim} 2.90 2.91 +%do not use stunnel wit SMTP: 2.92 +%because all incoming mail would be from 127.0.0.1 !! 2.93 +%use STARTTLS instead 2.94 2.95 -set up stunnels for POP, etc: 2.96 -\begin{verbatim} 2.97 - nmap localhost 2.98 - stunnel -d pop3s -r localhost:pop3 -p /etc/stunnel/stunnel.pem 2.99 - stunnel -d imaps -r localhost:imap -p /etc/stunnel/stunnel.pem 2.100 - nmap localhost 2.101 - pop3s 995 2.102 - imaps 993 2.103 -\end{verbatim} 2.104 - 2.105 -do not use stunnel wit SMTP: 2.106 -because all incoming mail would be from 127.0.0.1 !! 2.107 -use STARTTLS instead 2.108 - 2.109 -postfix: main.cf 2.110 -\begin{verbatim} 2.111 - smtpd_use_tls = yes 2.112 - smtpd_tls_received_header = no (does not log in received headers) 2.113 - 2.114 - smtpd_tls_key_file = /etc/postfix/key.pem 2.115 - smtpd_tls_cert_file = /etc/postfix/cert.pem 2.116 - smtpd_tls_CA_file = /etc/postfix/CAcert.pem 2.117 - 2.118 - smtp_use_tls = yes (use TLS for sending) 2.119 - smtp_tls_key_file = /etc/postfix/key.pem 2.120 - smtp_tls_cert_file = /etc/postfix/cert.pem 2.121 - smtp_tls_CA_file = /etc/postfix/CAcert.pem 2.122 -\end{verbatim} 2.123 +%postfix: main.cf 2.124 +%\begin{verbatim} 2.125 +% smtpd_use_tls = yes 2.126 +% smtpd_tls_received_header = no (does not log in received headers) 2.127 +% 2.128 +% smtpd_tls_key_file = /etc/postfix/key.pem 2.129 +% smtpd_tls_cert_file = /etc/postfix/cert.pem 2.130 +% smtpd_tls_CA_file = /etc/postfix/CAcert.pem 2.131 +% 2.132 +% smtp_use_tls = yes (use TLS for sending) 2.133 +% smtp_tls_key_file = /etc/postfix/key.pem 2.134 +% smtp_tls_cert_file = /etc/postfix/cert.pem 2.135 +% smtp_tls_CA_file = /etc/postfix/CAcert.pem 2.136 +%\end{verbatim} 2.137 2.138 2.139
3.1 --- a/thesis/thesis.sty Sat Dec 20 20:51:48 2008 +0100 3.2 +++ b/thesis/thesis.sty Mon Dec 22 20:42:33 2008 +0100 3.3 @@ -55,6 +55,7 @@ 3.4 \newcommand{\gpl}{General Public License} 3.5 \newcommand{\GPL}{\NAME{GPL}} 3.6 \newcommand{\SMTP}{\NAME{SMTP}} 3.7 + \newcommand{\TLS}{\NAME{TLS}} 3.8 3.9 \newcommand{\nth}{\textsuperscript{th}} 3.10 \newcommand{\st}{\textsuperscript{st}}