<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>For technical audiences | Hash Collisions</title>
	<atom:link href="https://www.hashcollisions.com/category/technical-audience/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.hashcollisions.com</link>
	<description>Software development, usability, and digital culture</description>
	<lastBuildDate>Tue, 04 Aug 2020 03:53:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.4.2</generator>
<site xmlns="com-wordpress:feed-additions:1">181421149</site>	<item>
		<title>Dopey, the Folder-Selection Annoyance</title>
		<link>https://www.hashcollisions.com/2012/01/dopey-the-folder-selection-annoyance/</link>
		
		<dc:creator><![CDATA[Andrés Cabezas Ulate]]></dc:creator>
		<pubDate>Thu, 26 Jan 2012 05:28:22 +0000</pubDate>
				<category><![CDATA[For technical audiences]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[user interfaces]]></category>
		<category><![CDATA[windows]]></category>
		<guid isPermaLink="false">http://www.hashcollisions.com/?p=27</guid>

					<description><![CDATA[Just about every Windows program prompts a user to select a file for some purpose, such as through the Open File dialog window: &#160; I&#8217;ll call this kind of window &#8220;Opie&#8221; for the rest of this article.  Occasionally, a program will prompt a user not for a file, but for a folder.  In such cases [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Just about every Windows program prompts a user to select a file for some purpose, such as through the <strong>Open File</strong> dialog window:</p>
<p><a href="https://www.hashcollisions.com/wp-content/uploads/2012/01/Opie5001.png"><img class="alignnone size-full wp-image-33" title="Opie" src="https://www.hashcollisions.com/wp-content/uploads/2012/01/Opie5001.png" alt="" width="500" height="370" srcset="https://www.hashcollisions.com/wp-content/uploads/2012/01/Opie5001.png 500w, https://www.hashcollisions.com/wp-content/uploads/2012/01/Opie5001-300x222.png 300w" sizes="(max-width: 500px) 100vw, 500px" /></a></p>
<p>&nbsp;</p>
<p>I&#8217;ll call this kind of window &#8220;<strong>Opie</strong>&#8221; for the rest of this article.  Occasionally, a program will prompt a user not for a file, but for a folder.  In such cases programs will typically bring up the <strong>Folder Selection</strong> dialog window, which I&#8217;ll call &#8220;<strong>Dopey</strong>&#8220;:</p>
<p><a href="https://www.hashcollisions.com/wp-content/uploads/2012/01/Dopey.png"><img class="alignnone size-full wp-image-30" title="Dopey" src="https://www.hashcollisions.com/wp-content/uploads/2012/01/Dopey.png" alt="Select Folder dialog window from a program in Windows 7" width="347" height="384" srcset="https://www.hashcollisions.com/wp-content/uploads/2012/01/Dopey.png 347w, https://www.hashcollisions.com/wp-content/uploads/2012/01/Dopey-271x300.png 271w" sizes="(max-width: 347px) 100vw, 347px" /></a></p>
<p>&nbsp;</p>
<p>Had I never known Opie, I might not dislike Dopey.  Since I do, however, I find Dopey to be a vastly inferior and annoying UI element, for several reasons:</p>
<p><strong>1. Dopey can&#8217;t get to a folder directly.</strong>  Most of my files are nested four or five levels down from My Documents.  When I&#8217;m working on a project, I&#8217;ll typically have one or more of these level-4 folders open in Windows Explorer.  When I need to open one of these folders&#8217; files from a Windows program [1], I&#8217;ll typically copy the folder path from Windows Explorer,  paste it into Opie&#8217;s &#8220;File Name&#8221; field, and press Enter.  <em>Voilà</em>, I&#8217;m now looking at the folder I want, and can select the file I need.  Dopey doesn&#8217;t let me cut and paste a path like this.  (Some programs complement Dopey with a field where a path can be typed or pasted, which helps a bit.  Most programs, however, leave you alone with the klutz.)</p>
<p><strong>2. Dopey can leave me disoriented.</strong>  Dopey provides very little context to let me get my bearings inside the file system.  I often find myself looking at a list of neighboring subfolders, without any idea of who their parent is:</p>
<p><a href="https://www.hashcollisions.com/wp-content/uploads/2012/01/Dopey-Heritage.png"><img class="alignnone size-full wp-image-34" title="Dopey-Heritage" src="https://www.hashcollisions.com/wp-content/uploads/2012/01/Dopey-Heritage.png" alt="" width="347" height="384" srcset="https://www.hashcollisions.com/wp-content/uploads/2012/01/Dopey-Heritage.png 347w, https://www.hashcollisions.com/wp-content/uploads/2012/01/Dopey-Heritage-271x300.png 271w" sizes="(max-width: 347px) 100vw, 347px" /></a></p>
<p>&nbsp;</p>
<p>If I want to determine a folder&#8217;s parent, I&#8217;ll have to scroll a bit, and scroll quite a bit further if I need to determine its complete ancestry.  Once I determine the full path, I&#8217;ll have to scroll back to my original location (if I can find it).  Opie, on the other hand, lets me determine the full path (without getting lost in the process) by clicking on a drop-down arrow: [2]</p>
<p><a href="https://www.hashcollisions.com/wp-content/uploads/2012/01/Opie-Heritage1.png"><img class="alignnone size-full wp-image-36" title="Opie-Heritage" src="https://www.hashcollisions.com/wp-content/uploads/2012/01/Opie-Heritage1.png" alt="" width="379" height="240" srcset="https://www.hashcollisions.com/wp-content/uploads/2012/01/Opie-Heritage1.png 379w, https://www.hashcollisions.com/wp-content/uploads/2012/01/Opie-Heritage1-300x189.png 300w" sizes="(max-width: 379px) 100vw, 379px" /></a></p>
<p>&nbsp;</p>
<p><strong>3. Dopey makes me stumble my way down into the file system.</strong>  Navigating the file system with Dopey is cumbersome.  I start out with a little window displaying just a few folders.  I have to switch between clicking, scrolling vertically, and scrolling horizontally as I dig down into the file system.  With Opie, on the other hand, I can often get where I want  just by double clicking, often without any scrolling.  [3]</p>
<p>I&#8217;ve run into a few programs that show me Opie instead of Dopey when prompting for a folder.  I wish more Windows programs did this (hear ye, hear ye, Windows application developers!)  Ultimately, I hope (in vain?) that Dopey will be deprecated by Microsoft, banished from our UIs, and sent to join <a title="Clippy" href="http://en.wikipedia.org/wiki/Clippy">Clippy</a> in exile.</p>
<p>&nbsp;</p>
<p><strong> Notes:</strong></p>
<p>[1] Yes, most files can be opened by double-clicking them in Windows Explorer.  However, I still find myself using File -&gt; Open pretty frequently.  Somehow it&#8217;s more convenient than Explorer at times.</p>
<p>[2] For some programs in Windows 7, you don&#8217;t even a need to click a drop-down, since Opie looks just like Windows Explorer, and includes an address bar.</p>
<p>[3] This is due to the fact that Opie displays only a single level of subfolders at a time, and can display them in a multi-column list, which reduces the need to scroll or enlarge the dialog window.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">27</post-id>	</item>
		<item>
		<title>Can bcrypt&#8217;s computational expense be reduced on the server side?</title>
		<link>https://www.hashcollisions.com/2011/06/can-bcrypts-computational-expense-be-reduced-on-the-server-side/</link>
					<comments>https://www.hashcollisions.com/2011/06/can-bcrypts-computational-expense-be-reduced-on-the-server-side/#comments</comments>
		
		<dc:creator><![CDATA[Andrés Cabezas Ulate]]></dc:creator>
		<pubDate>Tue, 28 Jun 2011 16:02:45 +0000</pubDate>
				<category><![CDATA[For technical audiences]]></category>
		<category><![CDATA[bcrypt]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[security]]></category>
		<guid isPermaLink="false">http://www.hashcollisions.com/?p=22</guid>

					<description><![CDATA[(Caution: Amateur security research ahead.  Using it in a live system is not recommendable.) I recently read “How to Safely Store a Password”, an article by Coda Hale. For years I&#8217;ve thought that salting and hashing passwords with MD5 or SHA-1 prior to storage was sufficient to thwart password-cracking efforts (in cases where the user-account [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><em>(<strong>Caution:</strong> Amateur security research ahead.  Using it in a live system is not recommendable.)</em></p>
<p>I recently read “<a title="How to Safely Store a Password" href="http://codahale.com/how-to-safely-store-a-password/">How to Safely Store a Password</a>”, an article by Coda Hale.  For years I&#8217;ve thought that salting and hashing passwords with MD5 or SHA-1 prior to storage was sufficient to thwart password-cracking efforts (in cases where the user-account database table is stolen or publicly divulged).  Apparently, this approach is not much better than simply storing plaintext passwords (a practice widely scoffed at).  It was fascinating to find out about a better approach, that of using <a href="http://en.wikipedia.org/wiki/Bcrypt">bcrypt</a> instead of ordinary hash functions.  Unfortunately, it seems to me that bcrypt creates a new problem even as it solves an old one&#8230;</p>
<p><strong>The New Problem</strong></p>
<p>The use of bcrypt turns password-cracking into a computationally-prohibitive task for attackers.  However, bcrypt also hurts defenders, for whom password-hash generation or verification is now much more expensive than with ordinary hash functions.  A popular online service having thousands of users might need to acquire additional processing power simply to process user log-ins.  Moreover, by using bcrypt a service would become more vulnerable to denial-of-service attacks.  Attackers could tie up its servers&#8217; CPUs through numerous, automated log-in attempts. (These would make the servers call bcrypt repeatedly, once for each of the many log-in requests.)  Addressing this threat would seem to require problematic tradeoffs between security, cost and convenience.</p>
<p>Could there be a way of lowering a service&#8217;s computational bill while retaining bcrypt&#8217;s advantages?  This article presents a system which might accomplish this.  I haven&#8217;t heard of this approach and would like to know if I&#8217;m on to something (or if others have already devised equivalent systems).  Be forewarned, I am not a computer-security expert.  (Thank you for reading this article anyway.)</p>
<p><strong>A Potential Solution</strong></p>
<p>The following protocol attempts to reduce the frequency with which bcrypt is called by an online server.  It ensures that clients also pay for the cost of using bcrypt.  (The server still has to pay, but the client now has to “split” the computational bill with it.  This could reduce the appeal and effectiveness of brute-force or dictionary attacks on live systems.)  This protocol redesigns the account-creation, account-log-in, and password-reset processes for an online service.</p>
<p><strong>Account Creation</strong></p>
<ol>
<li> Joe Turing, a user (or a bot, 	perhaps), visits the account-creation page for SecureR, a 	hypothetical (yet surprisingly-popular) online service.</li>
<li>Turing types in his desired 	username and password and submits them (securely) to SecureR.</li>
<li>The SecureR server creates a 	bcrypted hash from the password, using a random salt value and the 	cost parameter currently mandated by  SecureR&#8217;s security policy.</li>
<li>The username, password, salt, 	cost, and bcrypted hash are stored in a record in SecureR&#8217;s 	user-account table.  The record also includes at least two 	verification fields.  One indicates whether the password hash has 	been verified (successfully computed by the client).  The other 	indicates whether the account as a whole has been verified.  Both 	fields are initially set to “false”.</li>
<li>SecureR sends the salt and cost 	parameters used to bcrypt Turing&#8217;s password back to Turing.</li>
<li>Turing (that is, his web browser) 	computes the bcrypt hash corresponding to his password and submits 	it to SecureR.</li>
<li>SecureR compares Turing&#8217;s hash 	with the hash previously computed by SecureR itself.  If the two 	hashes match, the password-hash-verification field is set to “true”.</li>
<li>Once other essential checks (such 	as e-mail-address verification) have been successfully performed the 	account-verification field is to “true”.  Turing&#8217;s account is 	now fully verified and active, and he can start using SecureR&#8217;s 	services.  (For now I won&#8217;t suggest when and where additional 	verification steps should take place, since bcrypt is my focus 	here.)</li>
</ol>
<p><strong>Account Log-in</strong></p>
<ol>
<li> Turing types his username and 	password into the SecureR log-in page.</li>
<li>Turing&#8217;s browser sends his 	username to SecureR.</li>
<li>SecureR looks up the salt and cost 	parameters contained in Turing&#8217;s user-account record.</li>
<li>SecureR sends the salt and cost 	values to Turing&#8217;s browser.</li>
<li>The browser uses these parameters 	and Turing&#8217;s typed-in password to generate the bcrypt hash for 	Turing&#8217;s password.</li>
<li>The browser submits Turing&#8217;s 	username and bcrypted hash to SecureR.</li>
<li>SecureR directly compares the hash 	submitted by Turing with the one stored in his user record.  If they 	match, account access is granted.</li>
</ol>
<p><strong>Password Reset</strong></p>
<ol>
<li> Turing types his username into 	SecureR&#8217;s password reset page and clicks the Submit button.</li>
<li>SecureR sends a verification link 	to Turing&#8217;s e-mail address.  (This link is to verify that Turing 	himself initiated the reset process.  This password-reset system 	never generates nor sends temporary passwords to the service&#8217;s 	users.)</li>
<li>Turing checks his e-mail, and 	opens up the link with his web browser.</li>
<li>The page brought up by the browser 	has a password field, into which Turing enters his new password and 	clicks on a Submit button.</li>
<li>The password is hashed and 	verified using a process analogous to steps 3 through 8 in the 	account-creation process.</li>
</ol>
<p><strong>Observations</strong></p>
<p>According to this protocol, SecureR&#8217;s server only runs bcrypt when an account is created or when a password is reset.  During log-in attempts, it is the client (Turing&#8217;s browser) and not the server which runs bcrypt.  The server performs a computationally-inexpensive direct comparison between the client-submitted hash and the hash stored in its database.  Thus the server avoids paying the bcrypt bill when processing a log-in request.  (In theory, the client could also avoid calling bcrypt during log-ins.  The bcrypt hash could be stored by the client after generating it during the account-creation phase.  The client wouldn&#8217;t necessarily have to recompute the hash each time the user logs in.  In practice, it&#8217;d be easier to design the client-side code so that it recomputes the bcrypt hash based on the user&#8217;s plaintext password, rather than dealing with hash storage and retrieval.  The bcrypt-induced client-side log-in delay is tolerable to each individual user anyway.)</p>
<p>Relocating bcrypt invocations from a frequent process (account log-in) to other, less frequent processes (account-creation and password-resets) reduces the risk of a successful DoS attack.  It doesn&#8217;t eliminate the risk completely, though.  The account-creation and password-reset processes are the new weak spots, and must be hardened.  This is why the password-reset process is more complex (and mildly annoying to legitimate users) under this protocol.  Additional security methods (such as CAPTCHAs and rate-limiting) could also help harden the system against attack.</p>
<p><strong>A Request for Feedback</strong></p>
<p>My proposed protocol omits certain security-related details which would be important in a production system.  I&#8217;ve also omitted some tweaks which could further improve the protocol&#8217;s security.  However, I&#8217;d first like to make sure that this protocol is essentially sound.  Please let me know if you find any logic errors or problematic side-effects I&#8217;ve failed to account for.  As I said before, I am not a computer-security professional, and would appreciate assistance from others who are further along.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.hashcollisions.com/2011/06/can-bcrypts-computational-expense-be-reduced-on-the-server-side/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">22</post-id>	</item>
	</channel>
</rss>
