Make IsValidHostname More Robust #24

Merged
erinn merged 3 commits from validation into master 2021-09-28 21:08:47 +00:00

3 Commits

Author SHA1 Message Date
Sarah Jamie Lewis b36f6dc33f Format
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2021-09-28 14:03:15 -07:00
Sarah Jamie Lewis 8fe2974aaa Go conventions
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2021-09-28 14:01:53 -07:00
Sarah Jamie Lewis 6d5accb338 Make IsValidHostname More Robust
IsValidHostname now rejects public keys that are invalid ed25519
curve points in addition to ed25519 points that contain torsion
components (which are defined to be invalid Tor Hostnames).

Note: The lack of these checks previously  would have been unlikely to manifest as an issue further up the
stack because Tor would have prevented Cwtch from connecting to bad curve
points, the Tapir authentication protocol would have failed with invalid curve points,
and the experimental group chats only rely on signatures for voluntary authorship attribution,
rather than e.g. consensus or security.
2021-09-28 14:01:53 -07:00