Problems with making formula look great

Taking Ignasi's approach a step further...

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\begin{split}
\text{PTK} =  \text{PRF}\bigl( &\text{PMK}, \text{``Pairwise key expansion''} \\& || \min(\text{AA}, \text{SPA})  \\ 
& || \max(\text{AA}, \text{SPA})\\&|| \min(\text{ANonce}, \text{SNonce}) \\&||  \max(\text{ANonce},\text{SNonce})\bigr)
\end{split}
\]
\end{document}

enter image description here

MFGA


I don't know if it looks great, but do you want something like this?

enter image description here

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\[
\begin{split}
\text{PTK} = & \text{PRF}\left( \text{PMK}, \text{"Pairwise key expansion"} || \min(\text{AA}, \text{SPA}) || \right. \\ 
& \left. \qquad \max(\text{AA}, \text{SPA})|| \min(\text{ANonce}, \text{SNonce}) ||  \max(\text{ANonce},\text{SNonce})\right)
\end{split}
\]

\end{document}

IMHO your formula is in an algorithm and || stands for "or". So you should have a look at algorithm packages. Anyway this is a non-algorithm but algorithmic answer:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\begin{array}{r@{}l@{}l}
    \text{PTK}=PRF&(PMK, & \text{``Pairwise key expansion''}\\
    && || \min(AA,SPA)\\
    && || \max(AA,SPA)\\
    && || \min(ANonce,SNonce)\\
    && || \max(ANonce,SNonce)\\
    &)&
\end{array}
\]
\end{document}

enter image description here

Edit 1: Improved version

I prefer this way.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\begin{array}{rl}
    \text{PTK}=PRF(&\\
    & PMK,\\
    & (\\
    & \quad\text{``Pairwise key expansion''}\\
    & \quad||\min(AA,SPA)\\
    & \quad||\max(AA,SPA)\\
    & \quad||\min(ANonce,SNonce)\\
    & \quad||\max(ANonce,SNonce)\\
    & )\\
    )&
\end{array}
\]
\end{document}

enter image description here