TiKZ
is one option
\documentclass[border=2mm,tikz]{standalone}
\usepackage{mwe}
\usepackage{amsmath}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}[>=stealth]
\node[ label=below:{Alice: $K, a$}] (A) {\includegraphics[width=2cm,keepaspectratio]{example-image-a}};
\node[right=5cm of A, label=below:{Bob: $K, b$}] (B) {\includegraphics[width=2cm,keepaspectratio]{example-image-b}};
\draw[->,thick] (A.20) -- node[above]{$E(g^a\ \text{mod}\ p, K)$} (B.160);
\draw[<-,thick] (A.-20) -- node[above]{$E(g^b\ \text{mod}\ p, K)$} (B.-160);
\end{tikzpicture}
\end{document}
but you can find some other options (msc, pstricks, ...) searching here:
although there is no need to use them, you can use tabulars
to do it
\begin{tabular}{ccc}
\includegraphics[width=2cm,keepaspectratio]{example-image-a} &
\raisebox{5ex}{%
\begin{tabular}{c}
$\underrightarrow{\quad E(g^a\ \text{mod}\ p, K)\quad}$\\
$\underleftarrow{\quad E(g^b\ \text{mod}\ p, K)\quad}$
\end{tabular}} &
\includegraphics[width=2cm,keepaspectratio]{example-image-b} \\
Alice: $K, a$ & & Bob: $K, b$\\
\end{tabular}
Update:
I just wanted to mention tikzpeople
package which was designed to draw more colorfull security protocols. With default
alice and bob you obtain:
\documentclass[border=2mm,tikz]{standalone}
\usepackage{tikzpeople}
\usetikzlibrary{positioning}
\usepackage{amsmath}
\begin{document}
\begin{tikzpicture}[>=stealth]
\node[alice, minimum size=2cm,label=below:{Alice: $K, a$}] (alice) {};
\node[bob, mirrored, minimum size=2cm, right=5cm of alice, label=below:{Bob: $K, b$}] (bob) {};
\draw[->,thick] (alice.20) -- node[above]{$E(g^a\ \text{mod}\ p, K)$} (bob.160);
\draw[<-,thick] (alice.-20) -- node[above]{$E(g^b\ \text{mod}\ p, K)$} (bob.-160);
\end{tikzpicture}
\end{document}
But you can use some other characters like following ones and some other ones