-
Notifications
You must be signed in to change notification settings - Fork 0
Fix compatibility with UnifiedPush/tink #3
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
Conversation
ClearlyClaire
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Thank you for your contribution.
First, can you rebase this PR? main should have the OpenSSL 3 fixes already.
I'm not very knowledgeable about RFC8291 and aes128gcm, but my understanding is that the current code is already correct, and your changes amount to:
- checking message size before encryption for earlier error handling
- removing an unnecessary byte of padding after the padding delimiter
- choosing a fixed value of 4096 for the record size
I've rebased the branch
It is currently not possible to decrypt push messages with other libs, the error may come from that extra padding or from a wrong RS. Removing that extra padding and using the fixed RS fixes decryption with other libs (tested with tink used by UnifiedPush lib), and also allow testing against the RFC example (that is what I've implemented in mastodon PR) |
|
Right, so this PR changes various parameters to use the particular ones used in the RFC example to be able to use it as a verifiable example. As for |
|
I haven't check if there were an issue on tink side |
|
Maybe the decryption was correct and the error come from that RS indeed 👍 The extra padding could let message with exact length of 3993 to fail even if it could succeed |
|
@ClearlyClaire : There was indeed a bug in tink: tink-crypto/tink-java-apps#5 |
Bring back openssl3 support and fix encryption