GithubHelp home page GithubHelp logo

jeon's People

Contributors

brevilo avatar jkanefendt avatar ma1uta avatar mikkcz avatar thehurley3 avatar tzyl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jeon's Issues

UnsignedDeviceInfo in DeviceKeys should be mapped to 'unsigned'

Hi,

Thx for this framework!. It was very helpful and saved me a lot of time. Just one small thing I've found:
Currently the unsignedDeviceInfo property in the DeviceKeys model class will be mapped to 'unsignedDeviceInfo' in JSON.
This is wrong according to the Matrix Client-Server API spec. It should be mapped to 'unsigned'.

See https://matrix.org/docs/spec/client_server/latest#post-matrix-client-r0-keys-query

Current:

"device_keys": {
    "@userId:homeserver": {
        "aDeviceId": {
            ...
            "unsignedDeviceInfo": {
                "device_display_name": "whatever"
            },
            "unsigned": {}
        }
    }
}

Correct:

"device_keys": {
    "@userId:homeserver": {
        "aDeviceId": {
            ...
            "unsigned": {
                "device_display_name": "whatever"
            }
        }
    }
}

SNAPHOST dependency versions in released POMs

When I try to use your library as Maven dependency in the latest version 0.10.0, there are bunch of unresolvable transitive dependencies of version 0.9.2-SNAPSHOT. I noticed in your POM you are using dedicated version properties and you probably forgot to bump them.

What I recommend it to keep the version on a single place (the top most parent POM) and refer to that version. I will create a PR for both jmsdk and jeon repositories.

Bump dependencies and new release?

Hi!

Development seems to be paused right now. Could you please consider bumping the dependencies again and push another release so that the latest version is available via maven?

Thanks and keep it up!

E2EE: event model lacks olm payload class

When an event is encrypted using m.olm.v1.curve25519-aes-sha2 it needs to be augmented by a few additional attributes (see second code sample) prior encryption.

For example: to start a new outbound group session one needs to exchange the megolm session details with the room's devices, using a m.room_key event. Before it is encrypted and subsequently packaged as the ciphertext payload of a m.room.encrypted event (see first code sample above), it needs to be augmented like this:

{
    "content": {
        "algorithm": "m.megolm.v1.aes-sha2",
        "room_id": "!Cuyf34gef24t:localhost",
        "session_id": "X3lUlvLELLYxeTx4yOVu6UDpasGEVO0Jbu+QFnm0cKQ",
        "session_key": "AgAAAADxKHa9uFxcXzwYoNueL5Xqi69IkD4sni8LlfJL7qNBEY..."
    },
    "type": "m.room_key",
    "sender": "<sender_user_id>",
    "recipient": "<recipient_user_id>",
    "recipient_keys": {
        "ed25519": "<their_ed25519_key>"
    },
    "keys": {
        "ed25519": "<our_ed25519_key>"
    }
}

Unfortunately the spec isn't as precise about this as it could be. I'm not sure how to implement this in the given event model, and I don't know which payload events (besides m.room_key) should be covered. I presume all of them. Thus I'd argue that we need a kind of OlmPayloadEvent that wraps any other Event, augmenting it with the keys "sender", "recipient", "recipient_keys" and "keys" as illustrated above.

FYI, my current workaround uses a RoomKey instance, serializes it to JSON, adds the "missing" properties and passes the final string to libolm's olm_encrypt() (via my upcoming bindings library).

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.