ircv3 / ircv3-specifications

IRCv3 specifications | Roadmap: https://git.io/IRCv3-Roadmap | Code of conduct: http://ircv3.net/conduct.html
http://ircv3.net
785 stars 79 forks source link

Public key pinning #243

Open attilamolnar opened 8 years ago

attilamolnar commented 8 years ago

PKP is a security mechanism that allows servers to resist impersonation by MITMs using fraudulent certs.

Prior art is HTTP PKP (HPKP):

lol768 commented 8 years ago

This is something I'd personally like to see and would be happy to implement for KICL once there's a spec. Would you see this as being specified in the STS policy or elsewhere? If it's the former, might be necessary to strip/replace the padding characters if base64 encoding is used:

:ircd.host CAP lol768 LS :sts=duration=31536000,pin-sha256=isi41AizREkLvvft0IRW4u3XMFR2Yg7bvrF7padyCJg=

Multiple values might also be a challenge with the existing spec since "Keys specified in this document MUST only occur at most once" and as an example my client implementation just uses a Map of String->String. Perhaps a different delimeter could be used.

I guess another capability would also work and side-step a few of these problems.

attilamolnar commented 8 years ago

@lol768 Happy to see your interest. I think PKP shouldn't be implemented via the STS cap but be a different cap and perhaps use a different protocol as well to avoid having to escape data.

attilamolnar commented 8 years ago

Regarding writing the specification, I've been waiting for STS to get a little momentum, get implemented in a few clients (making a publicly available test server helped) and see what, if any, suggestions implementors have about the STS specification before doing major work on PKP.

lol768 commented 8 years ago

making a publicly available test server helped

If only I'd known about this before I started my work on STS client support... Ended up writing some very quick code to add it to charybdis, but I guess it ensured I understood the spec.

Is there a hostname I can connect to in order to test the STS stuff?

jwheare commented 8 years ago

Nice work! Great to see projects starting to implement this enthusiastically, especially as I've not been able to prioritise client support on IRCCloud yet. The inspircd testnet is here and has sts enabled with a prefix as draft/sts:

irc://testnet.inspircd.org:6667

lol768 commented 8 years ago

Brilliant, seems to all be working. Apologies for derailing this issue somewhat

syzop commented 7 years ago

Likely relevant news item: RIP HPKP: Google abandons public key pinning