Bug 39301

Summary: replace "homebrew" DES encryption code with passlib.utils.des in univention-radius and univention-squid
Product: UCS Reporter: Felix Botner <botner>
Component: RadiusAssignee: UCS maintainers <ucs-maintainers>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P5 CC: gohmann, meybohm, walkenhorst
Version: UCS 4.0   
Target Milestone: UCS 4.0-x   
Hardware: Other   
OS: Linux   
What kind of report is it?: --- What type of bug is this?: ---
Who will be affected by this bug?: --- How will those affected feel about the bug?: ---
User Pain: Enterprise Customer affected?: Yes
School Customer affected?: ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: Bug group (optional):
Max CVSS v3 score:
Bug Depends on: 38785    
Bug Blocks: 38794    

Description Felix Botner univentionstaff 2015-09-03 10:56:01 CEST
We should consider replacing the DES code in univention-radius and univention-squid with passlib.utils.des.

univention-radius: univention/pyMsChapV2.py.DesEncrypt()

- convertKey()
- setOddParity()

- return pyDes.des(convertKey(key), pyDes.ECB).encrypt(data)
+ return passlib.utils.des.des_encrypt_block(key, data)

univention-squid: squid_ldap_ntlm_auth.verifyNtlm()

- convertKey()
- setOddParity()

- res1 = Crypto.Cipher.DES.new(convertKey(key[0:7])).encrypt(nonce)
- res2 = Crypto.Cipher.DES.new(convertKey(key[7:14])).encrypt(nonce)
- res3 = Crypto.Cipher.DES.new(convertKey(key[14:21])).encrypt(nonce)
+ res1 = passlib.utils.des.des_encrypt_block(key[0:7], nonce)
+ res2 =
Comment 1 Janek Walkenhorst univentionstaff 2015-09-09 10:47:46 CEST
That's a good idea, now that python-passlib is available.
One can also check if a python implementation of MSCHAPv2 is available since UCS 4.0.
Comment 2 Florian Best univentionstaff 2017-06-28 14:52:43 CEST
There is a Customer ID set so I set the flag "Enterprise Customer affected".
Comment 3 Stefan Gohmann univentionstaff 2019-01-03 07:17:14 CET
This issue has been filled against UCS 4.0. The maintenance with bug and security fixes for UCS 4.0 has ended on 31st of May 2016.

Customers still on UCS 4.0 are encouraged to update to UCS 4.3. Please contact
your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.