All,

I have a few questions regarding SRI to which I've struggled to find answers so far. If someone could point me to the right place (or even respond with answers), I'd appreciate it.
  1. What was the reasoning as to why <img>, <object>, etc. tags were left out (well, any element with an 'src' attribute)?  It seems unreasonable to think such a point was not considered (indeed, there is even the following in the SRI spec: ..."A future revision of this specification is likely to include integrity support for all possible subresources, i.e., a, audio, embed, iframe, img, link, object,"...  so I'm interested to find out why only <link> and <script> tags were included initially.
     
  2. Has any work been done to assess the impact of SRI with regard to mobile devices? If SRI attains wide-spread adoption, does the added load of calculating and comparing hashes have a noteworthy effect on battery life or responsiveness of popular devices such as smart-phones and tablets?
     
  3. By my understanding, there is a one-to-one mapping between the integrity attribute and the sub-resource. This implies pages and sub-resources must always be updated in-sync. By allowing multiple integrity attributes (i.e. multiple cryptographically validated versions of a sub-resource), there is the (very low) risk that an attacker has more options for a collision, but it would permit developers and administrators a freedom which makes implementing SRI vastly more practical. Again, I presume this issue will have been thought about, and I'm interested in why such a capability is missing (see *1 below for an example use case).
     
  4. Are there any 'practical' guidelines or recommendations for web developers implementing SRI in applications? E.g. should it only be used for non-origin hosted resources, should developers provide multiple (or only one) hash in each integrity attribute (they can use many, what should they do?), is it recommended to limit SRI use in pages expected to have a large mobile-device audience (e.g. always for JS, optional for css) etc. etc.

*1: As a basic example: when deploying an updated stylesheet, the relevant page's <link> element would first be updated to have two integrity attributes to allow both the current and the future version of the stylesheet. This would allow for easy roll-back should a problem be introduced with the new stylesheet and a seamless roll-out of the new stylesheet without the risk of user-agents loading a version of the page which does not contain a valid digest for the currently hosted version on the cdn (outside of an attack or mistake at least).  This issue is relevant as updating cache controls etc. for content on an external service may not practical or viable for those using them, and it allows updates to be more flexibly deployed.

Regards,

Alexander Forbes
-------------------------------------------------------
IBM X-Force Red
 
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU