1
MODULI(5) FILE FORMATS MODULI(5)
NNNNAAAAMMMMEEEE
mmmmoooodddduuuulllliiii - Diffie-Hellman moduli
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
The /_e_t_c/_s_s_h/_m_o_d_u_l_i file contains prime numbers and genera-
tors for use by sssssssshhhhdddd(8) in the Diffie-Hellman Group Exchange
key exchange method.
New moduli may be generated with sssssssshhhh----kkkkeeeeyyyyggggeeeennnn(1) using a two-
step process. An initial _c_a_n_d_i_d_a_t_egeneration pass, using
sssssssshhhh----kkkkeeeeyyyyggggeeeennnn ----GGGG, calculates numbers that are likely to be use-
ful. A second _p_r_i_m_a_l_i_t_ytesting pass, using sssssssshhhh----kkkkeeeeyyyyggggeeeennnn ----TTTT,
provides a high degree of assurance that the numbers are
prime and are safe for use in Diffie-Hellman operations by
sssssssshhhhdddd(8). This mmmmoooodddduuuulllliiii format is used as the output from each
pass.
The file consists of newline-separated records, one per
modulus, containing seven space-separated fields. These
fields are as follows:
timestamp
The time that the modulus was last processed as
YYYYMMDDHHMMSS.
type Decimal number specifying the internal structure of the
prime modulus. Supported types are:
0 Unknown, not tested.
2 "Safe" prime; (p-1)/2 is also prime.
4 Sophie Germain; 2p+1 is also prime.
Moduli candidates initially produced by sssssssshhhh----kkkkeeeeyyyyggggeeeennnn(1)
are Sophie Germain primes (type 4). Further primality
testing with sssssssshhhh----kkkkeeeeyyyyggggeeeennnn(1) produces safe prime moduli
(type 2) that are ready for use in sssssssshhhhdddd(8). Other
types are not used by OpenSSH.
tests
Decimal number indicating the type of primality tests
that the number has been subjected to represented as a
bitmask of the following values:
0x00 Not tested.
0x01 Composite number not prime.
0x02 Sieve of Eratosthenes.
Last change: September 26 2012 1
MODULI(5) FILE FORMATS MODULI(5)
0x04 Probabilistic Miller-Rabin primality tests.
The sssssssshhhh----kkkkeeeeyyyyggggeeeennnn(1) moduli candidate generation uses the
Sieve of Eratosthenes (flag 0x02). Subsequent sssssssshhhh----
kkkkeeeeyyyyggggeeeennnn(1) primality tests are Miller-Rabin tests (flag
0x04).
trials
Decimal number indicating the number of primality tri-
als that have been performed on the modulus.
size Decimal number indicating the size of the prime in
bits.
generator
The recommended generator for use with this modulus
(hexadecimal).
modulus
The modulus itself in hexadecimal.
When performing Diffie-Hellman Group Exchange, sssssssshhhhdddd(8)
first estimates the size of the modulus required to
produce enough Diffie-Hellman output to sufficiently
key the selected symmetric cipher. sssssssshhhhdddd(8) then ran-
domly selects a modulus from Fa /etc/ssh/moduli that
best meets the size requirement.
SSSSEEEEEEEE AAAALLLLSSSSOOOO
sssssssshhhh----kkkkeeeeyyyyggggeeeennnn(1), sssssssshhhhdddd(8)
SSSSTTTTAAAANNNNDDDDAAAARRRRDDDDSSSS
W. Simpson, N. Provos and M. Friedl, _D_i_f_f_i_e-_H_e_l_l_m_a_n _G_r_o_u_p
_E_x_c_h_a_n_g_e _f_o_r _t_h_e _S_e_c_u_r_e _S_h_e_l_l (_S_S_H) _T_r_a_n_s_p_o_r_t _L_a_y_e_r _P_r_o_t_o_-
_c_o_l, RFC 4419, 2006.
Last change: September 26 2012 2