A \fbox
doesn't admit line breaks. You have, however, several posiibilities:
Use a \parbox
(or a minipage
) inside the \fbox
:
\documentclass{beamer}
\usepackage{vietnam}
\begin{document}
\begin{frame}
\frametitle{Exhaustive Search}
\fbox{\parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}{\centering One billion searches per second $\Rightarrow$ 36 yrs \\ All this to recover only $10$ bits !}}%
\end{frame}
\end{document}

Inside the \fbox
, Use a varwidth
environment from the varwidth
package if you want the width to adjust automatically:
\documentclass{beamer}
\usepackage{vietnam}
\usepackage{varwidth}
\begin{document}
\begin{frame}
\centering
\fbox{\begin{varwidth}{\textwidth}
\centering
One billion searches per second $\Rightarrow$ 36 yrs \\ All this to recover only $10$ bits !
\end{varwidth}}
\end{frame}
\end{document}

Or use a box defined using tcolorbox
:
\documentclass{beamer}
\usepackage{vietnam}
\usepackage[most]{tcolorbox}
\tcbuselibrary{fitting}
\begin{document}
\begin{frame}
\frametitle{Exhaustive Search}
\begin{tcolorbox}[minipage,colback=white,arc=0pt,outer arc=0pt]
\centering
One billion searches per second $\Rightarrow$ 36 yrs \\ All this to recover only $10$ bits !
\end{tcolorbox}
\end{frame}
\end{document}

Or a TikZ \node
with the align
key:
\documentclass{beamer}
\usepackage{vietnam}
\usepackage{tikz}
\begin{document}
\begin{frame}
\frametitle{Exhaustive Search}
\centering
\tikz
\node[draw,align=center]
{One billion searches per second $\Rightarrow$ 36 yrs \\ All this to recover only $10$ bits !};
\end{frame}
\end{document}

Or...