# How to create protocol flows inside a centred box?

Could you please give some directions how to create the following figure in latex? It is the situation of describing a two parties protocol centered in a box. It is like a 3X4 table but i have difficulties with the alignment. Tikz is the only way for drawing this?

-
See: Trying to put a box around a collection of subfigures The basic command is \fbox. –  Marco Daniel May 21 '12 at 16:59
In my opinion your question is really bad. Why don't you upload some images to demonstrate your request? In the moment I only see links where the helper must scroll. –  Marco Daniel May 21 '12 at 17:32
Yes, and if you have to add PDF links please in the form [<title>](<url>) which is much more readable. –  Martin Scharrer May 21 '12 at 17:58
It would be nice if you would add an example image. Please make sure that all images are uploaded using the official stackexchange interface, i.e. the image icon on top of the text field (shortcut: CTRL+G). This ensures that all images are always accessible and do not expire. As new user without image posting privileges simply include the image as normal and remove the ! in front of it to turn it into a link. A moderator or another user with edit privileges can then reinsert the ! to turn it into an image again. –  Martin Scharrer May 21 '12 at 18:07

A simple way to add new float or caption types ("Scheme" in this case) is the newfloat package which is part of the caption bundle. There is also the float package which also provides the H (for: place really Here!). The box can be produced by using \fbox{\begin{minipage}{<width>}..\end{minipage}} or, more simpler, using the adjustbox package.

The actual content seems to be best made using a tabular, if you want the same format as in the PDFs.

\documentclass{article}

\usepackage{float}
\usepackage{newfloat}
\DeclareFloatingEnvironment[
fileext=los,
listname=List of Schemes,
name=Scheme,
placement=H,
within=section,
]{scheme}

\usepackage{blindtext}
\begin{document}

\section{Test}
\blindtext

\begin{scheme}
\begin{tabular}{rl}
\bfseries Encryption:  & .... \\
& .... \\
\bfseries Deccryption: & .... \\
& .... \\
something    & .... \\
& .... \\
\end{tabular}
\caption{Some scheme}
\end{scheme}

\blindtext

\end{document}

Or, using adjustbox v0.9 from 2012/05/16 (available on CTAN and on Bitbucket.org):

\documentclass{article}

\usepackage{newfloat}
\DeclareFloatingEnvironment[
fileext=los,
listname=List of Schemes,
name=Scheme,
within=section,
]{scheme}

\usepackage{blindtext}
\begin{document}
\listofschemes

\section{Test}
\blindtext

\bfseries Encryption:  & .... \\
& .... \\
\bfseries Deccryption: & .... \\
& .... \\
something    & .... \\
& .... \\

\blindtext

\end{document}

Change the nofloat to float if you want the scheme to float. You can of course create a new environment for this if you need it more often.