Looking at cryptography in a place that is absolutely fine but satisfies no meaningful threat model whatsoever and deciding that the correct terminology is "emotional support crypto"
"Is that encryption load bearing?"
"No, it's emotional support cryptography"
@mjg59 I've seen a lot of "performative cryptography"; like an messenger that uses strong end-to-end encryption but ... both ends are a proprietary app owned by a bad actor corporation ...
@yojimbo @mjg59 relatedly, and worse: any form of web based crypto. or rather, "crypto where you're served an unauditable application every page load"
at least it's possible to audit $CORP e2ee apks after the fact.
(now is the v1.2.3.4 they were running the same binary as the v.1.2.3.4 that others have archived? open question :) not one limited to bad actor corps though. )
@mjg59 personally, rather have crpytography where none is needed instead of not having cryptography where some is needed
@16af93 Unless the presence of that cryptography leaves you feeling safe and warm when you really shouldn't be
@mjg59 Iâve been trolling at work for years with this sticker.
I had to do some digging to find the link since the URLs in my receipt have gone 404 in the meantime, but hereâs where I bought it from.
https://www.etsy.com/uk/listing/1756628420/encrypted-at-rest-sticker
@mjg59 âwho are you emotionally supporting?â
âoh, well, the web browser. you see the connection is already encrypted over WireGuard but poor little firefox will not let us use many features unless we add extra TLSâ
@charlotte @mjg59 yes. itâs not hard . but itâs unnecessary and satisfies no meaningful threat model (the connection is already authenticated and private)
@charlotte @mjg59 sure, theyâre not always. but a peer-authenticated wireguard connection is pretty private.
it simplifies a lot of checks if you simply assume that the channel is unencrypted
absolutely! hence, emotional support cryptography. itâs absolutely fine, but satisfies no meaningful threat model.
/Cinny
@sodiboo @mjg59 emotional support cryptography would be adding application layer cryptography in javacript over https for example
tls over wireguard is technically superfluous but âhttps everywhereâ in almost all cases is a good idea
itâs like how when configuring an internal service you would only have it listen on an internal ip (not ::) and not unblock the port in the firewall. one of these is technically superfluous but itâs good to have both
/Cinny
@sodiboo @mjg59 also wireguard authentication is meaningfully different from tls authentication
wireguard authentication says that the peer machine holds a specific key. unless you do stuff like proxying and the like you know that traffic originating from a specific ip comes from a host holding a specific key (which often is stored in plain text on the disk)
tls authentication on the other hand says that the peer has access to a specific application-specific key that belongs to a specific user or service
/Cinny
@mjg59 @sodiboo a simple example imagine family computer A that connects to wireguard-protected resource on server B
using just wireguard authentication all users on the machine could access the service
using tls authentication this could be scoped to anyone with a specific certificate (which could be stored on a physical key and pin-protected)
using application authentication could be scoped to anyone with a specific password or passkey
@charlotte @mjg59 hm. sure. thereâs a difference here.
in my scenario, iâm imagining internal communication between devices i own. i have a wireguard subnet there. for all intents and purposes, they are all as trustworthy as localhost. if somehow the application running is not what i expect, and i communicate with it under a false sense of security, then the target machine categorically contains malware and it would have to be either in (1) my service manager (root privileges, pid1 nonetheless), (2) a service with the ambient capability to listen on ports 80,443 (only my reverse proxy; the component that wouldâve handled TLS anyways), or (3) some other method that grants privilege escalation enough to listen on restricted ports, aka root access.
in all three cases, iâm fucked and TLS wouldnât have saved anything.
however, i might still use emotional support TLS just to make the browser shut up and not refuse based on HSTS or whatever else. again, iâm not arguing that itâs useless or a bad idea or that it shouldnât be done. the cryptography is fine to apply here. but it certainly does not satisfy a threat model. (you do remark that on a multi-tenant scenario, it could be meaningful. i donât dispute that. but my base assumption is âthe connection is intrinsically authenticated and privateâ which is not the case in the multi-tenant model)
@charlotte @mjg59 security is already there! https is strictly unnecessary! itâs just to keep the browser happy! how is it not emotional support cryptography!
/Cinny
@sodiboo @mjg59 like you constructed an environment where the threat model of it happens to not apply. congrats. almost nothing else is like that. adding exceptions to detect if we are on wireguard or sth to determine whether secure origin restrictions should apply or not adds a whole lot of additional complexity which didnât exist before. this itself increases the risk that an unencrypted communication gets exposed
adding exceptions to detect if we are on wireguard or sth to determine whether secure origin restrictions should apply or not adds a whole lot of additional complexity which didnât exist before. this itself increases the risk that an unencrypted communication gets exposed
yes. i agree? iâm not arguing against TLS-on-WireGuard. i feel like you repeatedly ignored me saying explicitly âiâm not saying it should not be doneâ. i certainly didnât say the browser should care about this use case. i agree. in the browser, enforcing HTTPS makes sense. but when you zoom out, itâs sometimes completely redundant.
you constructed an environment where the threat model of it happens to not apply.
thatâs what emotional support cryptography is?? when applying cryptography in an environment where it does not satisfy a threat model?? did we read a different root post?? sometimes for âno reasonâ but i brought up the main example where there is still a good reason to need to do this, even though it feels completely redundant (and it is)?
/Cinny
@mjg59 @sodiboo like this is essentially the same argument for why every website should have https
by removing the possibility of having an unencrypted channel, you also remove the possibility that sensitive information is transferred over the wire unencrypted.
The threat model is âexposing sensitive information unencrypted over the wireâ which might be met by the transport used, but probably is not
@sodiboo @mjg59 @charlotte it happens to be redundant in your specific setup, but this doesn't make it "emotional support"?
@IngaLovinde @mjg59 @charlotte i feel like it does?
like, yes, HTTPS is not emotional support cryptography in general. i agree with this. i didnât claim it was.
but if iâm deploying a network service on a known-trustworthy interface (such as the loopback interface, or over wireguard to an equally or more trusted machine (trusted as in more authoritative over this service)), i think it feels very unnecessary that i should need to bother with TLS? like. the security of this system as a whole is no weaker if i just donât do HTTPS. i know that communication is always trustworthy.
and yet, i may still choose to do HTTPS for two reasons:
it will not:
how is this NOT âemotional supportâ?? the only purpose is to trick involved parties into thinking itâs secure (which it is, but not because of the action that tricks them into believing it).
what is emotional support cryptography according to you two, if not something just like this??? itâs an entirely reasonable use of cryptography that provides no actual security benefit. (notably, this is mostly orthogonal to a browser enforcing HTTPS everywhere. one might still do this even if the browser does not strictly require it).
in particular, iâm assuming that âemotional support cryptographyâ is NOT a synonym of âsecurity theaterâ (which iâm currently thinking of as unreasonable measures intended to trick you into thinking a system is protected against a threat, when it actually isnât, or when that security cannot be verified)
it happens to be redundant in your specific setup
yes, exactly! a threat model is only really relevant to a specific system. you cannot meaningfully protect all systems everywhere from a given threat. you need to make non-universal assumptions.
/Cinny
@sodiboo @IngaLovinde @mjg59 the browserâs threat model is âthe transport is unsafe and can be intercepted and read out and maybe even modifiedâ and localhost traffic is the sole exception that you can know as a browser. there is no way for a browser to determine whether a path has some other encryption applied, an even if it were possible whether it could be intercepted by someone unauthorized. specific niche setups that do not apply to most web access for most users do not get considered because you cannot safely assume that any non-localhost traffic is encrypted
@IngaLovinde @mjg59 @charlotte
what is emotional support cryptography according to you two, if not something just like this???
from charlotte, a few posts up:
emotional support cryptography would be adding application layer cryptography in javacript over https for example
i feel like this is isomorphic to my example! the implication here is that both layers of encryption are done with keys held by the same entity / same machine. (which i made explicit in my example). but without that implied assumption, i donât think this is redundant at all in general. i can easily think of a messenger, where your packets to the server are encrypted in transit with HTTPS/TLS, and your actual messages are further encrypted at the application layer with keys held by other users of the service. i.e. end-to-end message encryption is an example of what you described, in my opinion.
/Cinny
@sodiboo @IngaLovinde @mjg59 the particular threat model on the server side is different: you know as the admin that the transport is encrypted. you can safely make the assumption that all traffic from wireguard peer ips is from an authorized host, as such your threat model would more be compromise of the peer and not that the network can be spied out by a man in the middle
but you then connect the two threat models together, the stronger one wins by default
you are of course free to not use a web browser (or modify it to meet your weaker threat model!) but the web browser threat model being stronger doesnât make it emotional support cryptography
/Cinny
also as a related question: should a browser consider the gateway ip on an encrypted wifi network to be a secure origin?
@charlotte @IngaLovinde @mjg59 iâm explicitly not talking about the threat model of HTTPS in general or of the browser in general.
also, notably, most browsers will not refuse to contact HTTP services? and most web services donât require the browser features locked behind a secure context? for all intents and purposes, HTTPS is entirely optional. the browser does not enforce HTTPS in general. yet i might still do HTTPS in the described scenario, for the sole purpose of convincing involved parties that the secure transport is actually secure. even though itâs not necessary, and even though it doesnât protect against a threat.
i feel like you are arguing that a Different Security Measure protects against a Different Threat. and i agree with your claim but itâs just . Not what i was talking about. ??? even though the same cryptographic methods happen to be involved in both contexts.
/Cinny
@sodiboo @IngaLovinde @mjg59 browsers donât fully prevent access to http websites that is true
they do offer ways to block http or mixed access, they restrict features on insecure origin, they are also either optionally or unconditionally redirecting to HTTPS. Browsers warn users about entering personal details on insecure pages, about even opening them (not usually by default). personally i think the restrictions do not go far enough but thatâs where pragmatism throws a wrench into things
/Cinny
Web browsers are built around their own threat model, if you need something different you need to look elsewhere. that doesnât make it âemotional support cryptoâ ever
hell if you encrypt your transport traffic and nobody sniffs it, isnât that also basically unnecessary in that regard?
or is it just a problem when the protections against threat model A overlap the encrypted transport that you have very unexpectedly applied to a very small amount of destinations?
@charlotte @IngaLovinde @mjg59 no. nor would i. because the gateway IP is not guaranteed to persistently refer to that same host. (e.g. if you switch wifi networks, the exact same page with the same URL can be an entirely different actor, without the server being compromised in any way, shape, or form)
i also donât think my browser should consider my wireguard subnet a secure context (because, as you say, it cannot know that it has the relevant properties). but i consider it secure because i know that even on a malicious physical wifi network, my wireguard interface will still receive those packets (and, worst case, a denial of service attack can force them to be dropped, but not intercepted).
however, i have seen routers with publicly qualified DNS names. those might be eligible for secure contexts. but again, the browser has no way to verify that without a TLS certificate. (which publicly named gateways generally present; this is the reason they have a public DNS name)
i think that encrypted wifi gateway and my wireguard subnet should maybe be considered a potentially trustworthy origin. that is, on the same level as localhost. i donât see an inherent problem with this (on localhost, the same host, esp. ports >1024, might also change identity without warning and without an attack per se). but i agree with you that itâs impossible for a browser to actually detect this for a given network. so the browser should still consider them untrusted without TLS. but i can safely consider them âpotentially trustworthyâ, because i have more context. (to my understanding, the only thing âpotentially trustworthyâ really means is that the connection is not being eavesdropped on; in particular it is not authenticated (as is required for âsecureâ status), so you donât know who youâre talking to (or that theyâre honest about their identity), but you do know that youâre talking securely to them, and there is no third party passively listening. see also: optimistic encryption).
/Cinny
@IngaLovinde @mjg59 @sodiboo basically: you encrypt your traffic because you canât prove that someone could be sniffing it
browsers encrypt their traffic because they also canât prove that someone could be sniffing it
the threat model is kind of very similar, itâs just that in rare circumstances they might overlap
@IngaLovinde @mjg59 @charlotte
i donât think my browser should consider my wireguard subnet a secure context. but i consider it secure
i think this is critical: i have a different threat model than the browser. in some sense, my threat model is more âcorrectâ, because it analyses a real specific deployed system and not abstractly all systems.
so i donât agree that i need to âcombineâ the browserâs threat model with that of the server. the browserâs threat model (i.e. its requirements for a âsecure originâ) is just Different from ârealityâ and whatâs âactually secureâ (i.e. what i consider secure).
and thatâs okay, i think?
and i think under this real world analysis, it still feels appropriate to call redundant cryptography âfor emotional supportâ. the browser is right to âwantâ TLS always. the browser is right to complain that thereâs no TLS, even when the underlying transport is actually secure (confidential + authenticated). but whether i actually give my browser TLS or not for that connection doesnât actually affect the ârealâ threat model. it only affects the browserâs âabstractâ threat model, which is based on less assumptions than what i can safely make about my system.
and i think crucially, if youâre looking at the browserâs level of abstraction, âTLS over WireGuardâ is not at all a thing that exists. WireGuard is not standardized or known to the browser; the secure tunnel is transparent to the browser. so indeed, from its perspective, âHTTPSâ is a good thing.
but from my perspective, as the only human in my system, i see that it is actually âTLS over WireGuardâ
so depending on where you analyze it, the TLS is either loadbearing, or completely redundant. this is, in my opinion, what âemotional support cryptographyâ must mean. some component can rightfully analyze it as loadbearing, but when the system as a whole is analyzed, it doesnât actually provide any additional desired security properties.
i conjecture that the browserâs threat model is roughly summarized as such: âthe browser must never trust a connection more than the human canâ. if i do not trust the confidentiality of a connection, then the browser mustnât consider that a secure origin. and indeed, that is true of reality. that is how it behaves. this is a good thing. and it doesnât mean that all my threat analyses should be based on what the browser can determine programmatically. i have more context than the browser. i can make more assumptions about my system. so my threat model wins over the browserâs by definition: the more specific threat model wins, not the âstrongestâ or âstrictestâ (but the resulting analysis is also more specific, and not broadly applicable outside of the system whose assumptions were used)