<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I’ve actually already seen a very
common repeated pattern as it comes to client-side data storage:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>1. “Hey let’s try using
localStorage to improve our user experience.”<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>2. “Sounds great, but the data can’t
be stored in plain text if its user data.”<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>3. “That’s okay, we’ll
just use the XYZ JavaScript encryption library.”<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>4. “And then use it on every read
and every write?”<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>5. “Ugh, you’re right,
nevermind.”<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I’ve had, or participated in, this
conversation multiple times. I also know, from speaking with others about this
proposal, that this conversation isn’t uncommon.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Again I’ll say I’m all for
adding crypto into JavaScript. I think in addition to that, there should be
affordances for what will likely be common usage patterns. To me, any and all
mechanisms for client-side storage should have some basic crypto built-in, so
why not start here?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>In regards to data expiration, part of
ensuring the security of data is knowing how long it will be stored on disk. If
I let someone borrow my computer to check their email, and the email client
happens to save some data onto the client, then that person’s data will
now be on my disk for who knows how long. That represents a data security
issue. By allowing an expiration date to be tied to the data, you can have
reasonable assurance that the data isn’t just going to be sitting around
waiting for someone to try and use it. <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>-Nicholas</span></font><font color=navy><span
style='color:navy'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>______________________________________________</span></font><font
color=navy><span style='color:navy'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Commander Lock: "Damnit Morpheus, not
everyone believes what you believe!"</span></font><font color=navy><span
style='color:navy'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Morpheus: "My beliefs do not require
them to."</span></font><o:p></o:p></p>
</div>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
whatwg-bounces@lists.whatwg.org [mailto:whatwg-bounces@lists.whatwg.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Jeremy Orlow<br>
<b><span style='font-weight:bold'>Sent:</span></b> Tuesday, April 06, 2010 6:55
AM<br>
<b><span style='font-weight:bold'>To:</span></b> Nicholas Zakas<br>
<b><span style='font-weight:bold'>Cc:</span></b> whatwg@lists.whatwg.org; Dirk
Pranke<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [whatwg] Proposal for
secure key-value data stores</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Sorry
for misunderstanding your original suggestion.<o:p></o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>On Wed, Mar 31, 2010 at 1:13 AM, Nicholas Zakas <<a
href="mailto:nzakas@yahoo-inc.com">nzakas@yahoo-inc.com</a>> wrote:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>I certainly can't argue against a focus on JS crypto. :) What I'd like
to do is eliminate what I believe will be a repeated pattern for developers in
the future. It would be really nice if, in addition to having access to crypto
functions, there was an area where I could stick data that would get encrypted
automatically (and of course, where I could be sure the data would be
eliminated after a set amount of time).<o:p></o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>It seems to me that Dirk is right that crypto in the browser is a more
general problem and that a general crypto API would be much more valuable than
creating new APIs with similar/duplicate functionality + crypto.
Optimizing for "repeated patterns" probably should wait until
we see what patterns are actually common. :-)<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>My proposal is less about encryption and more about providing better
control over how data is stored and for how long.<o:p></o:p></span></font></p>
</blockquote>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Can you provide some concrete use cases for expiration of content?
They'd probably have to be pretty dramatic to warrant creating yet
another storage mechanism.<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Maybe this can somehow be integrated into IndexedDB? There's very
little chance of it being a v1 feature, but maybe we could make sure it's
possible to add in future versions.<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
-Nicholas<br>
<br>
______________________________________________<br>
Commander Lock: "Damnit Morpheus, not everyone believes what you
believe!"<br>
Morpheus: "My beliefs do not require them to."<br>
<br>
-----Original Message-----<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>From: <a
href="mailto:whatwg-bounces@lists.whatwg.org">whatwg-bounces@lists.whatwg.org</a>
[mailto:<a href="mailto:whatwg-bounces@lists.whatwg.org">whatwg-bounces@lists.whatwg.org</a>]
On Behalf Of Dirk Pranke<br>
Sent: Tuesday, March 30, 2010 3:09 PM<br>
To: Nicholas Zakas<br>
Cc: <a href="mailto:whatwg@lists.whatwg.org">whatwg@lists.whatwg.org</a>;
Jeremy Orlow<br>
Subject: Re: [whatwg] Proposal for secure key-value data stores<o:p></o:p></span></font></p>
</div>
<div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>On Tue, Mar 30, 2010 at 2:06 PM, Nicholas Zakas <<a
href="mailto:nzakas@yahoo-inc.com">nzakas@yahoo-inc.com</a>> wrote:<br>
> Yes, that's precisely what I'm talking about. It seems to me that this
will end up being a pretty common pattern (encrypting/decrypting data stored
locally).<br>
><br>
> The idea behind letting the key to be defined by the developer is to allow
any usage that developers deem appropriate for the situation. For example, one
might want to only use a server-generated key to access the data, in which case
this data won't be available offline but will be used to supplement the online
behavior. Another might determine the key based on some information in a
cookie, which is less secure but does allow offline access while also ensuring
that if the cookie changes or is deleted, the data remains secure.<br>
><br>
> The idea behind the expiration date is to allow developers to be sure the
data won't stay around on disk indefinitely. Think about the Internet café use
case where people are repeatedly logging in and out - we don't want everyone's
data living on that computer for however many years it's in use.<br>
><br>
> One way or another, I think JavaScript crypto is going to be important in
the next few years.<br>
<br>
Perhaps we should instead focus on a set of JS Crypto APIs, since that<br>
is largely orthogonal to the storage APIs?<br>
<br>
-- Dirk<o:p></o:p></span></font></p>
</div>
</div>
</blockquote>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>