IPNS Record verification: must check against the name
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- go
- Domain
- cryptography, documentation, security
Research direction
Read the IPNS record verification section in the linked specification, then compare it with the check in boxo's ipns/record.go around line 724. Update the verification requirements to cover matching the record's public key against the IPNS name, and confirm the specification reflects the existing reference implementation behavior.
Written by the indexing model from the issue text.
Description
I'm following this spec: https://specs.ipfs.tech/ipns/ipns-record/#record-verification
An attacker can create a fake IPNS record with a private key created by the attacker, with the corresponding public key in the IpnsEntry.pubKey field, and with a IpnsEntry.signatureV2 created with that private key. Verification code that literally follows the current spec, can end up accepting the fake IPNS record, since the signature in the record is valid for the public key in the record.
To address this security issue, a step should be added to the verification, where the public key from the record (or from any untrusted source) is compared against the IPNS name. If they don't match, verification must fail.
Note that the Go reference implementation currently already appears to be doing this check:
- Dominant language
- HTML
- Stars
- 1.2k
- Forks
- 250
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ipfs/specs
-
need/triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
need/triage
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
dnslink:// URIsOpenneed/triage
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Readme cleanupMay be free again @darobin claimed this 129 days ago, and no pull request is open. Openneed/triage P1
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
RSA PKCS#1 v1.5 verify fails for SHA-512/224, SHA-512/256 and SHA-3 (UnhandledMatchError on 4.x)Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 Half a day Newbie friendliness 66/100
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
btclib-org/seed-scan#63 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Mbed-TLS/TF-PSA-Crypto#983 ·
Maintainers usually reply within 1 day