Skip to content
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

add unknown to EncryptionAlgorithm enum #92

Merged
merged 6 commits into from
Jan 25, 2024

Conversation

uhoreg
Copy link
Member

@uhoreg uhoreg commented Jan 23, 2024

Related: element-hq/element-web#26610, which will be fixed by this once matrix-js-sdk is updated

@@ -3,6 +3,10 @@
- `PickledInboundGroupSession.sender_signing_key` is now optional.
([#89](https://github.com/matrix-org/matrix-rust-sdk-crypto-wasm/pull/89))

- Add `Unknown` to `EncryptionAlgorithm`, representing unsupported algorithms
Copy link
Member Author

Choose a reason for hiding this comment

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

Does this count as a breaking change?

Copy link
Member

Choose a reason for hiding this comment

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

Kinda. The js-sdk code to handle this is going to be incorrect, for instance, since Unknown != Olm.

    rustAlgorithms.forEach((algorithm) => {
        switch (algorithm) {
            case RustSdkCryptoJs.EncryptionAlgorithm.MegolmV1AesSha2:
                algorithms.add("m.megolm.v1.aes-sha2");
                break;
            case RustSdkCryptoJs.EncryptionAlgorithm.OlmV1Curve25519AesSha2:
            default:
                algorithms.add("m.olm.v1.curve25519-aes-sha2");
                break;
        }
    });

... But I'm not really sure it's worth a major version bump. I'd treat it as a normal change.

Please put it at the top of the changelog though (most recent changes in the changelog are first, obviously), and resolve the conflict.

@uhoreg uhoreg marked this pull request as ready for review January 23, 2024 02:24
@uhoreg uhoreg requested a review from a team as a code owner January 23, 2024 02:24
@uhoreg uhoreg requested a review from richvdh January 23, 2024 02:24
@@ -3,6 +3,10 @@
- `PickledInboundGroupSession.sender_signing_key` is now optional.
([#89](https://github.com/matrix-org/matrix-rust-sdk-crypto-wasm/pull/89))

- Add `Unknown` to `EncryptionAlgorithm`, representing unsupported algorithms
Copy link
Member

Choose a reason for hiding this comment

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

Kinda. The js-sdk code to handle this is going to be incorrect, for instance, since Unknown != Olm.

    rustAlgorithms.forEach((algorithm) => {
        switch (algorithm) {
            case RustSdkCryptoJs.EncryptionAlgorithm.MegolmV1AesSha2:
                algorithms.add("m.megolm.v1.aes-sha2");
                break;
            case RustSdkCryptoJs.EncryptionAlgorithm.OlmV1Curve25519AesSha2:
            default:
                algorithms.add("m.olm.v1.curve25519-aes-sha2");
                break;
        }
    });

... But I'm not really sure it's worth a major version bump. I'd treat it as a normal change.

Please put it at the top of the changelog though (most recent changes in the changelog are first, obviously), and resolve the conflict.

@richvdh
Copy link
Member

richvdh commented Jan 23, 2024

fixes element-hq/element-web#26774

no, it doesn't. Not until the js-sdk is updated to use this change.

@uhoreg
Copy link
Member Author

uhoreg commented Jan 25, 2024

I linked to the wrong issue in the PR description. Fixed now.

@richvdh
Copy link
Member

richvdh commented Jan 25, 2024

I linked to the wrong issue in the PR description. Fixed now.

Ok, but please avoid the magic github words "will fix ", which means that GH will auto-close that issue when the PR is merged, irrespective of the fact we have many more steps to do before that happens. Now fixed.

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

thanks!

@richvdh richvdh enabled auto-merge (squash) January 25, 2024 17:36
@richvdh richvdh merged commit 7447d2a into matrix-org:main Jan 25, 2024
3 checks passed
@uhoreg
Copy link
Member Author

uhoreg commented Jan 25, 2024

I linked to the wrong issue in the PR description. Fixed now.

Ok, but please avoid the magic github words "will fix ", which means that GH will auto-close that issue when the PR is merged, irrespective of the fact we have many more steps to do before that happens. Now fixed.

Oh, I changed "fixes" to "will fix" because I thought that would be safe. :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants