Skip to content
This repository was archived by the owner on Aug 5, 2021. It is now read-only.
This repository was archived by the owner on Aug 5, 2021. It is now read-only.

Only checking against the SignalProtocolAddress name when calling isTrustedIdentity in SessionBuilder #83

@fstracke

Description

@fstracke

Hey! I've recently started implementing End-to-end encryption using this library.
However when implementing a multi-device scenario I constantly got errors about changing IdentityKeys. When I checked the source code of the SessionBuilder class I found following line causing the error:

return this.storage.isTrustedIdentity(
this.remoteAddress.getName(), device.identityKey, this.storage.Direction.SENDING
).then(function(trusted) {

Here in line 10 the IdentityKeyStore is only checked for the name of the SignalProtocolAddress not the complete tuple of name.device. In the following lines the IdentityKeys are also only access through the address name.

Reading the documentation of the Signal Protocol, it states:

Sesame supports two different models for key pairs: With per-user identity keys, all devices under a user share the same key pair. With per-device identity keys, each device may have a different key pair.

With per-user identity keys, identity public keys for other devices are stored in UserRecords. With per-device identity keys, identity public keys for other devices are stored in DeviceRecords.

My question simply would be if this implementation of the Signal Protocol is indeed based on saving identity keys in the UserRecord, requiring them to be shared over multiple devices, and whether it would introduce security concerns to (privately) change the implementation to storing identity keys in DeviceRecords?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions