Support ChaCha20 Poly1305 on Unix - #52522
Conversation
|
Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @GrabYourPitchforks Issue DetailsContributes to #52482
|
|
Draft for now, I suspect there will be compilation failures on older Linux. |
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
|
I'm guessing some of our macOS machines don't have OpenSSL 1.1.0 on them? Looks like the 10.15 machines do, and <= 10.14 don't. |
|
Note, I considered refactoring this to an AeadCommon pattern as Windows was, but left it as-is for now. The CCM, GCM, and ChaChaPoly implementations all have some notable differences. ChaChaPoly1305 uses a slightly newer API to get and set the authentication tag. CCM does not call |
|
|
||
| if (associatedData.Length != 0) | ||
| { | ||
| if (!Interop.Crypto.EvpCipherUpdate(_ctxHandle, Span<byte>.Empty, out _, associatedData)) |
There was a problem hiding this comment.
Out of morbid curiosity, what happens if multiple threads call this at the same time on the same instance? Is there a potential for buffer overrun?
(I know this is copied from the existing AEAD code, so I'm not suggesting changes at this time. Just trying to calculate risk exposure.)
Contributes to #52482