A bit of background
Well-known values (predefined):
n A large prime number. All computations are performed modulo n.
g A primitive root modulo n (often called a generator).
User password is set as:
x = H(s, P)
v = g^x
H() One-way hash function
s A random string used as the user salt
P The user password
x A private key derived from the password and salt
v The host password verifier
Authentication:
+---+------------------------+--------------+----------------------+
| | Alice | Public Wire | Bob |
+---+------------------------+--------------+----------------------+
| 1 | | C --> | (lookup s, v) |
| 2 | x = H(s, P) | <-- s | |
| 3 | A = g^a | A --> | |
| 4 | | <-- B, u | B = v + g^b |
| 5 | S = (B - g^x)^(a + ux) | | S = (A · v^u)^b |
| 6 | K = H(S) | | K = H(S) |
| 7 | M[1] = H(A, B, K) | M[1] --> | (verify M[1]) |
| 8 | (verify M[2]) | <-- M[2] | M[2] = H(A, M[1], K) |
+---+------------------------+--------------+----------------------+
u Random scrambling parameter, publicly revealed
a,b Ephemeral private keys, generated randomly and not publicly revealed
A,B Corresponding public keys
m,n The two quantities (strings) m and n concatenated
S Calculated exponential value
K Session key
The answer to your question:
, K (= ) , , .
P, 2, , v, S .
K, , , , . , , , .