
Calculating the NEK
The PKCS#5 standard specifies two methods for the implementation of a cryptogra-
phy derived from passwords. The PBFDK1 method was chosen in HomePlug. As
input parameters, it demands a password (entered by the administrator); a “salt
value” (constant parameter specified by HomePlug which is a kind of public key);
an iteration count, i.e. the number of times that the operation specified in the
PBFDK1 formula will be reiterated in a loop for greater encryption efficiency; and
the length of the output derived key.
The PBFDK1 method uses the MD5 hash function used for the synthetic and
unique definition of the encrypted message digest, in this case the encryption and
the digital digest of the PLC network password.
It is described by the following function:
DK = PBFDK1 (P, S, c, dkLen)
where:
•
DK = derived key (with dkLen set to 8, DK is NEK);
•
P = password (entered by the network administrator);
•
S = salt value (equal in ASCII to 0x0885 6DAF 7CF5 8185);
•
c = iteration count (1,000 times);
•
dkLen = length in bytes of derived key (8 bytes).
According to the FIPS PUB 112 standard, the usage rules concerning passwords
consist of defining a length between 4 and 8 bytes, even if longer passwords (up to
24 bytes) are possible.
PBFDK1 specifies that the hash function (MD5) must be applied 1,000 times in
an iterative manner by using the results of the preceding iteration. The first value is
the concatenation of the password and salt value.
The iterative process occurs in the following way:
T
1
= MD5 (P|S)
T
2
= MD5 (T
1
)
…
T
1,000
= MD5 (T
999
)
DK = T
1,000
<0…7>
where (P|S) is a concatenation of P and S.
MD5 Algorithm (RFC 1321)
The MD5 algorithm produces a 128-bit message digest (MD) from an input message. In
theory, the same MD cannot be obtained for two distinct messages.
The MD5 algorithm can be summarized in the following way:
m
ext
= m + m
pad
+ m
l
where
m
ext
is the extended message produced by the MD5 algorithm.
Security for PLC Networks 77
Comentarios a estos manuales