Consider dropping hand-written cipher modes
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 993
- Avg merge
- 9d 21h
- Merged PRs (30d)
- 1
Description
We could consider dropping hand-written cipher modes in the library.
CbcCipherModewill not be used anymore once PR https://github.com/sshnet/SSH.NET/pull/1546 is merged.CfbCipherModeis only used for PKCS1 private key encrypted byDES-EDE3-CFB. Suggest user switching to newer encryption method.OfbCipherModeis not used anywhere inside the library.CtrCipherModeis used forAesCipher. We can create a dedicated classAesCtrCipher, just likeAesGcmCipher.
With all above concrete classes removed, we can remove the abstract class CipherMode. We can also remove AesCipherMode enum (renamed as and use BCL's BlockCipherMode in PR https://github.com/sshnet/SSH.NET/pull/1546)CipherMode enum.
Then AesCipher.BlockImpl can be removed, AesCipher.CtrImpl can be removed (moved to a dedicated class per above suggestion).
AesCipher.BclImpl can be removed so that AesCipher can have a pure BCL implementation (without nested Impl classes)
So does the TripleDesCipher.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review PR 1546 first to confirm which cipher-mode changes it already covers. Then trace the usages of CbcCipherMode, CfbCipherMode, OfbCipherMode, CtrCipherMode, CipherMode, AesCipher and TripleDesCipher, including the PKCS1 private-key path. Done means unused hand-written modes and obsolete implementations or enums are removed without leaving required AES-CTR or TripleDES behavior unsupported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- cryptography
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100