Rust and WASM did-method-plc tools and structures

Validation does not take into account DER-encoded signatures (and potentially other) #1

open
opened by atscan.net

A few days ago, a large number of invalid transactions were retroactively deleted from the PLC Directory. https://github.com/bluesky-social/atproto/discussions/4316

According to my findings, plc-audit does not take the new validation parameters into account and marks invalid operations as valid. https://github.com/did-method-plc/did-method-plc/issues/109

One of the examples discovered is this operation: ``yaml cid: bafyreiassmpc63we45hzwi6ewh3z3bbhtr5ixhzmedj5qk7u5ndwnonyve did: did:plc:ckjr4l3oyttu7gzdysy7phme

* https://plc.directory/did:plc:ckjr4l3oyttu7gzdysy7phme/log/audit
* https://plc.wtf/did:plc:ckjr4l3oyttu7gzdysy7phme/log/audit

According to @retr0.id, this transaction has a problem with "DER-encoded signature" and "base64" padding.
https://bsky.app/profile/retr0.id/post/3m5mj7wndz22y

Here is example output from plc-audit command:
```bash
# plc-audit did:plc:ckjr4l3oyttu7gzdysy7phme --plc-url https://plc.wtf
๐Ÿ” Fetching audit log for: did:plc:ckjr4l3oyttu7gzdysy7phme
   Source: https://plc.wtf

๐Ÿ“Š Audit Log Summary:
   Total operations: 1
   Genesis operation: bafyreiassmpc63we45hzwi6ewh3z3bbhtr5ixhzmedj5qk7u5ndwnonyve
   Latest operation: bafyreiassmpc63we45hzwi6ewh3z3bbhtr5ixhzmedj5qk7u5ndwnonyve

๐Ÿ” Analyzing operation chain...

โœ… Validation successful!

๐Ÿ“„ Final DID State:
   Rotation keys: 2
     [0] did:key:zQ3shp9bxiGEX1dzXXJvKPrcHum9kvevRZLqSpoZM94xQs5Ue
     [1] did:key:zQ3shShPsFoeMwdEhYV5bnmJVD6xNdyrQ8LQ38G3WNCWsduhk

   Verification methods: 1
     atproto: did:key:zQ3ship6T2R6yEH2NBqoGUXQxVohTshLPiR9th4C2rW5o3L4j

   Also known as: 1
     - at://serylis.kitsune.nexus

   Services: 1
     atproto_pds: https://kitsune.nexus (AtprotoPersonalDataServer)

lol I accidentally created this issue under the @atscan.net account :D

I tried to delete it, but it reported an error... so I wanted to edit it and it said that the issue doesn't exist on PDS.

Well, sorry for the confusion :)

sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:ft3tl5dxjn4psdk6asenqn3r/sh.tangled.repo.issue/3m5mkieslel22