21 Commits

Author SHA1 Message Date
Kévin Commaille
42f20a4e8d
Release ruma-signatures 0.15.0 2024-05-09 13:01:32 +02:00
Jonas Platte
558f342a62
Release ruma-signatures 0.14.0 2023-10-05 17:10:02 +02:00
Jonas Platte
c7a3c4e4fc
Upgrade ed25519-dalek to 2.0
Co-authored-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-08-24 20:48:54 +02:00
Kévin Commaille
d78c3e11f1 signatures: Remove age_ts from reference hash calculation
According to a spec clarification
2023-05-24 20:08:20 +02:00
gnieto
7565588be7
signatures: Prevent accepting events without at least one valid signature
`verify_event` has been changed recently to be more aligned with the
spec. In the previous algorithm, it returned an error if the event was
not signed by at least one of the required entities.

The new algortihm is iterating over all the signtures for the required
entities *and* skipping unknown algorithms. If an event is signed only
by unkonwn algorithms, the event would be accepted and not verifications
will happen. In order to prevent that, we check that, at least, a single
key is checked. This covers the 2nd point in: https://spec.matrix.org/v1.6/appendices/#checking-for-a-signature

A few more test cases were added:

- The event is properly signed, but key map contains a key with an
  unknown algorithm. Under this circumstances, the event should be
  allowed.
- An event signed by multiple keys for an entity, should verify all
  those signatures
- An event signed by a single key with an unkown algorithm by the
  required entity, should fail
2023-03-02 09:34:57 +00:00
Kévin Commaille
8f74ec4b1a
Release ruma-signatures 0.13.1 2023-02-15 13:08:31 +01:00
Jonas Platte
0d689f0a76
Release ruma-signatures 0.13.0 2023-02-01 14:14:16 +01:00
Jonas Platte
0047b1d19b
Release ruma-signatures 0.12.0 2022-09-12 21:08:31 +02:00
Jonas Platte
6805f67d75
signatures: Remove PartialEq impl for Ed25519Verifier 2022-05-23 18:30:32 +02:00
Jonas Platte
94545fd52c
Release ruma-signatures 0.11.0 2022-04-28 17:51:22 +02:00
Jonas Platte
93b200d1a3
Release ruma-signatures 0.10.0 2022-02-19 14:56:15 +01:00
Jonas Platte
2b7f873eeb
signatures: Update changelog 2022-02-19 01:32:53 +01:00
Jonas Platte
8d15c3d0f9
signatures: Merge SplitError into Error 2022-02-11 23:55:04 +01:00
Kévin Commaille
2da8a34ff4
signatures: Move Room v9 allowed content keys out of unstable-pre-spec
Part of #849
2022-02-10 18:11:29 +01:00
Jonas Platte
dbc0c40ec9
Release ruma-signatures 0.9.0 2021-08-11 17:30:28 +02:00
Devin Ragotzy
96567a295e
signatures: Fix canonical json functions to now return Result
signatures: Fix canonical json functions to now return Result
2021-08-10 15:22:26 +02:00
Jonas Platte
bbd22ab1e0
Release ruma-signatures 0.8.0 2021-06-21 18:08:04 +02:00
Jonas Platte
50a194c532
signatures: Update changelog 2021-06-21 17:29:05 +02:00
Jonas Platte
d2d286bf29
Release ruma-signatures 0.7.2 2021-06-01 22:04:36 +02:00
Jonas Platte
48cf21e37c
Release ruma-signatures 0.7.1 2021-05-16 22:55:03 +02:00
Jonas Platte
3db0ea7026
Move all crates into a new crates directory 2021-05-03 15:50:27 +02:00