How the result should look like:
I marked the problem with yellow on both images. Here is my MWE:
\documentclass[a4paper]{article}
\usepackage{mathtools}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{cryptocode}
\newcommand{\gen}{\text{Gen}}
\begin{document}
\begin{bbrenv}{A}
\begin{bbrbox}[name=$\mathcal{C}_\text{PRF}$]
\pseudocode{%
K \leftarrow \gen(1^n)\\
b \xleftarrow{r} \{0,1\}\\
\text{Wenn } b = 0\\
\quad \vartheta_0 = F_K(\cdot)\\
\text{Wenn } b = 0\\
\quad \vartheta_1 = f(\cdot)\\
\text{Wenn } b' = b\\
\quad \text{return } 1\\
\text{Wenn } b' \neq b\\
\quad \text{return } 1\\
}
\end{bbrbox}
\begin{bbroracle}{OraA}
\begin{bbrbox}[name=$\vartheta_b(\cdot)$]
\end{bbrbox}
\end{bbroracle}
\begin{bbroracle}{OraB}
\begin{bbrbox}
\pseudocode{
x = 0 \quad b\\
x = 1 \quad a+b \rightarrow b\\
x = 2 \quad 2a+b\\
\text{Wenn } b' = 0\\
\text{Ansonsten } b' = 1\\
\text{Ausgabe } b'
}
\end{bbrbox}
\end{bbroracle}
\bbroracleqryfrom{top=$x$}
\bbroracleqryto{top={$y$}}
\bbroracleqryfrom{top=$b'$}
\end{bbrenv}
\end{document}
Do you think I could do it with bbrev? I am lost, hope you can help.