5

It's about authenticated key exchange protocol, there are two parties party A and party B,they exchange some messages. At the end they compute the shared keys SK.

screenshot

I know that it's vey cool to use Latex to set type, I really want to learn it. Any one can give me some advices? please help me! thanks

  • 1
    Welcome to Tex.SX! I would suggest you rephrase your question into a more specific request. There are plenty of ways to "draw" that protocol in LaTeX, and knowing what you want in more detail might make it easier to help you. – MaxAxeHax Jul 25 '13 at 16:11
7

The symbols are not very clear in the image; just change them if needed.

The idea is to build an array with three columns.

\documentclass{article}
\usepackage{amsmath,amssymb,booktabs}
\begin{document}
\[
\begin{array}{@{}l@{}c@{}l@{}}
\toprule
\hat{A} && \hat{B} \\
A_1=g^{a_1},\quad A_2=g^{a_2} &&
B_1=g^{b_1},\quad B_2=g^{b_2} \\
\bar{x}\gets_R \mathbb{Z}_q,\quad x=H_1(\bar{x},a_1,a_2) &&
\bar{y}\gets_R \mathbb{Z}_q,\quad y=H_1(\bar{y},b_1,b_2) \\
& \xrightarrow{\textstyle X=g^x} \\
& \xleftarrow {\textstyle Y=g^y} \\
\mathit{sid}=(X,Y,\hat{A},\hat{B}) &&
\mathit{sid}=(X,Y,\hat{A},\hat{B}) \\
Z_1=(YB_1)^x,\quad Z_2=(YB_2)^x &&
Z_1=X^{y+b_1},\quad Z_2=X^{y+b_2} \\
Z_3=Y^{x+a_1},\quad Z_4=Y^{x+a_2} &&
Z_3=(XA_1)^y,\quad Z_4=(XA_2)^y \\
\mathit{SK}=H(Z_1,Z_2,Z_3,Z_4,\mathit{sid}) &&
\mathit{SK}=H(Z_1,Z_2,Z_3,Z_4,\mathit{sid}) \\
\bottomrule
\end{array}
\]
\end{document}

enter image description here

  • @Alex If you consider egreg's answer solved your problem, please consider accepting it by clicking the checkmark to its left. In case of doubt, please see How do you accept an answer?. – Gonzalo Medina Jul 26 '13 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.