MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / DESL

Function DESL

pager_lib/smb/ntlm.py:201–211  ·  view source on GitHub ↗

References: =========== - http://ubiqx.org/cifs/SMB.html (2.8.3.4) - [MS-NLMP]: Section 6

(K, D)

Source from the content-addressed store, hash-verified

199
200
201def DESL(K, D):
202 """
203 References:
204 ===========
205 - http://ubiqx.org/cifs/SMB.html (2.8.3.4)
206 - [MS-NLMP]: Section 6
207 """
208 d1 = des(expandDesKey(K[0:7]))
209 d2 = des(expandDesKey(K[7:14]))
210 d3 = des(expandDesKey(K[14:16] + b'\0' * 5))
211 return d1.encrypt(D) + d2.encrypt(D) + d3.encrypt(D)
212
213
214def generateChallengeResponseV1(password, server_challenge, has_extended_security = False, client_challenge = None):

Callers 1

Calls 3

desClass · 0.85
expandDesKeyFunction · 0.85
encryptMethod · 0.45

Tested by

no test coverage detected