Skip to content

explain verify metadata step by step#75

Open
alperozturk96 wants to merge 6 commits into
masterfrom
feat/explain-verify-metadata
Open

explain verify metadata step by step#75
alperozturk96 wants to merge 6 commits into
masterfrom
feat/explain-verify-metadata

Conversation

@alperozturk96
Copy link
Copy Markdown

Currently, all clients perform the same or similar steps, but the process is not clearly documented.

Please review your codebase. If the implementation does not fully align with the description, provide suggestions to make it more understandable and consistent across all four platforms (iOS, Android, Desktop, and Web).

Comment thread RFC.md Outdated
Signed-off-by: Alper Öztürk <67455295+alperozturk96@users.noreply.github.com>
Comment thread RFC.md Outdated
Signed-off-by: Alper Öztürk <67455295+alperozturk96@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

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

This is very implementation specific it should explain what to do not how to do it.
Because e.g. convert PEM to x.509 depends on what library you are using.

Comment thread RFC.md Outdated
Comment thread RFC.md
#### Step-by-Step Verification Process

1. Download the metadata and its corresponding signature from the endpoint: '/ocs/v2.php/apps/end_to_end_encryption/api/v2/meta-data/'
2. Decrypt the Metadata Key:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is step 3.

Comment thread RFC.md
- Locate the current user's entry in the users array within the metadata.
- Extract the encrypted metadata key for that user. Decrypt this key using the client’s private key.
- This produces the decrypted folder metadata file, which includes: A list of users and each user’s certificate
3. Prepare Metadata for Verification:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This needs to be step 2, because if it is invalid you have throw it away.
So you should not try to decrypt metadata that is not valid.

Copy link
Copy Markdown
Author

@alperozturk96 alperozturk96 Apr 28, 2026

Choose a reason for hiding this comment

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

Android does in this order. How do you validate metadata? Client just fetches metadata and removes the file-drop section and serializes. Serialization most likely will succeed.

What kind of verification logic do you have?

Comment thread RFC.md Outdated
Comment thread RFC.md Outdated
Comment thread RFC.md
Comment on lines +490 to +491
- Convert it into a UTF-8 byte array.
- Wrap it as a processable content object.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is implementation specific.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Any suggestion?

Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Alper Öztürk <67455295+alperozturk96@users.noreply.github.com>
Comment thread RFC.md Outdated
alperozturk96 and others added 2 commits April 28, 2026 13:36
Signed-off-by: Alper Öztürk <67455295+alperozturk96@users.noreply.github.com>
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Alper Öztürk <67455295+alperozturk96@users.noreply.github.com>
@alperozturk96
Copy link
Copy Markdown
Author

This is very implementation specific it should explain what to do not how to do it. Because e.g. convert PEM to x.509 depends on what library you are using.

That's why I created this PR to align also wrote in the description:

provide suggestions to make it more understandable and consistent across all four platforms (iOS, Android, Desktop, and Web).

Thus with everyone's suggestion we have understandable RFC. Implementation details is just starting point then we can trim and make it better.

@alperozturk96 alperozturk96 requested a review from susnux April 28, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants