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

One shot CFB #55428

Closed
wants to merge 10 commits into from
Closed

One shot CFB #55428

wants to merge 10 commits into from

Conversation

vcsjones
Copy link
Member

@vcsjones vcsjones commented Jul 9, 2021

This implements CFB one shots.

Remaining work:

  • XML docs
  • Add persisted key tests for CFB AesCng, TripleDESCng

Closes #2406

@dotnet-issue-labeler
Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost
Copy link

ghost commented Jul 9, 2021

Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @GrabYourPitchforks
See info in area-owners.md if you want to be subscribed.

Issue Details

This implements CFB one shots.

Remaining work:

  • XML docs
  • Add CFB tests for AesCng, TripleDESCng

Closes #2406

Author: vcsjones
Assignees: -
Labels:

area-System.Security, new-api-needs-documentation

Milestone: -

@vcsjones
Copy link
Member Author

vcsjones commented Jul 9, 2021

This is draft to get feedback from CI since I am still missing a working Windows machine (but should be back up in the next day or two).

@@ -256,6 +256,9 @@ public abstract partial class SymmetricAlgorithm : System.IDisposable
public byte[] DecryptCbc(byte[] ciphertext, byte[] iv, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.PKCS7) { throw null; }
public byte[] DecryptCbc(System.ReadOnlySpan<byte> ciphertext, System.ReadOnlySpan<byte> iv, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.PKCS7) { throw null; }
public int DecryptCbc(System.ReadOnlySpan<byte> ciphertext, System.ReadOnlySpan<byte> iv, System.Span<byte> destination, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.PKCS7) { throw null; }
public byte[] DecryptCfb(byte[] ciphertext, byte[] iv, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.None, int feedbackSizeInBits = 8) { throw null; }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of these API additions slightly deviate from the approved API: the feedbackSizeBits was changed to feedbackSizeInBits. This matches the same convention that was settled on in #45003 (comment).

@vcsjones
Copy link
Member Author

vcsjones commented Jul 9, 2021

Will re-open this later. Realized there is a bit more left to get CNG working the way it should.

@vcsjones vcsjones closed this Jul 9, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Aug 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

One-shot AES CBC and ECB
1 participant