Skip to content

[v4] CryptoUtil refactoring opportunities. #3386

Open
@teo-tsirpanis

Description

@teo-tsirpanis

Describe the feature

I read the code in the CryptoUtil.cs file and noticed that there are some things that could be improved.

Use Case

Cleaning-up the codebase and improving maintainability.

Proposed Solution

  • Use System.IO.Hashing to implement CRC hashing.
    • There are multiple possible ways to use it:
      • Always use it and depend on it by default – the easiest way to implement; there will be an extra dependency but it can be trimmed if unused
      • Add an AWSSDK.Extensions.System.IO.Hashing package that provides an alternative implementation.
  • Add overloads that accept spans.
  • Remove the managed MD5 implementation.
    • It was added 9 years ago purportedly to add FIPS support, but I don't think a managed implementation can be FIPS-compliant.
  • CryptoUtil could even be removed from the public API but that would be a needless breaking change.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS .NET SDK and/or Package version used

v4

Targeted .NET Platform

All

Operating System and version

All

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.p2This is a standard priority issuev4

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions