Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider dropping hand-written cipher modes #1560

Open
scott-xu opened this issue Dec 24, 2024 · 0 comments
Open

Consider dropping hand-written cipher modes #1560

scott-xu opened this issue Dec 24, 2024 · 0 comments

Comments

@scott-xu
Copy link
Collaborator

scott-xu commented Dec 24, 2024

We could consider dropping hand-written cipher modes in the library.

  1. CbcCipherMode will not be used anymore once PR Use System.Security.Cryptography for TripleDesCipher #1546 is merged.
  2. CfbCipherMode is only used for PKCS1 private key encrypted byDES-EDE3-CFB. Suggest user switching to newer encryption method.
  3. OfbCipherMode is not used anywhere inside the library.
  4. CtrCipherMode is used for AesCipher. We can create a dedicated class AesCtrCipher, just like AesGcmCipher.

With all above concrete classes removed, we can remove the abstract class CipherMode. We can also remove AesCipherMode enum (renamed as BlockCipherMode in PR #1546) and use BCL's 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant