From 2012, but the legal basis has not chnaged, I think:
https://www.asil.org/insights/volume...-block-passage
The UN treaty of 1982 has been signed
but not ratified by Iran. However, Iran claims the right for a 12 nm zone (instead mof 3 nm) which saw its mentioning and fundament in right this treaty.
Personally, I think in case of conflict neither the US nor Iran would care too much for legal conditions, but would just do what they deem is in their military interest. Of course, the US would take much more flak from international opinion for doing so, than Iran. Also, the US (and the UK) would be exposed to a far more criitcla population at home. No doubt that world reaction to a conflict and actor's behaviour would base on double standards.