Skip to content

Conversation

@alex
Copy link
Member

@alex alex commented Nov 26, 2025

TripleDES now only accepts 24-byte (192-bit) keys. Users needing single DES (1-key) or two-key Triple DES compatibility must expand the key themselves:

  • Single DES (8 bytes): key + key + key
  • Two-key 3DES (16 bytes): key + key[:8]

This change removes the automatic key expansion that was previously done in the TripleDES constructor, making the key length requirement explicit and preventing accidental use of weaker key configurations.

TripleDES now emits a deprecation warning when 8-byte (single DES) or
16-byte (two-key) keys are passed. In a future release, only 24-byte
(192-bit) keys will be accepted.

Users needing single DES or two-key Triple DES compatibility should
expand the key themselves:
- Single DES (8 bytes): key + key + key
- Two-key 3DES (16 bytes): key + key[:8]
@alex alex force-pushed the claude/enforce-tripledes-key-length-016zncCxwMyqoMNViGQ3a9JQ branch from f0177b0 to 1937220 Compare November 26, 2025 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants