Skip to content

[Breaking change]: RSA.EncryptValue and RSA.DecryptValue are obsolete #31614

Closed

Description

@vcsjones

Description

RSA.EncryptValue and RSA.DecryptValue are obsolete with the SYSLIB0048 diagnostic code.

This obsoletion is for .NET 8 Preview 1.

Version

Other (please put exact version in description textbox)

Previous behavior

Callers could use RSA.EncryptValue or RSA.EncryptValue without a warning.

New behavior

In .NET 8, users of RSA.EncryptValue or RSA.EncryptValue will get a SYSLIB0048 compilation warning.

Type of breaking change

  • Binary incompatible: Existing binaries may encounter a breaking change in behavior, such as failure to load/execute or different run-time behavior.
  • Source incompatible: Source code may encounter a breaking change in behavior when targeting the new runtime/component/SDK, such as compile errors or different run-time behavior.

Reason for change

These APIs were never implemented and always produced a NotSupportedException. Their purpose is unclear and should not be used.

Recommended action

Callers that want to encrypt or decrypt with RSA should use Encrypt or Decrypt instead.

Feature area

Cryptography

Affected APIs

  • M:System.Security.Cryptography.RSACryptoServiceProvider.EncryptValue(System.Byte[])
  • M:System.Security.Cryptography.RSACryptoServiceProvider.DecryptValue(System.Byte[])
  • M:System.Security.Cryptography.RSA.EncryptValue(System.Byte[])
  • M:System.Security.Cryptography.RSA.DecryptValue(System.Byte[])

Associated WorkItem - 60624

Activity

  1. added
    source incompatibleSource code may encounter a breaking change in behavior when targeting the new version.
    on Oct 5, 2022
  2. ghost added
    in-prThis issue will be closed (fixed) by an active pull request.
    on Jan 24, 2023
  3. added
    📌 seQUESTeredIdentifies that an issue has been imported into Quest.
    and removed
    🗺️ reQUESTTriggers an issue to be imported into Quest.
    on Jan 24, 2023
  4. ghost removed
    in-prThis issue will be closed (fixed) by an active pull request.
    on Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🏁 Release: .NET 8Work items for the .NET 8 release📌 seQUESTeredIdentifies that an issue has been imported into Quest.breaking-changeIndicates a .NET Core breaking changesource incompatibleSource code may encounter a breaking change in behavior when targeting the new version.

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions