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

Unable to establish Olm outbound session from fallback key (BAD_MAC error when verifying signature) #4446

Closed
BillCarsonFr opened this issue Nov 10, 2021 · 1 comment · Fixed by #4447
Assignees
Labels
A-E2EE T-Defect Something isn't working: bugs, crashes, hangs and other reported problems

Comments

@BillCarsonFr
Copy link
Member

Steps to reproduce

Try to establish an olm session from an OTK of type fallback

Intended result and actual result

Signature will fail, because the signable json is only using 'key' where it should use the all json and only remove unsigned and signatures.

Only happens with fallback key as a new fallback field is present in the dict:

{
    "fallback": true,
    "key": "dQp6YuFhLbZ4...wBq2deKNmdpewSzc",
    "signatures": {
        "@XXXX:matrix.org": {
            "ed25519:EXRRRRRR": "R1NiKUQd+ZhvxMPZiFgcG/6Lm5.....h6RkF2+mdopOw+W8UB4YRBA"
        }
    }
}

Current:

fun signalableJSONDictionary(): Map<String, Any> {
        return mapOf("key" to value)
    }

Expected from JS sdk:

    // prepare the canonical json: remove unsigned and signatures, and stringify with anotherjson
    const mangledObj = Object.assign({}, obj);
    if ("unsigned" in mangledObj) {
        delete mangledObj.unsigned;
    }
    delete mangledObj.signatures;
    const json = anotherjson.stringify(mangledObj);

Your phone model

No response

Operating system version

No response

Application version and app store

No response

Homeserver

No response

Will you send logs?

No

@BillCarsonFr BillCarsonFr added T-Defect Something isn't working: bugs, crashes, hangs and other reported problems A-E2EE labels Nov 10, 2021
@BillCarsonFr BillCarsonFr self-assigned this Nov 10, 2021
@BillCarsonFr
Copy link
Member Author

iOS equivalent element-hq/element-ios#5120

@RiotRobot RiotRobot added this to Incoming in Issue triage Nov 10, 2021
Issue triage automation moved this from Incoming to Closed Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant