Repository navigation
feat(chat-cipher): encrypt and decrypt a group payment request's text - #1852
Merged
Merged
Conversation
EncryptedPaymentRequestText uses the group's chat key with the aad "flipcash-group-payment-request-e2ee-v1" || chat_id || creator_id. It sits beside encryptGroup/decryptGroup, which differ only in label and aad, so iOS gets it through the next shared-core build. PaymentRequestTextVectorTest reproduces payment_request_text.json: the four texts encrypt and decrypt byte for byte, and the five rejects fail.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
encryptPaymentRequestText/decryptPaymentRequestTexttoChatCipher, so a group payment request's title and description can be sealed with the group key the same way chat messages are.This is split out of the group payment requests branch so shared-core can ship it on its own: the iOS group requests PR (code-payments/code-ios-app#1129) calls both functions and can't build against a published shared-core until a release has them. The rest of group requests stays on
feat/group-requests, which sits on the unmerged group-send work.PaymentRequestTextVectorTestchecks the four encrypt/decrypt cases frompayment_request_text.jsonbyte for byte, plus the five cases that must fail to decrypt. The JSON is the shared vector file from the group requests spec.FakeChatCiphergets pass-through implementations for the app's tests.