Skip to content

feat(chat-cipher): encrypt and decrypt a group payment request's text - #1852

Merged
bmc08gt merged 1 commit into
code/cashfrom
feat/payment-request-text-cipher
Oct 25, 2026
Merged

bmc08gt merged 1 commit into
code/cashfrom
feat/payment-request-text-cipher

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

Adds encryptPaymentRequestText / decryptPaymentRequestText to ChatCipher, 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.

PaymentRequestTextVectorTest checks the four encrypt/decrypt cases from payment_request_text.json byte for byte, plus the five cases that must fail to decrypt. The JSON is the shared vector file from the group requests spec. FakeChatCipher gets pass-through implementations for the app's tests.

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.
@bmc08gt bmc08gt self-assigned this Oct 25, 2026
@github-actions github-actions Bot added type: feature New functionality area: crypto Solana, keys, encryption, signing area: network gRPC, connectivity, API, exchange rates labels Oct 25, 2026
@bmc08gt
bmc08gt merged commit cb83721 into code/cash Oct 25, 2026
6 checks passed
@bmc08gt
bmc08gt deleted the feat/payment-request-text-cipher branch October 25, 2026 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: crypto Solana, keys, encryption, signing area: network gRPC, connectivity, API, exchange rates type: feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant