\documentclass{article}

% Configure document version
\newcommand{\conferenceCompile}{}
%\newcommand{\anonymousCompile}{}

\usepackage{environ}

\ifdefined\conferenceCompile
   \newenvironment{conferenceVersion}{}{}
   \NewEnviron{extendedVersion}{}
   \newcommand{\conferencetext}[1]{#1}
   \newcommand{\extendedtext}[1]{}
\else
   \NewEnviron{conferenceVersion}{}
   \newenvironment{extendedVersion}{}{}
   \newcommand{\conferencetext}[1]{}
   \newcommand{\extendedtext}[1]{#1}
\fi

\ifdefined\anonymousCompile
   \newenvironment{anonymousVersion}{}{}
   \NewEnviron{attributedVersion}{}
   \newcommand{\anonymoustext}[1]{#1}
   \newcommand{\attributedtext}[1]{}
\else
   \NewEnviron{anonymousVersion}{}
   \newenvironment{attributedVersion}{}{}
   \newcommand{\anonymoustext}[1]{}
   \newcommand{\attributedtext}[1]{#1}
\fi

\begin{document}

\title{My Versioned Paper}

\begin{anonymousVersion}
\author{}
\end{anonymousVersion}
\begin{attributedVersion}
\author{Author1 and Author2}
\end{attributedVersion}

\maketitle

Our technique is secure. \extendedtext{See Section 5 for the security proof.}\conferencetext{The proof is not important...}

\end{document}
