<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>authentication &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/authentication/</link>
	<description>Feed of posts on WordPress.com tagged "authentication"</description>
	<pubDate>Sun, 29 Nov 2009 07:06:03 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Layanan Keamanan]]></title>
<link>http://bluewarrior.wordpress.com/2009/11/28/layanan-keamanan/</link>
<pubDate>Sat, 28 Nov 2009 04:10:13 +0000</pubDate>
<dc:creator>bluewarrior</dc:creator>
<guid>http://bluewarrior.wordpress.com/2009/11/28/layanan-keamanan/</guid>
<description><![CDATA[Keamanan adalah suatu yang sangat penting untuk menjaga agar suatu data dalam jariangan tidak mudah ]]></description>
<content:encoded><![CDATA[Keamanan adalah suatu yang sangat penting untuk menjaga agar suatu data dalam jariangan tidak mudah ]]></content:encoded>
</item>
<item>
<title><![CDATA[.NET RIA Services Validation and Authentication Talk (Code)]]></title>
<link>http://blog.webjak.net/2009/11/26/net-ria-services-validation-and-authentication-talk-code/</link>
<pubDate>Thu, 26 Nov 2009 03:33:14 +0000</pubDate>
<dc:creator>Jordan</dc:creator>
<guid>http://blog.webjak.net/2009/11/26/net-ria-services-validation-and-authentication-talk-code/</guid>
<description><![CDATA[Last month I did a presentation at SDDN in Melbourne on RIA Services and it&#8217;s in built authent]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Last month I did a presentation at SDDN in Melbourne on RIA Services and it&#8217;s in built authentication and validation features. </p>
<p>The code is posted here:</p>
<h2><span style="color:#ff0000;">&#60;Sample Code&#62;</span></h2>
<p><a href="http://www.webjak.net/files/FileDetail.aspx?fileId=c67fe8e9-4461-429a-a3a2-3ebd40539bc8" title="Get the sample code">.NET Ria Services Authentication and Validation Demo Code</a><br />
<h2><span style="color:#ff0000;">&#60;/Sample Code&#62;</span></h2>
<p>The talk started off by running through the UserDTO object &#8211; under Services/DomainObjects. This object is exposed through the UserRegistrationService under /Services. </p>
<p>Next you&#8217;ll want to familiarise with the LoginManager in the Silverlight project (under Model/LoginManager.cs). </p>
<p>I then added some custom validation to the UserDTO object. </p>
<p>Next I created a UserValitator.shared.cs file under Services/DomainObjects and applied a metadata attribute to UserDTO to connect the two. .shared.cs files will be automatically made available to Silverlight by RIA Services. </p>
<p>The login stuff is built using the standard ASP.NET membership SQL provider, and the built in RIA Services abilities around this. </p>
<p>Read through LoginManager.cs see how the forms authentication object is created, and how the system uses the AuthenciationDomainContext, which is created on the sever in Services/DomainObjects. AuthenticationDomainService on the server contains the goods to validate a user and also provides a User class, which you can extend. </p>
<p>There is also a UserRegistration context in LoginManager which allows you to create a new user. See UserRegistrationService.cs on the server (under Services/DomainObjects) to see how this works (by using the MembershipHelper class). </p>
<p>See the Web.config to note how the system is configured to use the SQL connection, and in the membership section note that it is configured to use this same SQL connection.<br />
You&#8217;ll need to configure your SQL database as well &#8211; to create the ASP.NET membership tables&#8230; run aspnet_regsql.exe (in C:\Windows\Microsoft.NET\Framework\v2.0.50727) from an elevated prompt to start the wizard. </p>
<p>This should be enough to get you started. </p>
<p>BTW, there is some great doco on this in the .NET RIA Services PDF file&#8230;</p>
<p>Enjoy!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Bureaucrats with Badges]]></title>
<link>http://blog.trustbearer.com/2009/11/24/bureaucrats-with-badges/</link>
<pubDate>Tue, 24 Nov 2009 15:09:28 +0000</pubDate>
<dc:creator>stevepepple</dc:creator>
<guid>http://blog.trustbearer.com/2009/11/24/bureaucrats-with-badges/</guid>
<description><![CDATA[There was a peculiar piece in the American Spectator online last week, a &#8220;Special Report]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://openidtrustbearer.wordpress.com/files/2009/11/authorized-personnel1.jpg"><img class="alignnone size-full wp-image-263" title="authorized-personnel" src="http://openidtrustbearer.wordpress.com/files/2009/11/authorized-personnel1.jpg" alt="" width="450" height="181" /></a></p>
<p>There was a peculiar piece in the American Spectator online last week, <a href="http://spectator.org/archives/2009/11/20/bureaucrats-with-badges">a &#8220;Special Report&#8221; by Mark Hyman</a>. The author lists a number of unfortunate circumstances by which harmless passengers, many times military personnel, have been delayed or hassled by TSA and airport security protocols. He blames these anecdotal mishaps on &#8220;government bureaucrats armed with &#8216;rules, policies and procedures&#8217; and employing no commonsense.&#8221;</p>
<p>He goes on to question a number of security and procedural policies in government and military institutions, which he thinks are unnecessary and demeaning to the personnel at these institutions. As a primary example, Hyman makes the case that the rules for issuing and renewing CACs (Common Access Cards) are unneeded and absurd.</p>
<p>He is miffed because he did not renew his CAC before it expired and he had to go though a bureaucratic process to straighten this out:</p>
<blockquote><p>&#8220;My CAC had expired days earlier so I contacted an issuing office to get a replacement. A clerk in the ID card office informed me that all appointments had to be made online using the intranet. Yet, my expired CAC prevented me from using the intranet system. In spite of my predicament the clerk told me, &#8220;Our policy requires all appointments to be scheduled online. If you are unable to use the intranet, then there is nothing more I can do.&#8221; It sounded like the beginning of an Abbott and Costello routine.&#8221;</p></blockquote>
<blockquote><p>&#8220;Rather than fight this particular battle, I decided to renew my CAC at another issuing office. While there, I was asked to produce a picture ID. I showed my state driver&#8217;s license. I was then asked for a second form of ID and was told the CAC was not acceptable since it expired five days earlier. A week earlier it would have been valid, but on this day it was deemed worthless. So I showed the clerk my company-issued ID card that looked as though it was made on an office computer and laminated at the local Kinko&#8217;s. As a matter of fact, that was exactly how that ID was manufactured. But it was good enough. The clerk accepted the flimsy company ID over the just-expired military CAC.&#8221;</p></blockquote>
<p>Hyman concludes,</p>
<blockquote><p>&#8220;What makes this episode even sadder is that the military CAC is generally not accepted as a valid form of identification for use by visitors to the Pentagon. Visitors must also have a Pentagon-issued ID or another form of identification such as a state driver&#8217;s license. The reason, according to a security officer, is that at least one machine that manufactures CACs and several hundred blank CACs are missing and presumed to have been stolen. Security officials do not know which CAC is valid and which is a forgery.&#8221;</p></blockquote>
<p>The latter claim is nonsensical and shows that the security officials Hyman chats with are miss informing him about how his CAC works. This too, expresses a common misconception— that possession of the card is the only thing that verifies identity.</p>
<p>To his point about the pains of standing in line to renew something only to find that you don&#8217;t have the right materials: I can empathize with this, but I cannot gather what rules Hyman thinks are silly, and which are reasonable. Is he arguing that he shouldn&#8217;t have to have a CAC, or that he should be able to use his expired CAC, by itself, for renewal? And what does this have to do with policy created by top-level military and government officials?</p>
<p>What is clear from reading the piece is that he doesn&#8217;t like the rules much because he doesn&#8217;t understand why they are in place. He wanted an exception so he could use his expired CAC. Similarly, in another of his examples, he complains that his wife couldn&#8217;t renew her own CAC using an expired passport.</p>
<p>There are two fundamental questions that would help Hyman better appreciate these rules: Why are identification badges, such as CAC cards, used? And, how is the true identity of a badge-holder verified? In other words, what is a CAC good for anyways?</p>
<p>The military provides several <a href="http://cac.mil/Getting.html">resources for answering these questions</a>. In fact, had Hyman consulted these, or <a href="http://blunoz.blogspot.com/2009/08/pentagon-gouge-cac-cards.html">unofficial resources</a>, anytime before his CAC expired he would have had less of a hassle renewing it.</p>
<p>Identity, and the privileges we associate with it, is an abstract thing that is difficult to verify. The best way for a large institutions to verify a person&#8217;s identity is to gather the various artifacts of identity, such as a state driver&#8217;s license, for this person and grade the validity of these items and the authority of the institution who gave the item.  The bureaucratic pronouncements on this process (i.e. <a href="http://www.dhs.gov/xabout/laws/gc_1217616624097.shtm#1">presidential directives</a> and <a href="http://www.cac.mil/assets/pdfs/DTM%2012-1-2008-08872-08.pdf">policies</a>) say that the best way to verify the identity and authorization of millions of people is to create a system of rules that make the procedures repeatable, reliable, and safe. (One such rule may reason that an expired identity artifact should not be considered valid, even if it was valid yesterday.)</p>
<p>Now, the process of using a CAC card is not as simple as it could be. Systems that use badges for the identification of people and the verification of people&#8217;s permissions and authority are complex and imperfect, but this is not a problem of bureaucracy. It&#8217;s more a matter of improving these systems for most users and reminding users, like Hyman, why they were given a badge to begin with.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Windows 7 and Server 2008 Vulnerability Exposed.]]></title>
<link>http://cn181.wordpress.com/2009/11/21/windows-7-and-server-2008-vulnerability-exposed/</link>
<pubDate>Sat, 21 Nov 2009 19:52:57 +0000</pubDate>
<dc:creator>Phil Fenton</dc:creator>
<guid>http://cn181.wordpress.com/2009/11/21/windows-7-and-server-2008-vulnerability-exposed/</guid>
<description><![CDATA[A new vulnerability in Server 2008 and Windows 7 has been exposed. Read and prepare to discuss in cl]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>A new vulnerability in Server 2008 and Windows 7 has been exposed. Read and prepare to discuss in class. <a href="http://bit.ly/1pbn2O">http://bit.ly/1pbn2O</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Secondary DNS Entry When Using Windows Authentication]]></title>
<link>http://sqlosophy.wordpress.com/2009/11/19/secondary-dns-entry-when-using-windows-authentication/</link>
<pubDate>Thu, 19 Nov 2009 13:48:36 +0000</pubDate>
<dc:creator>CS</dc:creator>
<guid>http://sqlosophy.wordpress.com/2009/11/19/secondary-dns-entry-when-using-windows-authentication/</guid>
<description><![CDATA[Late last night I received a SCOM alert indicating that a production database server was unavailable]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Late last night I received a SCOM alert indicating that a production database server was unavailable. Like any dedicated DBA I quickly remoted into my work computer and attempted to connect to the instance using SSMS. No dice. &#8220;Login failed. This user is not associated with a trusted connection&#8221; or something like that. I also noticed that Outlook was prompting me for credentials since I left it running at the end of that work day.</p>
<p>I figured there was some sort of network blip that caused the Outlook authentication prompt and was also somehow responsible for the inability to connect to the instance using SSMS. I tried to remote desktop to the database server and noticed a serious delay as it tried to process my credentials. And yes, I was incredibly relieved at this point since the database server was at least up and running.</p>
<p>While waiting for the desktop to appear I started poking around the network and noticed that one of our many DNS servers was unavailable. Our standard practice is to have a backup DNS entry on all servers and workstations. Somehow this guy slipped through the cracks because when I finally got to the desktop and was able to view the network settings, I saw that the only DNS entry on the main network card for this server was, of course, the DNS server that crashed.</p>
<p>Why am I talking about DNS issues on a SQL blog? Besides the fact that it&#8217;s good to be well-rounded when it comes to troubleshooting, I learned something last night. Well, maybe I already knew it but never thought about it until this issue arose. During this mini outage I checked the primary application that talks to that instance and it was running smoothly. No funky errors about not being able to connect to the database. No timeouts. It just worked. It turns out that the application uses SQL authentication rather than Windows authentication to connect to the database. For this reason, the application connectivity was unaffected by the DNS server going down.</p>
<p>I verified this by trying to connect to the instance, via SSMS, using SQL authentication. In there like swimwear. So I guess the lesson to be had here is if you rely solely on Windows authentication for your applications to connect to your SQL database, make sure you have A. a backup DNS server and B. an entry for it in your DNS settings on the database server.</p>
<p>Hope this helps someone.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[http://blog.plataformatec.com.br/2009/11...]]></title>
<link>http://bstonwebdev.wordpress.com/2009/11/17/httpblog-plataformatec-com-br200911-2/</link>
<pubDate>Tue, 17 Nov 2009 19:34:48 +0000</pubDate>
<dc:creator>BillSaysThis</dc:creator>
<guid>http://bstonwebdev.wordpress.com/2009/11/17/httpblog-plataformatec-com-br200911-2/</guid>
<description><![CDATA[http://blog.plataformatec.com.br/2009/11/understanding-devise-roles/ &#8211; Understanding Devise ro]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>http://blog.plataformatec.com.br/2009/11/understanding-devise-roles/<br />
&#8211; Understanding Devise roles</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[SSL 3.0 / TLS subjected to Man in the Middle Attack]]></title>
<link>http://cryptoblog.wordpress.com/2009/11/16/ssl-3-0-tls-subjected-to-man-in-the-middle-attack/</link>
<pubDate>Mon, 16 Nov 2009 00:49:13 +0000</pubDate>
<dc:creator>Mario</dc:creator>
<guid>http://cryptoblog.wordpress.com/2009/11/16/ssl-3-0-tls-subjected-to-man-in-the-middle-attack/</guid>
<description><![CDATA[An “Authentication Gap” was discovered in the latest version of SSL/TLS protocol.This could potentia]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>An “<a title="Renegotiating_TLS.pdf" href="http://extendedsubset.com/Renegotiating_TLS.pdf" target="_blank">Authentication Gap</a>” was discovered in the latest version of <a title="RFC 5246" href="http://tools.ietf.org/html/rfc5246" target="_blank">SSL/TLS protocol</a>.This could potentially be a huge problem. The gap is not due to some erroneous implementation, it is a property of the protocol.</p>
<p>Here is a list of links to websites where the issue is being followed:</p>
<p><a title="http://www.phonefactor.com/sslgap/" href="http://www.phonefactor.com/sslgap/">http://www.phonefactor.com/sslgap/</a></p>
<p><a title="http://www.ietf.org/mail-archive/web/tls/current/msg03963.html" href="http://www.ietf.org/mail-archive/web/tls/current/msg03963.html">IETF resources</a></p>
<p><a title="http://kbase.redhat.com/faq/docs/DOC-20491" href="http://kbase.redhat.com/faq/docs/DOC-20491">Red Hat</a></p>
<p><a title="http://isc.sans.org/diary.html?storyid=7534" href="http://isc.sans.org/diary.html?storyid=7534">SANS.org</a></p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:2d60f375-2cce-4a72-8300-616384afacc4" class="wlWriterEditableSmartContent">del.icio.us Tags: <a href="http://del.icio.us/mario4/ssl" rel="tag">ssl</a>,<a href="http://del.icio.us/mario4/authentication" rel="tag">authentication</a>,<a href="http://del.icio.us/mario4/insecurity" rel="tag">insecurity</a>,<a href="http://del.icio.us/mario4/security" rel="tag">security</a>,<a href="http://del.icio.us/mario4/e-commerce" rel="tag">e-commerce</a>,<a href="http://del.icio.us/mario4/networks" rel="tag">networks</a>,<a href="http://del.icio.us/mario4/hacking" rel="tag">hacking</a>,<a href="http://del.icio.us/mario4/tls" rel="tag">tls</a></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Problem with the SCOM Agent authentication against the SCOM Management Server]]></title>
<link>http://gefufna.wordpress.com/2009/11/13/problem-with-the-scom-agent-authentication-against-the-scom-management-server/</link>
<pubDate>Fri, 13 Nov 2009 10:44:25 +0000</pubDate>
<dc:creator>gefufna</dc:creator>
<guid>http://gefufna.wordpress.com/2009/11/13/problem-with-the-scom-agent-authentication-against-the-scom-management-server/</guid>
<description><![CDATA[Problem description You have successfully installed SCOM Agent manually on managed computer. However]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>Problem description</strong></p>
<p>You have successfully installed SCOM Agent manually on managed computer. However, managed computer doesn’t appear in the <strong><em>Agent Managed</em></strong> or <strong><em>Pending Management</em></strong> list in the Operations Console.</p>
<p>The following event is logged in the Operations Manager event log on Agent-managed computer:</p>
<p><strong>Event Type:</strong>            Error</p>
<p><strong>Event Source:</strong>         OpsMgr Connector</p>
<p><strong>Event Category:</strong>     None</p>
<p><strong>Event ID:</strong> 20057</p>
<p><strong>Description:</strong> Failed to initialize security context for target MSOMHSvc/&#60;<em>SCOM Management Server Name</em>&#62; The error returned is <strong><span style="color:#ff0000;">0&#215;80090311(No authority could be contacted for authentication.)</span></strong>.  This error can apply to either the Kerberos or the SChannel package.</p>
<p><em> </em></p>
<p><strong>How to confirm the problem?</strong></p>
<p>To troubleshoot the issue, <strong><em>Microsoft Network Monitor</em></strong> can be used:</p>
<ul>
<li>Stop <strong><em>HealthService</em></strong> on managed computer to stop the SCOM Agent (open the <strong>Command Prompt </strong>and type the <strong><em>net stop HealthService</em></strong>).</li>
<li>Start <strong>Microsoft Network Monitor.</strong></li>
<li>Click on the <strong><em>New capture tab.</em></strong></li>
<li>In the Capture Filter, enter the following filter:</li>
</ul>
<address><em>KerberosV5</em></address>
<address><em>OR KerberosV5_Struct</em></address>
<address><em>OR NLMP</em></address>
<address><em>OR NLMP_Struct</em></address>
<address><em>OR GssAPI</em></address>
<address><em>OR SpnegoNegotiationToken</em></address>
<address><em>OR GssapiKrb5</em></address>
<address><em>OR LDAP</em></address>
<ul>
<li>Click on the <strong><em>Apply</em></strong> button to apply the Capture Filter.</li>
<li>Click on the <strong><em>Start</em></strong> button to start the new capture.</li>
<li>Now, quickly start the <strong><em>HealthService</em></strong> to start the SCOM Agent (<strong><em>net start HealthService</em></strong>).</li>
<li>Wait (usually 10-15 seconds) until event <strong>20057</strong> appears in the Operations Manager event log on the affected computer.</li>
<li>In Network Monitor, click on the <strong><em>Stop</em></strong> button to stop the capture.</li>
<li>Now carefully revise capture frames in the Frame Summary window. You should see <strong><em>KerberosV5</em></strong> and <strong><em>LDAP</em></strong> protocol traffic against the Active Directory Domain Controllers.</li>
</ul>
<p><strong>NOTE:</strong> Above applies in case that you are not using certificate-based authentication.</p>
<p>To resolve this issue, make sure that <strong>TCP/UDP 88 port (Kerberos)</strong> and <strong>TCP/UDP 389 port (LDAP)</strong> is open against the Domain Controllers in your Active Directory environment.</p>
<p>These ports are not documented in the TechNet’s article <strong><em>Using a Firewall with Operations Manager 2007</em></strong>.</p>
<p><strong>What happens under the hub? </strong></p>
<p>When SCOM Agent &#60;-&#62; Management Server communication starts, authentication takes place (Kerberos). If you have multi-domain environment, things are bit more complicated. Before the authentication protocols can follow the forest/domain trust path, the service principal name (SPN) of the SCOM Management Server must be resolved (LDAP).</p>
<p>When a managed computer (SCOM Agent) in one domain attempts to access resource computer (SCOM Management Server) in another domain, it contacts the domain controller for a service ticket to the SPN of the resource computer. Once the domain controller queries the global catalog and identifies that the SPN is not in the same domain as the domain controller, the domain controller sends a referral for its parent domain back to the workstation. At that point, the workstation queries the parent domain for the service ticket and follows the referral chain until it gets to the domain where the resource is located.</p>
<p>If you have SCOM Management Server in child domain A of the Active Directory Forest infrastructure and the SCOM Agent in child domain B, make sure that SCOM Agent is able to access all DC’s in the referral chain which are required to get to the domain where SCOM Management Server is located.</p>
<p>For more information about the ports required for the System Center Operations Manager, and the authentication in Operations Manager, refer to the following TechNet articles:</p>
<p><strong><em>Authentication and Data Encryption for Windows Computers in Operations Manager 2007</em></strong>, available at the: <a href="http://technet.microsoft.com/en-us/library/bb735408.aspx">http://technet.microsoft.com/en-us/library/bb735408.aspx</a></p>
<p><strong><em>Using a Firewall with Operations Manager 2007</em></strong>, available at the: <a href="http://technet.microsoft.com/en-us/library/cc540431.aspx">http://technet.microsoft.com/en-us/library/cc540431.aspx</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Don’t Ignore the “Paranoid” Security Guy, Part 2]]></title>
<link>http://axway.wordpress.com/2009/11/12/don%e2%80%99t-ignore-the-%e2%80%9cparanoid%e2%80%9d-security-guy-part-2/</link>
<pubDate>Thu, 12 Nov 2009 20:55:09 +0000</pubDate>
<dc:creator>axway</dc:creator>
<guid>http://axway.wordpress.com/2009/11/12/don%e2%80%99t-ignore-the-%e2%80%9cparanoid%e2%80%9d-security-guy-part-2/</guid>
<description><![CDATA[by Taher Elgamal Chief Security Officer Axway (To read Part 1, click here.) This is going to continu]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><span style="color:#ffffff;">by Taher Elgamal<br />
Chief Security Officer<br />
Axway</span></p>
<p><span style="color:#ffffff;">(To read Part 1, click <a title="Part 1" href="http://ow.ly/Btef">here</a>.)</span></p>
<p><span style="color:#ffffff;">This is going to continue to be an arms race for a long  time.</span></p>
<p><span style="color:#ffffff;">I don’t think society will actually change. People in  important positions don’t even listen to financial experts, let alone IT  security experts. And I’m willing to bet money that there is another financial  problem that somebody has warned us about, and that nobody is paying attention  to, because of the cost. People are hesitant to take action with anything that  involves cost. I’m not saying you should spend money on a whim. But there are  certainly a collection of experts in every single one of these technical fields  that can make a judgment call as to how much risk a system is willing to take  and when we must draw the line. And right now, we’re drawing the line so far out  that a lot of criminals can gain a great deal of unauthorized access, and the  level of fraud online carried out today is indicative of this.</span></p>
<p><span style="color:#ffffff;">The real issue is a fundamental lack of imagination on  the part of the decision makers and CEOs. “Why am I going to spend all this  money?” the CEO asks. The CEO waits until a regulation comes up. When the  government actually speaks up and sticks a regulation to a certain type of  company for something, the CEO puts forth the effort to get there. The problem  with mere regulation—and this is how the entire system works—is that it doesn’t  solve the real problem. It just makes people compliant. It does not make sure  that the wrong people don’t gain unauthorized access, it just makes sure that  the right people are acting just a little bit more safely. It’s true, I’ll  admit, it <em>is</em> a little bit better  to be compliant with all these regulations. But it <em>does not</em> address the real  issue.</span></p>
<p><span style="color:#ffffff;">Finally, consider this:</span></p>
<p><span style="color:#ffffff;">If the concern over cyber issues is now an integral part  of business, if it’s no longer a back office thing, if it’s now front and  center, in the middle of everything, then cybersecurity people should be  involved in the decision-making process, not just dismissed as back-office  techies. That implies more training for the cybersecurity people to both be able  to evaluate risk <em>and</em> to  understand the particular business needs that the enterprise faces. Are you  ready for that?</span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Don’t Ignore the "Paranoid" Security Guy, Part 1]]></title>
<link>http://axway.wordpress.com/2009/11/11/don%e2%80%99t-ignore-the-paranoid-security-guy-part-1/</link>
<pubDate>Wed, 11 Nov 2009 22:00:44 +0000</pubDate>
<dc:creator>axway</dc:creator>
<guid>http://axway.wordpress.com/2009/11/11/don%e2%80%99t-ignore-the-paranoid-security-guy-part-1/</guid>
<description><![CDATA[by Taher Elgamal Chief Security Officer Axway Michael Fitzgerald’s excellent piece for CSOOnline.com]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><span style="color:#ffffff;">by Taher Elgamal<br />
Chief Security Officer<br />
Axway</span></p>
<p><span style="color:#ffffff;">Michael Fitzgerald’s <a href="http://www.csoonline.com/article/503308/Organized_Cybercrime_Revealed">excellent piece for CSOOnline.com, “Organized Cybercrime Revealed,”</a> continues to be pointed to on Twitter more than a month after its publication.</span></p>
<p><span style="color:#ffffff;">And rightly so. It’s a nice article, full of excellent details and compelling information.</span></p>
<p><span style="color:#ffffff;">But the thing that puzzles me always about an article like this is why it discusses, as news, something that is completely expected. If you put money in front of a criminal, what do you think they’re going to do with it? We’ve continued to blame criminals for criminal acts, which makes no sense: it’s what they do! When society provides opportunities for criminals to act like criminals, it’s society who is truly at fault.</span></p>
<p><span style="color:#ffffff;">If you would’ve asked anyone in the security/technical community—any reasonable CSO—at any time in the last fifteen years, “How will the profile of a hacker shift in the future?”, they would’ve told you that the smart hacker who wants to be famous by writing cute little viruses will be replaced by an actual criminal committing an actual crime, because things online aren’t secured very well. Sure, we have some controls and technologies deployed, but there has not been enough support to deploy even simple authentication technologies, and the absence of these technologies gives modern hackers gumption. The entire Web runs on passwords, and these passwords are very easy to guess. And that this is still the paradigm reflects a fundamental ignorance on the part of business people and governments. People who implement systems and run corporations—they don’t want to listen to security guys because security guys are, in their opinion, flat-out paranoid. Why would you want to listen to a paranoid guy tell you that there is a possibility that at some point in the future something bad will happen? But despite the fact that so many bad things are happening, and this “just ignore the paranoid security guy” attitude led to these bad things, we still think this way.</span></p>
<p><span style="color:#ffffff;">In the second part of this blog entry, I’ll speculate on where this is all going.</span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Do I Know You? Identity Authentication in the Real and Digital Worlds]]></title>
<link>http://nettingitout.com/2009/11/11/do-i-know-you-identity-authentication-in-the-real-and-digital-worlds/</link>
<pubDate>Wed, 11 Nov 2009 18:41:52 +0000</pubDate>
<dc:creator>Robert Eastman</dc:creator>
<guid>http://nettingitout.com/2009/11/11/do-i-know-you-identity-authentication-in-the-real-and-digital-worlds/</guid>
<description><![CDATA[I had occasion recently to sit down to talk with Reliable Identities&#8216; Wes Kussmaul, accomplish]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I had occasion recently to sit down to talk with <strong><a title="Reliable Identities" href="http://www.reliableid.com/about-us/" target="_blank">Reliable Identities</a>&#8216; </strong> <a title="Wes Kussmaul" href="http://www.reliableid.com/about-us/" target="_blank">Wes Kussmaul</a>, accomplished entrepreneur, author, and prolific Internet tinkerer.  Wes experienced early success founding the <strong>Delphi</strong> Internet service.  (Some of the more seasoned among you may remember Delphi as being one of the early online services, along with <a title="CompuServe" href="http://webcenters.netscape.compuserve.com/menu/" target="_blank"><strong>CompuServe</strong></a>, <strong>Prodigy</strong>,  and <a title="AOL LLC" href="http://www.aol.com/" target="_blank"><strong>AOL</strong></a>.)</p>
<p>These days, Wes is talking about another frontier &#8211; identity authentication.  It is interesting to think that we are as inattentive to establishing and authenticating everyone &#8217;s digital identity as we are focused on proving and authenticating people&#8217;s identities in the real world.</p>
<p>Think about this.  Think of the number of real-world transactions you engage in during the course of each day, each week, each year, and how many times you are asked to provide proof of your identity using your birth certificate, driver&#8217;s license, social security number, or passport. Each of these pieces of documentation is based on one or another form of face-to-face authentication.  In this way, isn&#8217;t nearly every significant real-world interaction based upon some form of face-to-face authentication?</p>
<p>To operate a motor vehicle you need both a driver&#8217;s license (which includes a face-to-face authentication) and an automobile registration (and, often, insurance, as well).  To operate on the Internet, you need only a username and password, and the nearest internet cafe.</p>
<p>The &#8220;wild, wild west&#8221; metaphor may be over-used, but it remains relevant, and many times we never really know with whom we are interacting.  Yes, our access credentials get authenticated every time we log onto a specific website, and <a title="OpenID" href="http://openid.net/" target="_blank">OpenID</a> is making this easier for us every day.  However, who are we really interacting with on the internet, and how do we know who we are interacting with?  In the worst case scenarios, there have obviously been too many well-publicized stories of people taking advantage of the veil of secrecy and deception afforded them by the Internet to tragic ends.</p>
<p>Wes Kussmaul has given no little thought to the lack of identity authentication in the digital world, proposing his ideas &#8211; among other places &#8211; to the <a title="International Telecommunications Union" href="http://www.itu.int/en/pages/default.aspx" target="_blank"><strong>International Telecommunications Union</strong></a>, and in at least a couple of books, the most notable of which is <a title="Quite Enjoyment, by Wes Kussmaul" href="http://www.abyx.com/quenexed.html" target="_blank"><em>Quiet Enjoyment</em></a>.  (Wes and <a title="PKI Press" href="http://www.pkipress.com/index.html" target="_blank"><strong>PKI Press</strong></a> have provided copies of <em>Quiet Enjoyment</em> and another Wes Kussmaul book, <a title="Own Your Privacy, by Wes Kussmaul" href="http://www.abyx.com/own-your-privacy.html" target="_blank"><em>Own Your Privacy</em></a> to me.)</p>
<p><a href="http://nettingitout.wordpress.com/files/2009/11/quiet-enjoyment-book-from-pki-press-28445119213072_1953_4613360.gif"><img class="alignnone size-thumbnail wp-image-396" title="Quiet Enjoyment book from PKI press-28445119213072_1953_4613360" src="http://nettingitout.wordpress.com/files/2009/11/quiet-enjoyment-book-from-pki-press-28445119213072_1953_4613360.gif?w=115" alt="Quiet Enjoyment (PKI Press, 2004)" width="115" height="150" /></a></p>
<p>One of Wes&#8217; more compelling ideas for me is around the concept of identity quality.  It is possible, Wes believes, to construct quantitative ways to measure the quality of an identity authentication.</p>
<p>Conceivably, then, this provides a range of identity authenticity which could then be applied to the type and  level of access that a person wanted.  Just as we have seen differentiated levels of service at the airport provided to people who choose to pay for to have their identities authenticated, there could possibly be differentiated levels of access to websites on the Internet based on the quality of an identity authentication.  So, for example, perhaps not everyone gets equal access to a teen chat site where there is the danger of someone impersonating a teenager for malicious purposes.</p>
<p>Some aspects of these ideas are likely to be more challenging, in practice if not in acceptance.  The idea seems to be that people would be issued a certificate of authenticity, attesting to the authenticity of your identity, much as a notary public attests to the authentic correspondence between your identity and your written signature today.  There are, however, qualitative differences between the kind of identity authentication that Wes seems to be proposing and the function of notary public, which raises some questions about scalability, privacy, and the balance between security and convenience.</p>
<p>On the issue of anonymity, Wes is quick to point out that identity authentication and anonymity are not mutually exclusive, and that the intent of identity authentication is not to render anonymity obsolete.</p>
<p>There are, I find, at least a couple of difficulties in this discussion:</p>
<ol>
<li>Inevitably, the discussion gets down to a technical level that some may find challenging &#8211; two-factor vs. three-factor vs. x-factor level authentication; Private/Public key infrastructures, and things like SAML; and</li>
<li>Definitions (trust, authenticity, access, authorization&#8230;): these are words that (a) have both real-world and digital-world meanings, and (b) in either world, have widely varying usage and meaning according to the context.</li>
<li>The question about identity authentication too often gets buried or lost, it seems to me, under the weight of focus given to identity theft, a related, but separate issue, and authorization and access &#8211; how identity is applied at the application layer.</li>
</ol>
<p>The type of identity authentication that Wes is talking about, however, is not system- or application-level access authorization, and so is separate and distinct from the sort of credentials authentication that is embodied most often in what is called identity access and management (IAM) solutions.</p>
<p>Quiet Enjoyment is not a book for the timid &#8211; its table of contents runs 10 pages.  But it will make you think more deeply about trust, identity, identity authenticity, and many of the issues involved with how we trust the identity in the digital world.  Wes seems to argue that we are at, or nearing, an inflection point, and I am not so sure that he is wrong about that.  Former Secretary of Homeland Security Michael Chertoff was quite compelling, I thought, when he spoke &#8211; on more than one occasion, I believe &#8211; about identity being a critical asset, and becoming even more so with every passing day.  Wes Kussmaul&#8217;s ideas and efforts to address the issue are worthy of greater discussion.</p>
<p><strong>Recommended Reads</strong>:</p>
<ul>
<li><a title="Quiet Enjoyment, on Amazon.com" href="http://www.amazon.com/Quiet-Enjoyment-Security-Privacy-Networks/dp/1931248125/" target="_blank">Wes Kussmaul, <em>Quiet Enjoyment</em></a>. Waltham, Massachusetts: PKI Press. 2004.<br />
Available on Amazon.com, or from PKI Press.</li>
<li>Mark Dixon, &#8220;<a title="Identity Assurance" href="http://blogs.sun.com/identity/entry/identity_trend_4_identity_assurance" target="_blank">Identity Trend 4: Identity Assurance</a>&#8220;, discovering identity blog, October 6, 2009.</li>
<li>Bruce Schneier, &#8221; <a title="WSJ: Why Technology Won't Prevent Identity Theft" href="http://online.wsj.com/article/SB123125633551557469.html" target="_blank">Why Technology Won&#8217;t Prevent Identity Theft</a>&#8220;, Wall Street Journal, January 13, 2009</li>
<li>Guy Huntington, &#8220;<a title="Identity verification" href="http://www.authenticationworld.com/blog/2009/07/identity_verification.html" target="_blank">Identity Verification</a>&#8220;, AuthenticationWorld Blog, July 21, 2009</li>
<li>Bruce Schneier, &#8220;<a title="Wired: Why Do We Accept Signatures by Fax?" href="http://www.wired.com/politics/security/commentary/securitymatters/2008/05/securitymatters_0529?currentPage=1" target="_blank">Why Do We Accept Signatures by Fax?</a>&#8220;, Wired Magazine, May 29, 2008</li>
<li>Bruce Schneier, &#8220;<a title="Real-ID: Costs and Benefits" href="http://www.schneier.com/essay-160.html" target="_blank">Real-ID: Costs and Benefits</a>&#8220;, http://www.schneier.com/, March/April 2007</li>
<li>Bob Blakley, &#8220;<a title="The Limited Liability Persona" href="http://identityblog.burtongroup.com/bgidps/2006/11/the_limited_lia.html" target="_blank">The Limited Liability Persona</a>&#8220;, Identity and Privacy Blog, November 17, 2006</li>
</ul>
<p><a href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fnettingitout.com%2F2009%2F11%2F11%2Fdo-i-know-you-identity-authentication-in-the-real-and-digital-worlds%2F&#38;linkname=Do%20I%20Know%20You%3F%20Identity%20Authentication%20in%20the%20Real%20and%20Digital%20Worlds"><img src="http://static.addtoany.com/buttons/share_save_256_24.png" alt="Share" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[ phpMyAdmin login prompt ]]></title>
<link>http://tarikhs.wordpress.com/2009/11/11/phpmyadmin-login-prompt/</link>
<pubDate>Wed, 11 Nov 2009 13:24:49 +0000</pubDate>
<dc:creator>Tariq Hussain Soomro</dc:creator>
<guid>http://tarikhs.wordpress.com/2009/11/11/phpmyadmin-login-prompt/</guid>
<description><![CDATA[Asalam-o-alikum It is obvious when ever we install xampp or wamp they just install mysql as a config]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Asalam-o-alikum</p>
<p>It is obvious when ever we install xampp or wamp they just install mysql as a config authentication.  Which is somehow a security threat while your server is exposed to internet.</p>
<p>To override these settings of phpmyadmin in xampp follow these steps.</p>
<ol>
<li> Find the privileges link on the home page of your localhost phpmyadmin.</li>
<li> Change the password for the root user by changing the privileges of the root user.</li>
<li>Now find the following file x:\\xampp\phpmyadmin.config.inc.php</li>
<li>In config.inc.php find following variable  <strong>$cfg['Servers'][$i]['auth_type'] = &#8216;config&#8217;;</strong></li>
<li>Change the config to cookie.</li>
<li>now find <strong>$cfg['blowfish_secret'] = &#8216;xampp&#8217;;</strong></li>
<li>and fill in/ change a blowfish secret what ever you like as the cookie will save by this name.</li>
<li>don&#8217;t forget to clear the user name and password variable in config.ini.php</li>
</ol>
<div id="_mcePaste" style="text-align:center;"><strong>$cfg['Servers'][$i]['user'] = &#8221;;</strong></div>
<div id="_mcePaste" style="text-align:center;"><strong>$cfg['Servers'][$i]['password'] = &#8221;;</strong></div>
<p>&#160;</p>
<p>This is it now just login to xampp it will prompt you to enter password.</p>
<p>&#160;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[SmartPhone Unlock Screens: Moving in the Wrong Direction]]></title>
<link>http://dtrammell.wordpress.com/2009/11/10/smartphone-unlock-screens-moving-in-the-wrong-direction/</link>
<pubDate>Tue, 10 Nov 2009 22:25:48 +0000</pubDate>
<dc:creator>Dustin D. Trammell</dc:creator>
<guid>http://dtrammell.wordpress.com/2009/11/10/smartphone-unlock-screens-moving-in-the-wrong-direction/</guid>
<description><![CDATA[I recently purchased the Motorola Droid from Verizon, and am so far very happy with it.  Other than ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I recently purchased the <a title="Motorola Droid from Verizon" href="http://phones.verizonwireless.com/motorola/droid/" target="_blank">Motorola Droid from Verizon</a>, and am so far very happy with it.  Other than finding the physical keyboard a bit lacking from being extremely spoiled by the Sidekick&#8217;s physical keyboard to which no other physical keyboard could ever hope to live up to, I&#8217;ve really had no complaints with the device or the Android 2.0 operating system that runs on it.  I have however, noticed that touch-screen smart-phone unlock screens (not just the Droid&#8217;s) are getting progressively less secure.</p>
<p><!--more-->The problem with smart-phones with touch screens is that they suffer from a similar attack that physical keypad entry systems do; there is a physical remnant that can indicate the digits used in the entry code.  Physical keypads can have their keys worn down over time, so that if a common code is used, it is eventually apparent which keys are more used than others.  Smart-phones with touch screens suffer from a less permanent version of this, being skin oil left on the screen in the form of fingerprints.</p>
<p>A colleague here at work has an iPhone.  His unlock screen uses a number pad, and you enter in a PIN number to unlock it.  As you touch the screen to enter the PIN, your fingers will leave fingerprints on the digits that are contained in the PIN.  Because the digit button locations are static, even with other use of the touch-screen, over time you end up with little clusters of fingerprints on the screen indicating the digits used, which drastically shorten the search time of a brute force attack on the PIN if the user isn&#8217;t diligent about wiping down the touch screen periodically.</p>
<p>A friend of mine also has an iPhone, however she uses a different screen locking app, which instead of digits just presents the user with a grid of buttons, and the key to unlocking is to press these buttons in a specific pattern.  This is slightly less secure than the PIN method, as there are no values to the buttons, only their location, which essentially requires that the locations pressed on the screen remain static.  The PIN method could be made more secure in a number of ways, however this method cannot.</p>
<p>The default screen locking method for the Droid is even <em>less</em> secure, as instead of pressing a pattern, it has the same grid of buttons as the last method I described, but has you draw a pattern across the screen linking the buttons in a sequence.  Where before you only divulged the digits contained in the PIN or sequence pattern via individual fingerprints, in this case you leave a nice long smear of skin oil across your screen, not only indicating the button locations used in the sequence, but their order.  At this point you really only have two options to try in your brute force, the sequence starting from one end of the smear or the other.  Guess how long it takes to get that one correct.</p>
<p>Needless to say, I tend to wipe my phone&#8217;s touch-screen quite frequently.  Why hasn&#8217;t anyone implemented a lock screen that uses <a title="Metroid Security Mechanism" href="http://dtrammell.wordpress.com/2007/11/16/metroid-security-mechanism/">a technique like this one</a>?</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[OAuth is coming]]></title>
<link>http://identitynetworks.wordpress.com/2009/11/10/oauth-is-coming/</link>
<pubDate>Tue, 10 Nov 2009 14:09:48 +0000</pubDate>
<dc:creator>identitynetworks</dc:creator>
<guid>http://identitynetworks.wordpress.com/2009/11/10/oauth-is-coming/</guid>
<description><![CDATA[and we like it! OAuth is an open protocol to allow secure API authorization in a simple and standard]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>and we like it!</p>
<p><a href="http://oauth.net/" target="_blank">OAuth</a> is an <strong>open protocol</strong> to allow <strong>secure API authorization </strong> in a <strong>simple</strong> and <strong>standard</strong> method from desktop and web applications, as stated on the OAuth web site.</p>
<p>Why do we like OAuth?</p>
<ol>
<li><strong>It is simple</strong>.  Most of the bad security implementations are done by people with good intentions and low skill.  Understanding the issues involved greatly improves the changes of making the right choices.</li>
<li><strong>It solves a real hard problem</strong>: giving access to your stuff without sharing your identity.</li>
<li><strong>Plays well with others</strong>.  OAuth has built in support for desktop applications, mobile devices, set-top boxes, and of course websites.</li>
</ol>
<p>OAuth helps delegating rights to a process acting as you, without losing privacy or compromising security.  And the specification is short and possible to understand.  Replacing shared secrets is a really good idea.  Replacing hardcoded application-based passwords is an even better idea.  Replacing spoofing of user by logging in as root/admin and then emulating the actual user is a great idea.  And all of this may be done by OAuth.</p>
<p>One use case is getting access to your data on your behalf, but on a different site while not giving away your identity from the first site. Another is the TCS eScience Personal Portal (aka Confusa) that will use OAuth to authenticate a command line client tool to a web-based service that issues <span style="text-decoration:line-through;">short-lived </span>certificate. Then they will extend it further using OAuth for web-based delegation of proxy-certificates; collaborating with a Norwegian University.  Some other use cases that people in my neighbourhood has been playing with so far</p>
<ul>
<li><a href="http://rnd.feide.no/content/oauth-attribute-query-protocol">Attribute query protocol</a></li>
<li><a href="http://blogs.mnt.se/?p=22">Certificate enrollment in confusa using OAuth</a></li>
</ul>
<ul>
<li><a href="http://rnd.feide.no/content/vo-oauth-and-trust-model">Virtual Organizations, OAuth and trust models</a></li>
<li><a href="https://rnd.feide.no/content/twitter-authentication-module">Twitter authentication model </a></li>
</ul>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[MVC com Autenticação]]></title>
<link>http://paulocrespo.wordpress.com/2009/11/10/mvc-com-autenticacao-ligado/</link>
<pubDate>Tue, 10 Nov 2009 07:29:40 +0000</pubDate>
<dc:creator>paulocrespo</dc:creator>
<guid>http://paulocrespo.wordpress.com/2009/11/10/mvc-com-autenticacao-ligado/</guid>
<description><![CDATA[Aqui uma dica muito bacana de como utilizar MVC com autenticação. Veja este link abaixo: MVC &#8211;]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Aqui uma dica muito bacana de como utilizar MVC com autenticação.</p>
<p>Veja este link abaixo:</p>
<p><a href="http://www.squaredroot.com/2007/12/10/ASPNet-MVC-Membership-Basics/">MVC &#8211; Basic</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[authentication (em reformulação)]]></title>
<link>http://g0inha.wordpress.com/2009/11/10/authentication/</link>
<pubDate>Tue, 10 Nov 2009 00:16:28 +0000</pubDate>
<dc:creator>g0inha</dc:creator>
<guid>http://g0inha.wordpress.com/2009/11/10/authentication/</guid>
<description><![CDATA[Autenticar, é o processo de verificação ou de estabelecimento de credibilidade. Tanto se pode aplica]]></description>
<content:encoded><![CDATA[Autenticar, é o processo de verificação ou de estabelecimento de credibilidade. Tanto se pode aplica]]></content:encoded>
</item>
<item>
<title><![CDATA[The Full Lowdown on TV Everywhere]]></title>
<link>http://newteevee.com/2009/11/09/the-full-lowdown-on-tv-everywhere/</link>
<pubDate>Mon, 09 Nov 2009 20:15:23 +0000</pubDate>
<dc:creator>Paul Sweeting</dc:creator>
<guid>http://newteevee.com/2009/11/09/the-full-lowdown-on-tv-everywhere/</guid>
<description><![CDATA[&#8220;TV Everywhere,&#8221; the set of new initiatives to make subscription programming available o]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>&#8220;TV Everywhere,&#8221; the set of new initiatives to make subscription programming available online exclusively to current pay-TV subscribers, could effect the most far-reaching change in the television industry since the introduction of cable. Like community-antenna TV (CATV), as cable was originally known, TV Everywhere has the potential not only to change the way people access television content but to radically reorder the relationship between programmers and distributors.</p>
<p><a href="http://pro.gigaom.com/2009/11/the-ultimate-guide-to-tv-everywhere/"><img class="alignleft size-medium wp-image-34393" title="TVEverywherereport" src="http://newteevee.wordpress.com/files/2009/11/tveverywherereport.png?w=291" alt="TVEverywherereport" width="261" height="337" /></a>Its success is far from assured, however. TV Everywhere faces a number of technical and economic hurdles that will need to be overcome before its full impact can be felt, as I detail in <a href="http://pro.gigaom.com/2009/11/the-ultimate-guide-to-tv-everywhere">a study released today by GigaOM Pro</a> (subscription required) in connection with this Thursday&#8217;s <a href="http://events.newteevee.com/live/09/?utm_source=toptab&#38;utm_medium=newteevee">NewTeeVee Live conference</a>.</p>
<p>The technical challenges concern authentication, as NewTeeVee readers are likely aware, but also authorization. Given the large number of cable systems in the U.S., and the multitude of specific programming packages to which a person can subscribe, some method for mapping a user&#8217;s cable or satellite subscription package to particular pieces of content hosted on various web sites will be essential.</p>
<p><!--more--></p>
<p>From a technical perspective, in fact, it&#8217;s likely to prove an even knottier problem than the issue of authentication, where at least some specific proposals are <a href="http://www.multichannel.com/blog/BIT_RATE/23137-Turner_Cooks_Up_TV_Everywhere_Log_In_System.php?rssid=20092&#38;q=TV+Everywhere">already being batted around</a>, because authorization is likely to require a degree of data-sharing on subscribers that will no doubt make some service providers uneasy.</p>
<p>From a business perspective, though, authorization may be more important than the authentication piece, because it will directly affect the bottom lines of both service providers and programmers. As I explain in the report:</p>
<blockquote><p>[U]nless individual subscription plans can be mapped to specific video assets hosted on multiple sites, TV Everywhere could be ripe for abuse. Why pay your cable provider for a premium programming tier, for instance, if a basic subscription can grant access to online resources containing both basic and premium content?</p></blockquote>
<p><strong>Economic Hurdles Ahead</strong></p>
<p>Beyond the technical challenges, however, the most vexing questions facing TV Everywhere are economic. Is there a business model to sustain the <a href="http://blog.streamingmedia.com/the_business_of_online_vi/2009/10/the-promise-of-tv-everywhere-is-doomed-for-failure-heres-why.html">incremental costs</a> of making the vast library of pay-TV content available for streaming and maintaining the authentication system?</p>
<p>For now, cable MSOs are planning to offer TV Everywhere as a value-added service to their subscribers at no additional cost. That may be fine as long as subscribers are using the same MSO&#8217;s broadband service to access content online. But it may be less than fine when subscribers want to access their cable channels outside the home, like on their laptops while traveling or using a wireless handheld device.</p>
<p>Beyond that is TV Everywhere&#8217;s potential to shake up the relationship between cable programmers and distributors. With retransmission fees increasingly vital to programmers, it&#8217;s hard to imagine they won&#8217;t look to hike those costs as cable and satellite providers seek to distribute the content online, adding further heat to what often have been tense negotiations.</p>
<p>Programmers may be compelled to seek higher fees for the additional exploitation rights to comply with talent deals, collective bargaining agreements with the creative guilds, music clearances and other contractual obligations involved in producing TV programming.</p>
<p>The report offers a comprehensive overview of all TV Everywhere trials being conducted by major MVPDs and analyzes the strategic and business-model issues confronting programmers and service providers as they try to respond to the challenges and opportunities presented by digital distribution platforms. It also addresses questions related to audience measurement on digital platforms and potential regulatory developments that will affect how TV Everywhere ultimately evolves.</p>
<p><em>Paul Sweeting is an analyst for GigaOM Pro and author of the latest report, &#8220;<a href="http://pro.gigaom.com/2009/11/the-ultimate-guide-to-tv-everywhere">TV Everywhere.</a>&#8221; Attendees of <a href="http://events.newteevee.com/live/09/">NewTeeVee Live</a> will receive a free copy of the report via email; others can access it by subscribing to <a href="https://pro.gigaom.com/">GigaOM Pro</a> directly.</em></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[virtual identities]]></title>
<link>http://g0inha.wordpress.com/2009/11/09/identities/</link>
<pubDate>Mon, 09 Nov 2009 06:16:06 +0000</pubDate>
<dc:creator>g0inha</dc:creator>
<guid>http://g0inha.wordpress.com/2009/11/09/identities/</guid>
<description><![CDATA[Questões como: &#8220;Quem sou eu?&#8221; foram postas por muitas pessoas ao longo da história. A id]]></description>
<content:encoded><![CDATA[Questões como: &#8220;Quem sou eu?&#8221; foram postas por muitas pessoas ao longo da história. A id]]></content:encoded>
</item>
<item>
<title><![CDATA[http://blog.plataformatec.com.br/2009/11...]]></title>
<link>http://bstonwebdev.wordpress.com/2009/11/04/httpblog-plataformatec-com-br200911/</link>
<pubDate>Wed, 04 Nov 2009 16:44:14 +0000</pubDate>
<dc:creator>BillSaysThis</dc:creator>
<guid>http://bstonwebdev.wordpress.com/2009/11/04/httpblog-plataformatec-com-br200911/</guid>
<description><![CDATA[http://blog.plataformatec.com.br/2009/11/devise-authentication-for-lazy-programmers/ &#8211; Devise:]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>http://blog.plataformatec.com.br/2009/11/devise-authentication-for-lazy-programmers/<br />
&#8211; Devise: authentication for lazy programmers</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Mutual Authentication with CLIENT-CERT, Tomcat 6, and HttpClient]]></title>
<link>http://twoguysarguing.wordpress.com/2009/11/03/mutual-authentication-with-client-cert-tomcat-6-and-httpclient/</link>
<pubDate>Wed, 04 Nov 2009 03:08:18 +0000</pubDate>
<dc:creator>benjaminplee</dc:creator>
<guid>http://twoguysarguing.wordpress.com/2009/11/03/mutual-authentication-with-client-cert-tomcat-6-and-httpclient/</guid>
<description><![CDATA[M is for Mutual Authentication: How &#8220;it must be simple&#8221; turned into &#8220;god that was ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><h3 style="text-align:center;"><span style="color:#800000;">M is for Mutual Authentication:</span></h3>
<h3 style="text-align:center;"><span style="color:#800000;">How &#8220;it must be simple&#8221; turned into &#8220;god that was annoying&#8221;.</span></h3>
<p>I spent most of today wrestling with getting a JEE webapp running in <a href="http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html" target="_blank">Tomcat 6</a> to enforce mutual authentication by using the rarely used <a href="http://java.sun.com/javaee/5/docs/tutorial/doc/bncbe.html#bncbn" target="_blank">CLIENT-CERT</a> authentication.  If you love spending your days translating poor error messages and frustrations into Google queries as much as I do, read on for some notes I took along the way.  If not, check out this amazing chart over at <a href="http://xkcd.com/657/" target="_blank"><em>XKCD</em></a>.</p>
<p><strong>The mission:</strong> lock down a particular action on our web application so that only a single other system could authenticate and invoke it.  Also provide an example client application which can access the webapp.</p>
<p><strong>Back story</strong>: I have worked with certificates and various forms of authentication before, but never this combination.  We want a small subset of the application to only be accessed via SSL with both server and client providing trusted certificates for mutual authentication.  The portion of the application will only be accessed by a single other system inside the company intranet.</p>
<p><strong>How it went down</strong>:  The following are the basic steps to get everything setup in Tomcat 6 and a fairly standard JEE webapp.</p>
<ul>
<li>First we need to know who we are, who they are, and make sure we ONLY trust them and no one else
<ul>
<li>To do this we need a certificate to identify ourselves.  Java&#8217;s provided keytool.exe provides an easy way to create a self signed certificate within a keystore.  Keytool can also help us export our public certificate out of our keystore.  This should also be done for the client.</li>
<li>Next import the public certificates into a new truststore for the opposite system (A only trusts B and B only trusts A).  Keytool to the rescue again.</li>
<li>Note: Java keystore files and certs of in a different format than the PKCS12 files that can be created by OpenSSL</li>
</ul>
</li>
<li>Next configure a Tomcat to support SSL communication
<ul>
<li>Add a new connector to thees server.xml configuration specifying HTTPS, the SSL protocol, where the webapp&#8217;s keystore and truststores are, etc</li>
<li>&#60;Connector className=&#8221;org.apache.coyote.tomcat4.CoyoteConnector&#8221;<br />
port=&#8221;8443&#8243; enableLookups=&#8221;true&#8221;<br />
acceptCount=&#8221;100&#8243; connectionTimeout=&#8221;20000&#8243;<br />
useURIValidationHack=&#8221;false&#8221; disableUploadTimeout=&#8221;true&#8221;<br />
scheme=&#8221;https&#8221; secure=&#8221;true&#8221; SSLEnabled=&#8221;true&#8221;<br />
keystoreFile=&#8221;ourApp.keystore&#8221; keystorePass=&#8221;changeit&#8221;<br />
truststoreFile=&#8221;ourApp.truststore&#8221; truststorePass=&#8221;changeit&#8221;<br />
clientAuth=&#8221;false&#8221; sslProtocol=&#8221;TLS&#8221;<br />
/&#62;</li>
<li>Note: clientAuth can have 3 values
<ul>
<li>True &#8211; all connections through this connector require client authentication</li>
<li>Want &#8211; the web app will ask for authentication but not require it</li>
<li>False &#8211; connections do not require client authentication UNLESS the web app specifies it is required via a security constraint with CLIENT-CERT chosen (this is the one we want)</li>
</ul>
</li>
</ul>
</li>
<li>Configure a new user with the required security role in the tomcat-users.xml if the in-memory realm is used
<ul>
<li>&#60;role rolename=&#8221;secureconn&#8221;/&#62;</li>
<li> &#60;user username=&#8221;CN=TheirApp, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown&#8221; password=&#8221;null&#8221; roles=&#8221;secureconn&#8221;/&#62;</li>
</ul>
</li>
<li>Configure out web.xml to use a CLIENT-CERT authentication constraint for our action
<ul>
<li>&#60;security-constraint&#62;<br />
&#60;web-resource-collection&#62;<br />
&#60;web-resource-name&#62;Demo App&#60;/web-resource-name&#62;<br />
&#60;url-pattern&#62;/secure/*&#60;/url-pattern&#62;<br />
&#60;/web-resource-collection&#62;<br />
&#60;auth-constraint&#62;<br />
&#60;role-name&#62;secureconn&#60;/role-name&#62;<br />
&#60;/auth-constraint&#62;<br />
&#60;/security-constraint&#62;&#60;login-config&#62;<br />
&#60;auth-method&#62;CLIENT-CERT&#60;/auth-method&#62;<br />
&#60;realm-name&#62;Demo App&#60;/realm-name&#62;<br />
&#60;/login-config&#62;</p>
<p>&#60;security-role&#62;<br />
&#60;role-name&#62;secureconn&#60;/role-name&#62;<br />
&#60;/security-role&#62;</li>
</ul>
</li>
<li>Create a client to hit the application
<ul>
<li>Here we used the <a href="http://hc.apache.org/httpclient-3.x/sslguide.html#Examples%20of%20SSL">Apache Commons HttpClient</a> (3.x b/c of client restrictions)</li>
<li>Several pages talk about various ways to add security protocols to HttpClient code but the examples are left lacking and most point to the AuthSSLProtocolSocketFactory class which for some reason is not present int he 3.x binaries but IS present in the 3.x SRC bundles.</li>
<li><em>** I will include some sample code tomorrow &#8230;.</em></li>
</ul>
</li>
<li>Test things using Firefo
<ul>
<li>You can add a personal certificate to identify yourself through Firefox&#8217;s preferences -&#62; Advanced -&#62; Exncryption</li>
<li>Firefox uses PKCS12 certificates which can be created easily from scratch through a few <a href="http://www.openssl.org/" target="_blank">OpenSSL</a> commands or from an existing keystore certificate through one hairy keytool command</li>
<li><em>** I will include the commands and a couple links tomorrow &#8230;..</em></li>
</ul>
</li>
</ul>
<p><span style="color:#800000;">Hopefully these notes will help someone in the future with getting things setup correctly.  When I started this morning I couldn&#8217;t find an end to end example to build on.</span></p>
<p style="text-align:center;"><span style="color:#008000;">Edit: Huge thanks to Matt Todd for helping me with this.  You can check out his blog at: http://emergentdevelopment.blogspot.com/ .</span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[dataspace]]></title>
<link>http://g0inha.wordpress.com/2009/11/03/dataspace/</link>
<pubDate>Tue, 03 Nov 2009 17:33:40 +0000</pubDate>
<dc:creator>g0inha</dc:creator>
<guid>http://g0inha.wordpress.com/2009/11/03/dataspace/</guid>
<description><![CDATA[Dataspace é um espaço comum, onde a informação é disponibilizada e organizada, segundo um interesse ]]></description>
<content:encoded><![CDATA[Dataspace é um espaço comum, onde a informação é disponibilizada e organizada, segundo um interesse ]]></content:encoded>
</item>
<item>
<title><![CDATA[Implementing Oracle Proxy Authentication in WebSphere]]></title>
<link>http://deepakpant.wordpress.com/2009/11/03/implementing-oracle-proxy-authentication-in-websphere/</link>
<pubDate>Tue, 03 Nov 2009 13:17:21 +0000</pubDate>
<dc:creator>deepakpant</dc:creator>
<guid>http://deepakpant.wordpress.com/2009/11/03/implementing-oracle-proxy-authentication-in-websphere/</guid>
<description><![CDATA[By Melvin Friese and Deepak Pant Problem Definition Typical J2EE applications use connection pools t]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><h3>By Melvin Friese and Deepak Pant</h3>
<h2>Problem Definition</h2>
<p>Typical J2EE applications use connection pools to connect the application code running under application server (like WebSphere, WebLogic, JBOSS) to the backend database.</p>
<p>A connection pool is a feature that maintains a shared pool of data source connections on behalf of its clients (EJBs). The connection pool provides a connection to an EJB on request, and returns the connection to the pool when the EJB is finished using it. When it is returned to the pool, the connection is available for other EJBs. Because establishing a connection to a data source can be time-consuming, reusing such connections in a connection pool can improve performance.</p>
<p>Typically all the application users of the J2EE application are connected to the database using the single database user. Such a user is often called the connection pool user.</p>
<p>From a DBA perspective, this single user is performing all database activities. It makes Oracle auditing features unusable, and all the database auditing is handled within the application server because the database is not aware of the &#8220;real&#8221; end-user, behind the common connection pool user.</p>
<p>Oracle introduced a new feature called “Oracle Proxy Authentication” in Oracle8i, which attempts to kill to two birds with one stone. It allows the application servers to continue to take advantage of connection pool feature while meeting the DBA requirements of who is using the database.</p>
<p>Proxy authentication is the ability to connect as a user through another user. For example proxy authentication enables the application server&#8217;s connection pool user to authenticate once to the database using a &#8216;generic&#8217; account and then establish lightweight session on behalf of actual application users.</p>
<p>It provides best of both worlds as the connection preparation time is optimized by using generic user and by opening proxy session on the connection, DBA’s can know the actual application end user.</p>
<h2>Terminology</h2>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="22" valign="top"><strong>#</strong></td>
<td width="154" valign="top"><strong>Item</strong></td>
<td width="415" valign="top"><strong>Description</strong></td>
</tr>
<tr>
<td width="22" valign="top">1</td>
<td width="154" valign="top">Application User</td>
<td width="415" valign="top">Database user that represents the application user.</td>
</tr>
<tr>
<td width="22" valign="top">2</td>
<td width="154" valign="top">Connection Pool User</td>
<td width="415" valign="top">User configured in the application server’s connection pool to connect to the database. This user establishes the connection, which application user uses it.</td>
</tr>
</tbody>
</table>
<h2>Database Setup</h2>
<ol>
<li>Download and Install Oracle database from following URL: <a href="http://www.oracle.com/technology/software/products/database/index.html">http://www.oracle.com/technology/software/products/database/index.html</a></li>
<li>For the purpose of testing, we used version # 10.2.0.3.0.</li>
<li>As part of database installation, install the sample database HR.</li>
<li>Execute following DDL SQL statements using popular tools like TOAD or SQL Developer.</li>
</ol>
<ul>
<li>Create Public Synonym for all the tables present in HR schema</li>
</ul>
<p style="text-align:left;">CREATE PUBLIC SYNONYM COUNTRIES   FOR HR.COUNTRIES;</p>
<p style="text-align:left;">CREATE PUBLIC SYNONYM DEPARTMENTS FOR HR.DEPARTMENTS;</p>
<p style="text-align:left;">CREATE PUBLIC SYNONYM EMPLOYEES   FOR HR.EMPLOYEES;</p>
<p style="text-align:left;">CREATE PUBLIC SYNONYM JOB_HISTORY FOR HR.JOB_HISTORY;</p>
<p style="text-align:left;">CREATE PUBLIC SYNONYM JOBS        FOR HR.JOBS;</p>
<p style="text-align:left;">CREATE PUBLIC SYNONYM LOCATIONS   FOR HR.LOCATIONS;</p>
<p style="text-align:left;">CREATE PUBLIC SYNONYM REGIONS     FOR HR.REGIONS;</p>
<ul>
<li>Create database user that will be in Websphere Application Server’s Connection Pool</li>
</ul>
<p>CREATE USER conn_pool_user IDENTIFIED BY conn_pool_password;</p>
<p>GRANT CREATE SESSION TO conn_pool_user;</p>
<ul>
<li>Create a role so that many users can be assigned to that role</li>
</ul>
<p>CREATE ROLE APP_USER_ROLE;</p>
<ul>
<li>Grant Typical CRUD Permissions To APP_USER_ROLE</li>
</ul>
<p>GRANT SELECT, INSERT, UPDATE, DELETE ON COUNTRIES      TO APP_USER_ROLE;</p>
<p>GRANT SELECT, INSERT, UPDATE, DELETE ON DEPARTMENTS    TO APP_USER_ROLE;</p>
<p>GRANT SELECT, INSERT, UPDATE, DELETE ON EMPLOYEES      TO APP_USER_ROLE;</p>
<p>GRANT SELECT, INSERT, UPDATE, DELETE ON JOB_HISTORY    TO APP_USER_ROLE;</p>
<p>GRANT SELECT, INSERT, UPDATE, DELETE ON JOBS           TO APP_USER_ROLE;</p>
<p>GRANT SELECT, INSERT, UPDATE, DELETE ON LOCATIONS      TO APP_USER_ROLE;</p>
<p>GRANT SELECT, INSERT, UPDATE, DELETE ON REGIONS        TO APP_USER_ROLE;</p>
<ul>
<li>Grant Create Session to the APP_USER_ROLE</li>
</ul>
<p>GRANT CREATE SESSION TO APP_USER_ROLE;</p>
<ul>
<li>Create database user for application users that will make use of the Proxy Authentication</li>
</ul>
<p>CREATE USER &#8220;John.Doe&#8221; IDENTIFIED BY &#8220;SomePasswordXXX&#8221;;</p>
<p>ALTER USER &#8220;John.Doe&#8221; GRANT CONNECT through conn_pool_user;</p>
<p>GRANT APP_USER_ROLE TO &#8220;John.Doe&#8221;;</p>
<p>CREATE USER &#8220;John.Doe1&#8243; IDENTIFIED BY &#8220;SomePasswordYYY&#8221;;</p>
<p>ALTER USER &#8220;John.Doe1&#8243; GRANT CONNECT through conn_pool_user;</p>
<p>GRANT APP_USER_ROLE TO &#8220;John.Doe1&#8243;;</p>
<p><em>Note that the application user’s password should never be known to the users as it is not needed for establishing the proxy user connection.</em></p>
<h2>Java Code</h2>
<ol>
<li>Download and configure the Oracle Type 4 JDBC Driver from following <a href="http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.htmlFor">URL:</a><a href="http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html">http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html</a></li>
<li>For the purpose of testing, we used version # 11.1.0.7.0.</li>
<li>Let us assume that the JDBC URL for the database is following:</li>
</ol>
<p>jdbc:oracle:thin:hr/password@192.168.1.101:1521:orcl</p>
<p><strong>Testing Proxy User Authentication Connection using simple Java class:</strong></p>
<p>private static void prepareProxyConnection() throws Exception {</p>
<p>       OracleConnection pdConn = null;</p>
<p>       try {</p>
<p>              Properties pdProp = new Properties();</p>
<p>              // prepare basic connection and typecast it to OracleConnection</p>
<p>              pdConn = (OracleConnection) DriverManager.getConnection                                                       (JDBC_URL_PROXY, pdProp);</p>
<p>              // prepare first proxy user connection</p>
<p>              openProxySession(pdConn, &#8220;John.Doe&#8221;);</p>
<p>              // prepare second proxy user connection</p>
<p>              openProxySession(pdConn, &#8221; John.Doe1&#8243;);</p>
<p>       }</p>
<p>       catch (Exception ex) {</p>
<p>              ex.printStackTrace();</p>
<p>              throw ex;</p>
<p>       }</p>
<p>       finally {</p>
<p>              // close the main connection object</p>
<p>              if (pdConn != null) {</p>
<p>                     pdConn.close();</p>
<p>              }</p>
<p>       }</p>
<p>}</p>
<p>private static void openProxySession(OracleConnection pdConn, String strProxyUser) throws Exception {</p>
<p>       try {</p>
<p>              // prepare properties for proxy user</p>
<p>              Properties pdProp = new Properties();</p>
<p>              pdProp.put(&#8220;PROXY_USER_NAME&#8221;, strProxyUser);</p>
<p>              // open proxy session</p>
<p>              pdConn.openProxySession (  OracleConnection.PROXYTYPE_USER_NAME,                                              pdProp);</p>
<p>              // fetch user information</p>
<p>              fetchUserInformation(pdConn);</p>
<p>              // execute SQL statement –</p>
<p>              // this method will do some database work like SELECT etc</p>
<p>              <em>executeSomeSQL(pdConn);</em></p>
<p>       }</p>
<p>       catch (Exception ex) {</p>
<p>              ex.printStackTrace();</p>
<p>              throw ex;</p>
<p>       }</p>
<p>       finally {</p>
<p>              // close the proxy session object</p>
<p>              if (pdConn != null) {</p>
<p>                     // close the proxy session so that it can be reused</p>
<p>                     pdConn.close(OracleConnection.PROXY_SESSION);</p>
<p>              }</p>
<p>       }</p>
<p>}</p>
<ol>
<li>Following SQL statement will return “John.Doe” or “John.Doe1” as “PROXY_USER” if executed using the proxy user connection object.</li>
</ol>
<p>SELECT USER,</p>
<p>  SYS_CONTEXT(&#8216;USERENV&#8217;,'AUTHENTICATED_IDENTITY&#8217;) AS AUTHENTICATED_IDENTITY,</p>
<p>  SYS_CONTEXT(&#8216;USERENV&#8217;,'CURRENT_SCHEMA&#8217;)         AS CURRENT_SCHEMA,</p>
<p>  SYS_CONTEXT(&#8216;USERENV&#8217;,'PROXY_USER&#8217;)             AS PROXY_USER,</p>
<p>  SYS_CONTEXT(&#8216;USERENV&#8217;,'SESSION_USER&#8217;)           AS SESSION_USER</p>
<p>FROM DUAL;</p>
<h2>Java Code running under WebSphere Application Server</h2>
<ol>
<li>Create a Connection Pool in WebSphere that uses “conn_pool_user” user to establish the database connections using the Oracle Type 4 JDBC driver.</li>
<li>Use following function to get the connection from WebSphere connection pool using Oracle Proxy Authentication feature.</li>
</ol>
<p>private OracleConnection prepareProxySession(String strProxyUser) throws SQLException {</p>
<p>       OracleConnection pdOraConn = null;</p>
<p>       try {</p>
<p>              // get the jdbc connection object from connection pool</p>
<p>              Connection pdConn = getConnectionFromPool();</p>
<p>              // cast the object to native oracle connection object</p>
<p>              OracleConnection pdOraConn = (OracleConnection) WSJdbcUtil</p>
<p>                           .getNativeConnection((WSJdbcConnection) pdConn);</p>
<p>              // prepare properties for proxy user</p>
<p>              Properties pdProp = new Properties();</p>
<p>              pdProp.put(&#8220;PROXY_USER_NAME&#8221;, strProxyUser);</p>
<p>              // open proxy session using native oracle conn object</p>
<p>              pdOraConn.openProxySession(OracleConnection.PROXYTYPE_USER_NAME,</p>
<p>                           pdProp);</p>
<p>       }</p>
<p>       catch (SQLException ex) {</p>
<p>              m_pdLog.error(&#8220;SQLException:&#8221;, ex);</p>
<p>              throw ex;</p>
<p>       }</p>
<p>       return pdOraConn;</p>
<p>}</p>
<p>Use following function to close the proxy session connection and return it back to the WebSphere connection pool. The code assumes a member variable (m_pdOraConnection) that holds reference to the connection object.</p>
<p>public void cleanup() throws Exception {</p>
<p>       try {</p>
<p>              // close the proxy session so that any other user can use it</p>
<p>              m_pdOraConnection.close(OracleConnection.PROXY_SESSION);</p>
<p>       }</p>
<p>       finally {</p>
<p>              m_pdOraConnection = null;</p>
<p>       }</p>
<p>}</p>
<h2>Special Notes</h2>
<ol>
<li>Both connection pool user (conn_pool_user) and application user (John.Doe or John.Doe1) will require create session privilege.</li>
<li>The password of connection pool user will be stored in WebSphere as J2C Authentication data, associated to the connection pool.</li>
<li>The password of application user (John.Doe or John.Doe1) will not be stored or known to the application. So no application user can use the credentials to connect directly to the database.</li>
</ol>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Secure Remote Password protocol (SRP)]]></title>
<link>http://esskar.wordpress.com/2009/11/03/secure-remote-password-protocol-srp/</link>
<pubDate>Tue, 03 Nov 2009 09:41:39 +0000</pubDate>
<dc:creator>esskar</dc:creator>
<guid>http://esskar.wordpress.com/2009/11/03/secure-remote-password-protocol-srp/</guid>
<description><![CDATA[The Secure Remote Password Protocol (SRP) is a password-authenticated key agreement protocol. Before]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>The <a href="http://en.wikipedia.org/wiki/Secure_Remote_Password_protocol">Secure Remote Password Protocol (SRP)</a> is a password-authenticated key agreement protocol. Before, I used digest algorithm (similar to <a href="http://en.wikipedia.org/wiki/Digest_access_authentication">Digest access authentication</a>) to authenticate my users. As I had to add encryption to my message system (not 100% encrytion means only some messages are confidential) I decided to implement SRP as it</p>
<ul>
<li>allows to securly authenticate a user</li>
<li>creates a common key that can be used as an encryption key</li>
<li>is something new to implement as I like to implement new stuff <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
</ul>
<p>Before I start, some helpful extensions I will be using along the way:</p>
<pre class="brush: csharp;">
namespace System.IO
{
    public static class StreamExtension
    {
        public static void Write(this Stream s, byte[] buffer)
        {
            s.Write(buffer, 0, buffer.Length);
        }

        public static int Read(this Stream s, byte[] buffer)
        {
            return s.Read(buffer, 0, buffer.Length);
        }
    }
}
</pre>
<pre class="brush: csharp;">
using System.Runtime.InteropServices;

namespace System.Security
{
    public static class SecureStringExtension
    {
        public static string ConvertToUnsecureString(this SecureString securePassword)
        {
            if (securePassword == null)
                throw new ArgumentNullException(&#34;securePassword&#34;);

            IntPtr unmanagedString = IntPtr.Zero;
            try
            {
                unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(securePassword);
                return Marshal.PtrToStringUni(unmanagedString);
            }
            finally
            {
                Marshal.ZeroFreeGlobalAllocUnicode(unmanagedString);
            }
        }
    }
}
</pre>
<p>Implementing SRP involves a lot of BigInteger calculations, such as multiplying and taking the exponent of some large number. The .Net framework does not yet implement such a BigInteger class, so I&#8217;m using some classes from <a href="http://www.mono-project.com/Main_Page">Mono</a>. I included <em>Mono.Math.BigInteger</em>, <em>Mono.Math.Prime.ConfidenceFactor</em> and <em>.PrimalityTests</em>, <em>Mono.Math.Prime.Generator.NextPrimeFinder</em>, <em>.PrimeGeneratorBase</em>, and <em>.SequentialSearchPrimeGeneratorBase</em>.</p>
<p>As the protocol description says, it all starts with <i>N</i> and <i>g</i>:<br />
N should be a secure prime, which means that N is calculated by <i>N=2q + 1</i> where q is also a prime. Finding such an N is easy but takes a lot of time specially if N should be greater than 1024 bits. N and g don&#8217;t have to be secure, so you can just define them once. </p>
<p>Here is a N of bit length 2048 encoded as <a href="http://en.wikipedia.org/wiki/Base64">Base64</a></p>
<pre class="brush: csharp;">
string N_Base64 = &#34;rGvbQTJKmpvxZt5eE4lYL69ytmUZh+4H/DGSlD21YFCjcynLtKCZ7YGT4HV3Z6E91SMSq0s&#34;
				+ &#34;DMQ3Nf0ip2gT9UOgIOWntt2ewz2CVF5oWOrNmGgX71fqq6CkYqZYvC5O4Vfl5k+yXXuqoDX&#34;
				+ &#34;QK2/T/dHNZ0EHVwz6nHSgeRGsUdzvKl7Q6I/uAFna9IHpDbGSB8dK5B4cXRhpbnTLmiPh3S&#34;
				+ &#34;FRFI7UksNV9Xqd6J3XS7PoDLPvb9S+zeGFgJ5AE5Xrmr4dOcwPOUymczAQce8MI2CpWmPOo&#34;
				+ &#34;0MOCca41+Onb+7aUtcgD2J965DXeI21SX1R1m2XjcvzWjvIPpxEfnkr/cw==&#34;;
BigInteger N = new BigInteger(Convert.FromBase64String(N_Base64));
</pre>
<p>g is just a generator of the multiplicative group. So, it is used in caluclations like g^x where x is very large. Most people would probably choose <em>g=2</em>. But i&#8217;m not &#8220;most people&#8221;, so i set <em>g=3</em>.</p>
<p>As you look further into the description, you&#8217;ll see the that there are a lot of variables needed on both sides (server and client side). To make life easier, let&#8217;s define a base class for that:</p>
<pre class="brush: csharp;">
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;

using System.Security;
using System.Security.Cryptography;

using Mono.Math;

namespace Esskar.Security.Authen.SRP
{
	public abstract class SRPBase
	{
		// initialize some random number generaror
		private static RandomNumberGenerator s_rng = RandomNumberGenerator.Create();

		/// &#60;param name=&#34;N&#34;&#62;N is a safe prime. Must be large enough so that computing discrete logarithms modulo N is infeasible&#60;/param&#62;
        /// &#60;param name=&#34;g&#34;&#62;g is a generator of the multiplicative group&#60;/param&#62;
		public SRPBase(BigInteger N, BigInteger g)
		{
			if (N == null)
				throw new ArgumentNullException(&#34;N&#34;);
			if (g == null)
				throw new ArgumentNullException(&#34;g&#34;);
			this.N = N;
			this.g = g;
		}

		/// &#60;summary&#62;
        /// N is a safe prime. Must be large enough so that computing discrete logarithms modulo N is infeasible
        /// &#60;/summary&#62;
		public BigInteger N { get; private set; }

		/// &#60;summary&#62;
        /// g is a generator of the multiplicative group
        /// &#60;/summary&#62;
		public BigInteger g { get; private set; }
	}
}
</pre>
<p>The next parameter that will be defined is <em>k</em>. k is a parameter derived by both sides; for example, <em>k = H(N, g)</em>, where <em>H()</em> is a hash function; e.g., SHA-256. This goes into our SRPBase class:</p>
<pre class="brush: csharp;">
namespace Esskar.Security.Authen.SRP
{
	public abstract class SRPBase
	{
		private BigInteger m_k;

		/// &#60;summary&#62;
        /// k is a parameter derived by both sides; for example, k = H(N, g).
        /// &#60;/summary&#62;
		public BigInteger k
		{
			get
			{
				if (m_k == null)
				{
					byte[] both = SRPHelper.JoinArrays(this.N.GetBytes(), this.g.GetBytes());
					byte[] hash = SRPHelper.ShaInstance.ComputeHash(both);
					m_k = new BigInteger(hash);
				}
				return m_k;
			}
		}
	}
}
</pre>
<p><em>s</em>, the small salt, is calculated on the server side and send to the client. So s has to be a getter/setter property.<br />
We also extend our constructor to be able to pass s as a parameter, and define <em>I</em> and <em>p</em> (<em>Username</em> and <em>Password</em> of the user to authenticate). </p>
<pre class="brush: csharp;">
namespace Esskar.Security.Authen.SRP
{
	public abstract class SRPBase
	{
		private BigInteger m_s;

		/// &#60;param name=&#34;userName&#34;&#62;I is an identifying username.&#60;/param&#62;
        /// &#60;param name=&#34;password&#34;&#62;p is the user's password.&#60;/param&#62;
		/// &#60;param name=&#34;N&#34;&#62;N is a safe prime. Must be large enough so that computing discrete logarithms modulo N is infeasible&#60;/param&#62;
        /// &#60;param name=&#34;g&#34;&#62;g is a generator of the multiplicative group&#60;/param&#62;
		public SRPBase(string userName, SecureString password, BigInteger N, BigInteger g)
			: this(userName, password, null, N, g) { }

		/// &#60;param name=&#34;userName&#34;&#62;I is an identifying username.&#60;/param&#62;
        /// &#60;param name=&#34;password&#34;&#62;p is the user's password.&#60;/param&#62;
		/// &#60;param name=&#34;s&#34;&#62;s is a small salt.&#60;/param&#62;
		/// &#60;param name=&#34;N&#34;&#62;N is a safe prime. Must be large enough so that computing discrete logarithms modulo N is infeasible&#60;/param&#62;
        /// &#60;param name=&#34;g&#34;&#62;g is a generator of the multiplicative group&#60;/param&#62;
		public SRPBase(string userName, SecureString password, byte[] s, BigInteger N, BigInteger g)
		{
			if (N == null)
				throw new ArgumentNullException(&#34;N&#34;);
			if (g == null)
				throw new ArgumentNullException(&#34;g&#34;);
			if (string.IsNullOrEmpty(userName))
                throw new ArgumentNullException(&#34;userName&#34;);
            if (password == null)
                throw new ArgumentNullException(&#34;password&#34;);
			this.UserName = userName;
            this.Password = password.Copy();
			this.s = s;
			this.N = N;
			this.g = g;
		}

		/// &#60;summary&#62;
        /// I, is an identifying username.
        /// &#60;/summary&#62;
        public string UserName { get; private set; }

        private SecureString Password { get; set; }

		public byte[] s
        {
            get
            {
				// not set yet, generate some random data
                if (m_s == null)
                {
                    m_s = new byte[16];
                    lock (s_rng) { s_rng.GetNonZeroBytes(m_s); }
                }
                return m_s;
            }
            set { m_s = value; }
        }
	}
}
</pre>
<p>Now we have everything to calculate <em>x = H(s, p)</em>, and the host password verifier <em>v = g^x</em>. <em>Hint: If you do not want to store the password on the server side as clear text, you can store only v and s only. If you plan to change g, you better off to store g along as well.</em></p>
<pre class="brush: csharp;">
namespace Esskar.Security.Authen.SRP
{
	public abstract class SRPBase
	{
		private BigInteger m_x, m_v;

		/// &#60;summary&#62;
        /// x = H(s, p)
        /// &#60;/summary&#62;
        public BigInteger x
        {
            get
            {
                if (m_x == null)
                {
                    byte[] innerBytes = Encoding.UTF8.GetBytes(this.UserName + &#34;:&#34; + this.Password.ConvertToUnsecureString());
                    byte[] bytes = SRPHelper.JoinArrays(this.s, innerBytes);
                    byte[] hash = SRPHelper.ShaInstance.ComputeHash(bytes);
                    m_x = new BigInteger(hash);
                }
                return m_x;
            }
        }

		/// &#60;summary&#62;
        /// v is the host's password verifier, v = g^x, x = H(s,p).
        /// &#60;/summary&#62;
        public BigInteger v
        {
            get
            {
                if (m_v == null)
                    m_v = this.g.ModPow(this.x, this.N);
                return m_v;
            }
        }
	}
}
</pre>
<p>Let&#8217;s go on. <em>A</em> and <em>B</em> are both calculated. A is calculated on the client side as <em>A = g^a</em>, and B is calculated  on the server side as <em>B = kv + g^b</em>. But values are exchanged; so at some time, both sides contain A and B, so we make some stub implementation for both properties and at them to our constructors.</p>
<pre class="brush: csharp;">
namespace Esskar.Security.Authen.SRP
{
	public abstract class SRPBase
	{
		private byte[] m_K;

		/// &#60;param name=&#34;userName&#34;&#62;I is an identifying username.&#60;/param&#62;
        /// &#60;param name=&#34;password&#34;&#62;p is the user's password.&#60;/param&#62;
        /// &#60;param name=&#34;A&#34;&#62;A = g^a, calculated by the client, send to the server&#60;/param&#62;
        /// &#60;param name=&#34;B&#34;&#62;B = kv + g^b, calculated by the server, send to the client&#60;/param&#62;
        /// &#60;param name=&#34;N&#34;&#62;N is a safe prime. Must be large enough so that computing discrete logarithms modulo N is infeasible&#60;/param&#62;
        /// &#60;param name=&#34;g&#34;&#62;g is a generator of the multiplicative group&#60;/param&#62;
        public SRPBase(string userName, SecureString password, BigInteger A, BigInteger B, BigInteger N, BigInteger g)
            : this(userName, password, null, A, B, N, g) { }

        /// &#60;summary&#62;
        ///
        /// &#60;/summary&#62;
        /// &#60;param name=&#34;userName&#34;&#62;I is an identifying username.&#60;/param&#62;
        /// &#60;param name=&#34;password&#34;&#62;p is the user's password.&#60;/param&#62;
        /// &#60;param name=&#34;s&#34;&#62;s is a small salt.&#60;/param&#62;
        /// &#60;param name=&#34;A&#34;&#62;A = g^a, calculated by the client, send to the server&#60;/param&#62;
        /// &#60;param name=&#34;B&#34;&#62;B = kv + g^b, calculated by the server, send to the client&#60;/param&#62;
        /// &#60;param name=&#34;N&#34;&#62;N is a safe prime. Must be large enough so that computing discrete logarithms modulo N is infeasible&#60;/param&#62;
        /// &#60;param name=&#34;g&#34;&#62;g is a generator of the multiplicative group&#60;/param&#62;
        public SRPBase(string userName, SecureString password, byte[] s, BigInteger A, BigInteger B, BigInteger N, BigInteger g)
        {
            if (N == null)
                throw new ArgumentNullException(&#34;N&#34;);
            if (g == null)
                throw new ArgumentNullException(&#34;g&#34;);
            if (string.IsNullOrEmpty(userName))
                throw new ArgumentNullException(&#34;userName&#34;);
            if (password == null)
                throw new ArgumentNullException(&#34;password&#34;);

            this.N = N;
            this.g = g;
            this.A = A;
            this.B = B;
            this.s = s;
            this.UserName = userName;
            this.Password = password.Copy();
        }

		/// &#60;summary&#62;
        /// Carol calculates A = g^a and sends it to Steve
        /// &#60;/summary&#62;
        public virtual BigInteger A
        {
            get; set;
        }

        /// &#60;summary&#62;
        /// Steve calculates B = kv + g^b and sends it to Carol
        /// &#60;/summary&#62;
        public virtual BigInteger B
        {
            get; set;
        }

		/// &#60;summary&#62;
        /// Secret
        /// &#60;/summary&#62;
        public abstract BigInteger S { get; }

		/// &#60;summary&#62;
        /// Strong Session Key
        /// &#60;/summary&#62;
        public byte[] K
        {
            get
            {
                if (m_K == null)
                    m_K = SRPHelper.ShaInstance.ComputeHash(this.S.GetBytes());
                return m_K;
            }
        }
	}
}
</pre>
<p>As you noticed, we added two more properties: the abstract getter property <em>S</em> as well as <em>K</em>. S is the secret that is calculated on both sides and must never be exchanged. The client calculates S as <em>S=(B &#8211; kg^x)^(a + ux)</em>, and the client defines <em>S=(Av^u)^b</em>. <em>a</em> and <em>b</em> are both random numbers, generated on client and server and also get never exchanged. Funny is, that S on both sides are equal. Well, it&#8217;s not funny it&#8217;s pure math and it took me some time to convince myself that both equations for S are equivalent. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  K is just <em>K=H(S)</em>. K can later be used as an encryption key.</p>
<p>To finish up our SRPBase class, we are now able to define M1 and M2. M1 is first send to the server. The server itself calculates M1 with the information it collected and compares the received M1 with it&#8217;s own M1. If both are equal, the server has proof that the client knows the right username + password combination. It then sends M2 to the client. Client does the same thing now. It calculates its own M2, compares and verifies. We go in detail later.</p>
<pre class="brush: csharp;">
namespace Esskar.Security.Authen.SRP
{
	public abstract class SRPBase
	{
		/// &#60;summary&#62;
        /// M1, Carol sends M1 to Steve
        /// M1 = H(H(N) XOR H(g) &#124; H(I) &#124; s &#124; A &#124; B &#124; K)
        /// &#60;/summary&#62;
        public virtual byte[] M1
        {
            get
            {
                byte[] hg = SRPHelper.ShaInstance.ComputeHash(this.g.GetBytes());
                byte[] hN = SRPHelper.ShaInstance.ComputeHash(this.N.GetBytes());

                byte[] gNXorBytes = SRPHelper.XorArrays(hN, hg);
                byte[] userNameBytes = Encoding.UTF8.GetBytes(this.UserName);
                byte[] hUserNameBytes = SRPHelper.ShaInstance.ComputeHash(userNameBytes);

                using (MemoryStream ms = new MemoryStream())
                {
                    ms.Write(gNXorBytes);
                    ms.Write(hUserNameBytes);
                    ms.Write(this.s);
                    ms.Write(this.A.GetBytes());
                    ms.Write(this.B.GetBytes());
                    ms.Write(this.K);

                    return SRPHelper.ShaInstance.ComputeHash(ms.ToArray());
                }
            }
        }

        /// &#60;summary&#62;
        /// M2, Steve sends M2 to Carol
        /// M2 = H(A &#124; M1 &#124; K).
        /// &#60;/summary&#62;
        public byte[] M2
        {
            get
            {
                using (MemoryStream ms = new MemoryStream())
                {
                    ms.Write(this.A.GetBytes());
                    ms.Write(this.M1);
                    ms.Write(this.K);

                    return SRPHelper.ShaInstance.ComputeHash(ms.ToArray());
                }
            }
        }
	}
}
</pre>
<p>Now, we define our client side, class SRPRequest:</p>
<pre class="brush: csharp;">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security;
using System.Text;

using Mono.Math;

namespace Esskar.Security.Authen.SRP
{
    public class SRPRequest : SRPBase
    {
        private BigInteger m_a, m_S;

        /// &#60;summary&#62;
        /// SRP Request, constructed on the client side
        /// &#60;/summary&#62;
        /// &#60;param name=&#34;userName&#34;&#62;I is an identifying username.&#60;/param&#62;
        /// &#60;param name=&#34;password&#34;&#62;p is the user's password.&#60;/param&#62;
        /// &#60;param name=&#34;N&#34;&#62;N is a safe prime. Must be large enough so that computing discrete logarithms modulo N is infeasible&#60;/param&#62;
        /// &#60;param name=&#34;g&#34;&#62;g is a generator of the multiplicative group&#60;/param&#62;
        public SRPRequest(string userName, SecureString password, BigInteger N, BigInteger g)
            : base(userName, password, null, null, N, g) { }

        /// &#60;summary&#62;
        /// a is random
        /// &#60;/summary&#62;
        private BigInteger a
        {
            get
            {
                if(m_a == null)
                    m_a = BigInteger.GenerateRandom(1024);
                return m_a;
            }
        }

        /// &#60;summary&#62;
        /// A = g^a
        /// &#60;/summary&#62;
        public override BigInteger A
        {
            get
            {
                if (base.A == null)
                    base.A = this.g.ModPow(this.a, this.N);
                return base.A;
            }
        }

        /// &#60;summary&#62;
        /// Secret calculated on the client, (B - kg^x)^(a + ux)
        /// &#60;/summary&#62;
        public override BigInteger S
        {
            get
            {
                if (m_S == null)
                    m_S = (this.B + (this.N - ((this.k * this.g.ModPow(this.x, this.N)) % this.N))).ModPow(this.a + this.u * this.x, this.N);
                return m_S;
            }
        }
    }
}
</pre>
<p>and our ServerSide, class SRPReply</p>
<pre class="brush: csharp;">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security;
using System.Security.Cryptography;
using System.Text;

using Mono.Math;

namespace Esskar.Security.Authen.SRP
{
    public class SRPReply : SRPBase
    {
        private BigInteger m_b;

        /// &#60;summary&#62;
        /// SRP Reply, constructed on the server side
        /// &#60;/summary&#62;
        /// &#60;param name=&#34;userName&#34;&#62;I is an identifying username.&#60;/param&#62;
        /// &#60;param name=&#34;password&#34;&#62;p is the user's password.&#60;/param&#62;
        /// &#60;param name=&#34;A&#34;&#62;A = g^a, calculated by the client, send to the server&#60;/param&#62;
        /// &#60;param name=&#34;N&#34;&#62;N is a safe prime. Must be large enough so that computing discrete logarithms modulo N is infeasible&#60;/param&#62;
        /// &#60;param name=&#34;g&#34;&#62;g is a generator of the multiplicative group&#60;/param&#62;
        public SRPReply(string userName, SecureString password, BigInteger A, BigInteger N, BigInteger g)
            : base(userName, password, A, null, N, g) { }

        /// &#60;summary&#62;
        /// random number
        /// &#60;/summary&#62;
        private BigInteger b
        {
            get
            {
                if (m_b == null)
                    m_b = BigInteger.GenerateRandom(1024);
                return m_b;
            }
        }

        /// &#60;summary&#62;
        /// B = kv + g^b
        /// &#60;/summary&#62;
        public override BigInteger B
        {
            get
            {
                if (base.B == null)
                    base.B = (this.k * this.v + this.g.ModPow(this.b, this.N)) % this.N;
                return base.B;
            }
        }

        /// &#60;summary&#62;
        /// Secret calculated on the server: (Av^u)^b
        /// &#60;/summary&#62;
        public override BigInteger S
        {
            get  { return (this.A * this.v.ModPow(this.u, this.N)).ModPow(this.b, this.N); }
        }
    }
}
</pre>
<p>Nice. We now have everything to authenticate our users.<br />
Here a little test. (Note that this test does not send any data, it just verifies that our client and server calculate the right things).</p>
<pre class="brush: csharp;">
public static class SRPTester
{
	private static string N_Base64 = &#34;rGvbQTJKmpvxZt5eE4lYL69ytmUZh+4H/DGSlD21YFCjcynLtKCZ7YGT4HV3Z6E91SMSq0s&#34;
								   + &#34;DMQ3Nf0ip2gT9UOgIOWntt2ewz2CVF5oWOrNmGgX71fqq6CkYqZYvC5O4Vfl5k+yXXuqoDX&#34;
								   + &#34;QK2/T/dHNZ0EHVwz6nHSgeRGsUdzvKl7Q6I/uAFna9IHpDbGSB8dK5B4cXRhpbnTLmiPh3S&#34;
								   + &#34;FRFI7UksNV9Xqd6J3XS7PoDLPvb9S+zeGFgJ5AE5Xrmr4dOcwPOUymczAQce8MI2CpWmPOo&#34;
								   + &#34;0MOCca41+Onb+7aUtcgD2J965DXeI21SX1R1m2XjcvzWjvIPpxEfnkr/cw==&#34;;

	private static Mono.Math.BigInteger g = new Mono.Math.BigInteger(3);

	public static SRPRequest ClientRequest(string userName, SecureString password)
	{
		return new SRPRequest(userName, password, new BigInteger(Convert.FromBase64String(N_Base64)), g);
	}

	public static SRPReply ServerReply(string userName, SecureString password, BigInteger A)
	{
		return new SRPReply(userName, password, A, new BigInteger(Convert.FromBase64String(N_Base64)), g);
	}

	static void Main(string[] args)
	{
		string userName = &#34;foo&#34;;
		SecureString password = new SecureString();

		SRPRequest srpRequest = SRPTester.ClientRequest(userName, password);

		// We generated the request, and have to send A to the server. Somehow.
		// The server takes A to initialize it's reply

		SRPReply srpReply = SRPTester.ServerReply(userName, password, srpRequest.A);
		if ((srpRequest.A % srpReply.N) == 0) // safeguard 1
			throw new Exception(&#34;A mod N is zero.&#34;);                            

		// The server sends now s and B to the client, the client adds them to its object
		if ((srpReply.B % srpRequest.N) == 0) // safeguard 2
			throw new Exception(&#34;B mod N is zero.&#34;);

		srpRequest.B = srpReply.B;
		srpRequest.s = srpReply.s;
		if (srpRequest.u == 0) // safeguard 3
			throw new Exception(&#34;u is zero.&#34;);

		// now, the client sends M1 to the server and it verifies that its M1 is equal to the M1 of the client

		if (!SRPHelper.Equals&#60;byte&#62;(srpRequest.M1, srpReply.M1))
			throw new Exception(&#34;M1 not equal M1.&#34;);

		// if everything looks good, the server sends now its M2 to the client and the client verifies M2

		if (!SRPHelper.Equals&#60;byte&#62;(srpRequest.M2, srpReply.M2))
			throw new Exception(&#34;M2 not equal M2.&#34;);
	}
}
</pre>
<p>To make this post complete, here is the code of the SRPHelper class:</p>
<pre class="brush: csharp;">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;

namespace Esskar.Security.Authen.SRP
{
    /// &#60;summary&#62;
    /// Some useful functions used frequently
    /// &#60;/summary&#62;
    public static class SRPHelper
    {
        /// &#60;summary&#62;
        /// Sha256 Instance used to compute hashes
        /// &#60;/summary&#62;
        public static SHA256 ShaInstance = SHA256.Create();        

        /// &#60;summary&#62;
        /// Joins two byte arrays to one single byte array by concating them
        /// &#60;/summary&#62;
        /// &#60;param name=&#34;b1&#34;&#62;first byte array&#60;/param&#62;
        /// &#60;param name=&#34;b2&#34;&#62;second byte array&#60;/param&#62;
        /// &#60;returns&#62;&#60;/returns&#62;
        public static byte[] JoinArrays(byte[] b1, byte[] b2)
        {
            byte[] ba = new byte[b1.Length + b2.Length];
            Buffer.BlockCopy(b1, 0, ba, 0, b1.Length);
            Buffer.BlockCopy(b2, 0, ba, b1.Length, b2.Length);
            return ba;
        }

        /// &#60;summary&#62;
        /// XORs the elements of two arrays and returns the resulting array
        /// &#60;/summary&#62;
        /// &#60;param name=&#34;array1&#34;&#62;&#60;/param&#62;
        /// &#60;param name=&#34;array2&#34;&#62;&#60;/param&#62;
        /// &#60;returns&#62;&#60;/returns&#62;
        public static byte[] XorArrays(byte[] b1, byte[] b2)
        {
            if (b1 == null)
                throw new ArgumentNullException(&#34;b1&#34;);
            if (b2 == null)
                throw new ArgumentNullException(&#34;b2&#34;);
            if (b1.Length == 0)
                throw new ArgumentOutOfRangeException(&#34;b1 can not be zero length.&#34;);
            if (b1.Length != b2.Length)
                throw new ArgumentOutOfRangeException(&#34;b1.Length != b2.Length&#34;);

            byte[] ba = new byte[b1.Length];
            for (int i = 0; i &#60; b1.Length; i++)
                ba[i] = (byte)(b1[i] ^ b2[i]);
            return ba;
        }

        /// &#60;summary&#62;
        /// Checks if the elements of two arrays are equal
        /// &#60;/summary&#62;
        public static bool Equals&#60;T&#62;(IList&#60;T&#62; a, IList&#60;T&#62; b) where T : IComparable&#60;T&#62;
        {
            if (a == null)
                throw new ArgumentNullException(&#34;a&#34;);
            if (b == null)
                throw new ArgumentNullException(&#34;b&#34;);
            bool retval = a.Count == b.Count;
            if (retval)
            {
                for (int i = 0; retval &#38;&#38; i &#60; a.Count; i++)
                    retval = a[i].CompareTo(b[i]) == 0;
            }
            return retval;
        }
    }
}
</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[More reviews for the AMS]]></title>
<link>http://cryptoblog.wordpress.com/2009/11/02/more-reviews-for-the-ams/</link>
<pubDate>Mon, 02 Nov 2009 06:40:57 +0000</pubDate>
<dc:creator>Mario</dc:creator>
<guid>http://cryptoblog.wordpress.com/2009/11/02/more-reviews-for-the-ams/</guid>
<description><![CDATA[I have a few new reviews of papers on cryptography in my updated page. For those interested in the s]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I have a few new reviews of papers on cryptography in my <a href="http://http://www.surengineering.com/AMS_Reviews.html">updated page</a>. For those interested in the security of NMAC and HMAC or affiliation hiding key exchanges, I recommend reading the reviews. They include links to relevant papers.</p>
<p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a2e8d49b-8e65-47db-bb85-0533f4ab77c5" class="wlWriterEditableSmartContent">del.icio.us Tags: <a href="http://del.icio.us/mario4/authentication" rel="tag">authentication</a>,<a href="http://del.icio.us/mario4/security" rel="tag">security</a>,<a href="http://del.icio.us/mario4/encryption" rel="tag">encryption</a></div></p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
