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

<channel>
	<title>On the road to Bandol</title>
	<atom:link href="http://javacard.vetilles.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://javacard.vetilles.com</link>
	<description>A weblog on Java Card, security, and other things personal</description>
	<lastBuildDate>Mon, 06 Feb 2012 09:47:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>E-smart becomes Chip-to-Cloud</title>
		<link>http://javacard.vetilles.com/2012/02/06/e-smart-becomes-chip-to-cloud/</link>
		<comments>http://javacard.vetilles.com/2012/02/06/e-smart-becomes-chip-to-cloud/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 09:47:54 +0000</pubDate>
		<dc:creator>Eric Vétillard</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[e-Smart]]></category>

		<guid isPermaLink="false">http://javacard.vetilles.com/?p=789</guid>
		<description><![CDATA[After over 10 years, e-Smart is changing its name to become the Chip-to-Cloud Security Forum (which will also replace the other conferences from the Smart Event). This looks like a welcome move from card-centered business to application-centered business, reflecting what is happening in the industry. The technology is now ready, and it has not evolved [...]]]></description>
			<content:encoded><![CDATA[<p>After over 10 years, e-Smart is changing its name to become the <a href="http://www.chip-to-cloud.com/" class="liexternal">Chip-to-Cloud Security Forum</a> (which will also replace the other conferences from the Smart Event). This looks like a welcome move from card-centered business to application-centered business, reflecting what is happening in the industry.</p>
<p>The technology is now ready, and it has not evolved greatly in the past few years. Java Card and GlobalPlatform are mature, widely deployed technologies; many companies are able to develop and deploy cards. Of course, there are a few technical challenges remaining, to keep engineers busy. One of the most challenging tasks is the establishment of trust between the various actors of the industry; today, formal security certification is at the heart of this, but something a bit more innovative will most likely be required here.</p>
<p>The new frontier for cards and secure elements are applications. This is much harder than implementing technology, and requires a lot of innovation. Will we be able to differentiate smart cards from tags? Will we find a room for card applications between basic SIM authentication and TEE applications? Will there at some point be a way to work on this? That&#8217;s the Chip-to-Cloud challenge, and I hope to get a few interesting answers next September.</p>
<p>The <a href="http://www.chip-to-cloud.com/call-for-papers" class="liexternal">Call for Papers</a> is out now, so go ahead, propose things. I am convinced that this conference will remain one of the places where academics, industrial R&#038;D, and technical marketing people are able to meet and exchange. See you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://javacard.vetilles.com/2012/02/06/e-smart-becomes-chip-to-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No memory, no chocolate!</title>
		<link>http://javacard.vetilles.com/2012/01/19/no-memory-no-chocolate/</link>
		<comments>http://javacard.vetilles.com/2012/01/19/no-memory-no-chocolate/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 16:56:11 +0000</pubDate>
		<dc:creator>Eric Vétillard</dc:creator>
				<category><![CDATA[Discussions]]></category>
		<category><![CDATA[Mobile Security]]></category>
		<category><![CDATA[Open issues]]></category>
		<category><![CDATA[eSE]]></category>
		<category><![CDATA[TEE]]></category>

		<guid isPermaLink="false">http://javacard.vetilles.com/?p=786</guid>
		<description><![CDATA[There has been some excitement lately about the fact that more and more phones are now getting embedded SE&#8217;s (eSE&#8217;s), associated to a NFC interface. Some of this excitement came from the ability to manage third-party applications on this embedded SE, as enabled by a whole range of GlobalPlatform specifications, and by the emergence of [...]]]></description>
			<content:encoded><![CDATA[<p>There has been some excitement lately about the fact that more and more phones are now getting embedded SE&#8217;s (eSE&#8217;s), associated to a NFC interface. Some of this excitement came from the ability to manage third-party applications on this embedded SE, as enabled by a whole range of GlobalPlatform specifications, and by the emergence of TSM (Trusted Service Manager) offers.</p>
<p>Just imagine a world where a company can deploy its preferred network security application on all devices, while benefitting from SE-based security, or where innovative ccompanies ccan design security applications that rely on SE applications. Sounds good? Well, too good, because this is just not our world, at least not today.</p>
<p>There is an obvious reason for this: the &#8220;owners&#8221; of these eSE&#8217;s, whether they are phone vendors (Nokia, Samsung, &#8230;), wallet vendors (Google, Isis, &#8230;), or others, are not opening their devices. It is therefore very difficult to load applications on them. The most open environment that I know is in France, with <a href="http://www.afscm.org/en/" class="liexternal">AFSCM</a>, but as far as I know, this is an operator-dominated, SIM-based world, which has a long history of managing resource-constrained SIM cards.</p>
<p>So, why is it different with the relatively new players who own/manage embedded Secure Elements? My gut feeling is that memory limitations are part of the problem, if not the entire problem. If you think of an iPhone, memory is almost infinite: if you are missing memory, simply remove one or two songs out of the 2000 that your phone contains, and it fits. On an eSE, things are different: think of a 64k SE. If it already contains 4 applications, each using 15k of memory, there is no way to add a fifth one. The numbers are here very different, and the choices are much more limited. I don&#8217;t think that many iPhone users ever get to the point where they need to eliminate content that they really need to fit another content that they also really need. On a card, no such luck. And for a platform manager, this is very difficult to deal with, so their priority will be to get their applications on this, or at least the applications that can bring them immeddiate and/or obvious returns.</p>
<p>The problem is very different with a Trusted Execution Environment (TEE). Applications are here stored in the phone&#8217;s main memory, so there is no shortage of memory. This means that, for TEEs, it should not be too hard to actually use app stores or similar infrastructures. For eSE&#8217;s, we will need to work a bit more in order to achieve the same result.</p>
]]></content:encoded>
			<wfw:commentRss>http://javacard.vetilles.com/2012/01/19/no-memory-no-chocolate/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Best wishes and post-holiday rant</title>
		<link>http://javacard.vetilles.com/2012/01/02/best-wishes-and-post-holiday-rant/</link>
		<comments>http://javacard.vetilles.com/2012/01/02/best-wishes-and-post-holiday-rant/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 09:05:46 +0000</pubDate>
		<dc:creator>Eric Vétillard</dc:creator>
				<category><![CDATA[Discussions]]></category>
		<category><![CDATA[VRM]]></category>

		<guid isPermaLink="false">http://javacard.vetilles.com/?p=779</guid>
		<description><![CDATA[First, since this is my first post of the year, let me wish you all the best for 2012, hoping that it will bring a lot of interesting things around mobile security, Java Card, and all these things. My first post will be a rant about something that is very-much holiday-related for me: package deliveries. [...]]]></description>
			<content:encoded><![CDATA[<p>First, since this is my first post of the year, let me wish you all the best for 2012, hoping that it will bring a lot of interesting things around mobile security, Java Card, and all these things.</p>
<p>My first post will be a rant about something that is very-much holiday-related for me: package deliveries. I am a big-time online shopper, which means that I often get deliveries. And of course, during the holiday season, I get a lot of deliveries, from many different vendors.</p>
<p>Until recently, My deliveries were all coming to the office, as this was a local tradition in our Trusted Logic office. However, now, I work in an office with much fewer people, and sometimes from home, so it is not as easy to organize deliveries at the office. So, this holiday season, I got everything shipped at home.</p>
<p>Of course, I live in a closed residence (some code is required to get in), and my postal address allows you to find my mailbox easily, but not necessarily my house (no street numbers). All of this makes me a perfect guinea pig for testing delivery services.</p>
<p>So far, the best service remains the basic Post Office service. They have the key to the mailbox, so they will use it for anything that fits in it. Just great. Of course, if it doesn&#8217;t fit, I have to run to the Post Office and stand in line for a while. Even their express service is worse, because they need a signature. So, if I&#8217;m not home, they will not leave the package, however small, and I&#8217;m back to the Post Office.</p>
<p>With other delivery companies, things get much worse. First, going to the Post Office is not an option, because their &#8220;regional center&#8221; is often 30 or 40 kilometers away. Then, they don&#8217;t have the key to my mailbox, so they won&#8217;t leave a package, however small.</p>
<p>And finally, they call you when they are blocked right in front of a locked gate, or waiting outside your door. Even for me who works close from home, this is not very easy to handle, because we are not always immediately available, and because the guy can&#8217;t wait indefinitely. In the end, the &#8220;express&#8221; package took 24 hours to rush from Hong Kong to Nice, and one full week to get delivered. Not efficient.</p>
<p>So, what&#8217;s missing? Let&#8217;s consider two things:</p>
<ul>
<li>I can&#8217;t manage the delivery. I can track the package, I can know that the delivery guy has started and will try delivering to an empty home, but I can&#8217;t do anything about it.</li>
<li>I can&#8217;t sign off for a delivery when I am not home. So, the guys won&#8217;t leave the package in my mailbox.</li>
</ul>
<p>Now, if we look at both issues, we easily find out that this is a trust issue: delivery companies are not sure of who I am, so they will not trust me. Why so? Because they are not able to associate me to my package when I am at home, in front of them.</p>
<p>This definitely looks like a problem that can be solved. Companies like <a href="https://www.trustfabric.com/connect/" class="liexternal">TrustFabric</a> already allow you to selectively share information with companies. They don&#8217;t support this yet, but there is definitely some information that I would like to share with delivery companies (possibly including a detailed map, GPS coordinates, or whatever may get them to me).</p>
<p>Having this link through a trusted third party also solves the other issue. If I simply associate my TrustFabric account to a public credential (OpenID or similar), I can now login to their site and update the directions for the delivery, to lead them to where I actually am, or to acknowledge the fact that I am allowing them to leave the package in my mailbox without a written signature (a digital one will do).</p>
<p>As TrustFabric and others are getting their offers ready, this is getting closer to reality. Let&#8217;s hope for this new year that they will cover this delivery nightmare, and I will not have to do the same rant.</p>
]]></content:encoded>
			<wfw:commentRss>http://javacard.vetilles.com/2012/01/02/best-wishes-and-post-holiday-rant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google&#8217;s vision of Secure Elements</title>
		<link>http://javacard.vetilles.com/2011/12/30/googles-vision-of-secure-elements/</link>
		<comments>http://javacard.vetilles.com/2011/12/30/googles-vision-of-secure-elements/#comments</comments>
		<pubDate>Fri, 30 Dec 2011 14:35:39 +0000</pubDate>
		<dc:creator>Eric Vétillard</dc:creator>
				<category><![CDATA[Mobile Security]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[mobile payment]]></category>
		<category><![CDATA[Secure Element]]></category>
		<category><![CDATA[wallet]]></category>

		<guid isPermaLink="false">http://javacard.vetilles.com/?p=776</guid>
		<description><![CDATA[Google has launched its Google Wallet service, which uses a secure element in the phone to provide some security. Of course, Java card is in every one of these secure elements, but it is not the point today. I have just stumbled upon the Google Wallet page. Initially, I was looking for information about how [...]]]></description>
			<content:encoded><![CDATA[<p>Google has launched its Google Wallet service, which uses a secure element in the phone to provide some security. Of course, Java card is in every one of these secure elements, but it is not the point today. I have just stumbled upon the <a href="http://www.google.com/wallet/" class="liexternal">Google Wallet page</a>. Initially, I was looking for information about how to load the Google Wallet on my Nexus S during a visit to the U.S. I haven&#8217;t found this information (if you know, I am interested). However, I have found how Google talks about its wallet&#8217;s security.</p>
<p>Here is the sentence that first drew my attention:</p>
<blockquote><p>
<strong>A wallet you can lock</strong>. Stay safe with the Google Wallet PIN and with secure underlying technology.
</p></blockquote>
<p>This started again my love/hate relationship with Google. A wallet you can lock? It&#8217;s just brilliant, far better than anything else I have seen on the same topic. Where do they find these things? Now, let&#8217;s see how the rest fares, from their <a href="http://www.google.com/wallet/how-it-works-security.html" class="liexternal">Security</a> section.</p>
<blockquote><p>Google Wallet stores your encrypted payment card credentials on a computer chip on your phone called the Secure Element.
</p></blockquote>
<p>Sounds good. The Secure Element is explicitly defined as a separate chip. I find it interesting that they feel the need to mention that the credentials are encrypted.</p>
<blockquote><p>Think of the Secure Element as a separate computer, capable of running programs and storing data. The Secure Element is separate from your Android phone&#8217;s memory.
</p></blockquote>
<p>Once again, all of this sounds good. Very nice way to describe a smart card.</p>
<blockquote><p>The chip is designed to only allow trusted programs on the Secure Element itself to access the payment credentials stored therein.
</p></blockquote>
<p>Uh oh! I really recognize my favorite Java Card firewall, isolating applications from each other. But I am a bit disappointed to read that the &#8220;chip&#8221; is designed to support that. Yes, the chip&#8217;s memory can only be accessed from the chip itself; but on the chip, the isolation is software-based.</p>
<p>Next step, the FAQ&#8217;s <a href="http://www.google.com/wallet/faq.html#security-and-privacy" class="liexternal">Security and Privacy</a> section. Among basic questions about lost phones, there are two good questions related to secure elements:</p>
<ul>
<li>What is the Secure Element and how secure is it?</li>
<li>Could a malicious application access my credit card on the Secure Element?</li>
</ul>
<p>You can read the complete answers there. However, here is what should be the most important sentence, since it ends the answers to both questions:</p>
<blockquote><p>
There are multiple levels of protection for data stored on the Secure Element and it is protected at the hardware level from snooping or tampering.
</p></blockquote>
<p>Of course, smart card specialists know about all the terrible attacks hidden behind the &#8220;snooping and tampering&#8221;, and how to protect from them. But the sole mention of data is a bit disappointing.</p>
<p>The answers also mention several times that only the Google Wallet (and other authorized programs) can access the Secure Element, and that this access control is strictly enforced. This is good, and we all like the fact that access control is present.</p>
<p>Now, what&#8217;s missing? You may have guessed it from my &#8220;data only&#8221; disappointment. There is no mention of the fact that the secure element can do more than payment. So, Google, if you are reading this, I will go as far as writing the missing FAQ piece:</p>
<blockquote><p>
<strong>Can I use my Secure Element for protecting other assets?</strong></p>
<p>Your Secure Element is a small but powerful chip, which runs its own applications to manage sensitive data. It can even host several applications, to provide different security-related services. Of course, since the access to the Secure Element is strictly controlled, only authorized developers can write applications for it. We have selected a limited number of partners, who provide applications that rely on the Secure Element to manage their security credentials. These offers include VPN application, secure authentication applications, and much more.
</p></blockquote>
<p>Hoping that it will become useful someday. And if you need more material on Java Card, just let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://javacard.vetilles.com/2011/12/30/googles-vision-of-secure-elements/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My first week at Oracle</title>
		<link>http://javacard.vetilles.com/2011/11/09/my-first-week-at-oracle/</link>
		<comments>http://javacard.vetilles.com/2011/11/09/my-first-week-at-oracle/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 22:12:38 +0000</pubDate>
		<dc:creator>Eric Vétillard</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://javacard.vetilles.com/?p=770</guid>
		<description><![CDATA[The break is over! After a month spent on various family activities, I am back to work. My new job is related to the Product Management of Java Card at Oracle. This is at the same time very close to what I did previously (Java Card has been close to the center of my activities [...]]]></description>
			<content:encoded><![CDATA[<p>The break is over! After a month spent on various family activities, I am back to work. My new job is related to the Product Management of <a href="http://www.oracle.com/technetwork/java/javacard/overview/index.html" class="liexternal">Java Card</a> at Oracle. This is at the same time very close to what I did previously (Java Card has been close to the center of my activities for the past 15 years), and a whole new job, as I am moving to a marketing position.</p>
<p>It is not the first time that I consider joining this team (considering all kinds of positions). It never worked out with Sun, but Oracle offered me the change that I was waiting for at this time. Also, I appreciate the challenge of joining one of the leading Silicon Valley companies, even if I am only remotely connected to the heart of the company.</p>
<p>There are many challenges to be faced. Java Card currently dominates open smart cards, with very high penetration rates. Of course, I will work to make this domination continue, to make Java Card’s success continue in the coming years, and more importantly, to make Java Card the best answer to the challenges faced by the digital security industry.</p>
<p>This should be rather easy, as I still believe after 15 years that the Java Card technology is the best choice for the industry. Those who know me already know that I need to truly believe in what I sell, push, or promote. In the case of Java Card, this definitely is true, so I look forward to my new job with great envy and energy.</p>
<p>I will naturally attend the Cartes show in Paris. So, if you plan to attend, see you there next week. I may be stuck in meeting rooms most of the time, but you can still reach me at firstname . lastname at oracle.com .</p>
<p>Last but not least, I will keep this blog open for now. My bias in favor of Java Card won&#8217;t be really worse than what it already was, and hopefully, I will gain some freedom on other topics, and the tutorial will make a comeback.</p>
]]></content:encoded>
			<wfw:commentRss>http://javacard.vetilles.com/2011/11/09/my-first-week-at-oracle/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Java Card is 15 years old</title>
		<link>http://javacard.vetilles.com/2011/11/05/java-card-is-15-years-old/</link>
		<comments>http://javacard.vetilles.com/2011/11/05/java-card-is-15-years-old/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 22:31:46 +0000</pubDate>
		<dc:creator>Eric Vétillard</dc:creator>
				<category><![CDATA[History]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Java Card]]></category>

		<guid isPermaLink="false">http://javacard.vetilles.com/?p=767</guid>
		<description><![CDATA[I just realized that I missed Java Card&#8217;s 15th birthday. This birthday was sometime in the end of October, 1996. I don&#8217;t have the exact date, because the only document I have is the Java Card API: Specification of the Java Virtual Machine and Application Programmer&#8217;s Interface, version 0.13, dated October 10, 1996. Although this [...]]]></description>
			<content:encoded><![CDATA[<p>I just realized that I missed Java Card&#8217;s 15th birthday. This birthday was sometime in the end of October, 1996. I don&#8217;t have the exact date, because the only document I have is the <em>Java Card API: Specification of the Java Virtual Machine and Application Programmer&#8217;s Interface</em>, version 0.13, dated October 10, 1996.</p>
<p>Although this draft was officially authored by Sun Microsystems, Schlumberger played an important role there. This is why I am quite sure that the spec was released at the end of the month, since one of Schlumberger&#8217;s main patents on the topic was filed on October 25, 19996. The main topic of <a href="http://www.google.com/patents?id=ZrsIAAAAEBAJ" class="liexternal">this patent</a> is to use a high-level language to program a microcontroller, and it claims in particular the transformation of a class file into a more optimized format. Quite a good idea, at least sufficient to include this patent in the <a href="http://www.scribd.com/doc/40113431/Gemalto-sues-Google-HTC-Samsung-and-Motorola" class="liexternal">suit against Google</a>&#8216;s Android (which may be a proof that Android is yet another derivative of Java Card).</p>
<p>Good idea, but everybody trying to fit something on a card was ddoing just the same. The really brilliant idea was not to generate an optimized format, but to believe that it would be possible to start from something as different as Java. This was brilliant at the time, especially since in 1996, Java was definitely not mainstream technology, and was often considered as too expensive or too slow even on a PC. Now, that&#8217;s something for which the guys in Schlumberger can be congratulated.</p>
<p>Of course, they were not the only ones to try fitting unlikely things into a smart card. Researchers in Gemplus were more focused on object oriented technology, in particular Corba. And naturally, they needed to think about optimization in order to fit this into a card. They were  using Forth as their base language for the Combo virtual machine. Even before that, as mentioned in this <a href="http://www.scribd.com/doc/61011453/59/A-Short-History-of-Byte-Code-Interpreters-on-Smart-Cards" class="liexternal">history of bytecode interpreters for smart cards</a>, researchers at RD2P designed a bytecode interpreter, as early as 1990 (I can&#8217;t even imagine the memory sizes of cards at that time; if somebody knows, please leave a comment).</p>
<p>Now, the interesting part is that a patent has been filed in France (sorry, <a href="http://fr.espacenet.com/publicationDetails/biblio?locale=fr_FR&#038;DB=fr.espacenet.com&#038;adjacent=true&#038;locale=fr_FR&#038;return=true&#038;FT=D&#038;date=19920327&#038;CC=FR&#038;NR=2667171A1&#038;KC=A1" class="liexternal">in French only</a>). And one of the key elements of this patent was the fact that the programs are later compiled for the specific embedded  virtual machine.</p>
<p>Not quite Java Card, though, because the patent only mentioned direct compilation from source code, not using an intermediary format (<em>a.k.a.</em> Java class file). The difference is slim, and I would be tempted to credit the French guys with the invention of optimized smart card code. However, there is something that the Schlumberger guys did much better: timing. The French patent, filed in 1990, was never extended into an international patent, whereas the American patent has been extended and mainained to this day.</p>
<p>As a final trivia note, did you smile when I mentioned that Android was a derivative of Java Card? Well, very indirectly, but somehow, a little bit. Java Card, after being initiated by Schlumberger, was maintained by Sun Microsystems. Sun&#8217;s Java Card team later convinced Sun to develop a slightly larger VM, the KVM, to address very small devices. This VM was then extended into MIDP, which became the leading platform for phones. And everybody knows that the Android team includes a number of ex-Sun employees who used to work on MIDP. So, yes, indeed, Android a a distant heir of Java Card.</p>
]]></content:encoded>
			<wfw:commentRss>http://javacard.vetilles.com/2011/11/05/java-card-is-15-years-old/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The misuse of bytecode verification</title>
		<link>http://javacard.vetilles.com/2011/10/19/the-misuse-of-bytecode-verification/</link>
		<comments>http://javacard.vetilles.com/2011/10/19/the-misuse-of-bytecode-verification/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 08:42:21 +0000</pubDate>
		<dc:creator>Eric Vétillard</dc:creator>
				<category><![CDATA[Discussions]]></category>
		<category><![CDATA[Java Card 2.x]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Virtual machine]]></category>
		<category><![CDATA[bytecode]]></category>
		<category><![CDATA[GlobalPlatform]]></category>
		<category><![CDATA[static analysis]]></category>

		<guid isPermaLink="false">http://javacard.vetilles.com/?p=759</guid>
		<description><![CDATA[Bytecode verification has been an interesting debate since the very beginning of Java Card. Back then, in 1997, Java was very much about Java applets, and the bytecode verifier was the essential piece of software that allowed untrusted code to run in a browser efficiently (i.e., without doing expensive runtime checks, and without having to [...]]]></description>
			<content:encoded><![CDATA[<p>Bytecode verification has been an interesting debate since the very beginning of Java Card. Back then, in 1997, Java was very much about Java applets, and the bytecode verifier was the essential piece of software that allowed untrusted code to run in a browser efficiently (<em>i.e.</em>, without doing expensive runtime checks, and without having to setup a complex process of applet vetting). We inherited this view of bytecode verification in Java Card, and the verifier was integrated in the Java Card virtual machine.</p>
<p>Since then, there have been many debates about bytecode verification, and my own position has evolved over the years. Today, my opinion is a bit contrasted, some may even say contradictory. Nevertheless, here it is:</p>
<ul>
<li>Bytecode verification has limited use for Java Card runtime security.</li>
<li>Extended bytecode verification is a very good tool for application vetting.</li>
</ul>
<p>Let me give a few more details about these two opinions.</p>
<h4>Bytecode verification and runtime security</h4>
<p>The idea of runtime verification is that it is performed after getting the code, and right before to run it. The code that runs is therefore known correct, at least regarding bytecode execution (unrelated attacks remain possible, of course).</p>
<p>The first big issue with bytecode verification is that, in Java Card, with the split virtual machine model, verification is not performed on the card, but outside of the card, before/during/after converting the application into Java Card&#8217;s specific binary format (CAP file). Then, the application is sent to the card over some channel that may be attacked. Here, we rely on GlobalPlatform&#8217;s cryptography-based security to protect the integrity of the code. So, basically, we still need to establish trust, and we must say goodbye to the power of running untrusted code from arbitrary developers.</p>
<p>This is not a big issue in practice, because there is no business model that allows arbitrary code to be loaded on cards. However, this causes an organizational problem, as the verification process needs to be well organized. Researchers from Nijmegen and Limoges have shown that it is possible to fool the verification process with fake export files, and then load on a card verified code that will perform type confusion attacks.</p>
<p>Going beyond that, some people have designed applications that can be verified, but have been designed to be attacked through hardware attacks (fault induction, usually). Such attacks, usually known as hybrid attacks, completely fool the bytecode verification process.</p>
<p>Most security experts will then remind you at this point of the discussion that bytecode verification is only one part of the process, that GlobalPlatform is also important, that the origin of code is usually known, that this makes it very difficult to include attack code in an application, <em>etc</em>. By doing this, they are just about accepting the fact that bytecode verification is useless or at best  marginally useful: the real security of cards is in the trust between issuers and application providers, and some cryptographic process. Basically, this works because the ecosystems are small enough to be controlled (which is true for cards, and fine for me).</p>
<p>Finally, some vendors claim to have developed defensive virtual machines, which do not require a bytecode verifier, and perform enough runtime verifications to accept any bytecode, good or bad, without any risk. In that case, bytecode verification is really useless, and I believe that it makes things much simpler. Of course, such virtual machines are difficult to design and implement efficiently, but this is definitely possible, and I think that it has been done in the past (or at least that some people has come very close to it).</p>
<p>To conclude, I will get back many years ago. In 2000, Trusted Logic was very proud of its on-card bytecode verifier; the technology worked, but it has not been widely adopted. I believe that the first factor was performance, as verification made the loading and linking process much slower. I also believe that a second factor, less obvious, is that on-card bytecode verification makes the card&#8217;s security more brittle, by encouraging VM developers to rely too much on static verification rather than runtime checks (which also prevent other runtime attacks, for instance using fault induction). More than ten years later, most people admit that this was not the way to go, and I just go one step further by stating that bytecode verification is not that useful for runtime security.</p>
<h4>Bytecode verification and application vetting</h4>
<p>Bytecode verification simply consists of a very simple static analysis of the application code. Basically, this is is a program proof, but a very simple one, whose complexity can be controlled. The objective of such simple proofs is not to demonstrate that a program is correct with respect to its specification, but that this program obeys a predefined set of properties.</p>
<p>For Java bytecode verification, these properties are related to the proper ues of the bytecode instructions. However, the same algorithms can be extended in order to prove many more properties, covering many aspects of application security. Among the things that can be proven, we have the following:</p>
<ul>
<li>Method <em>M</em> is not called.</li>
<li>Method <em>M</em> is not called with arguments <em>A1</em>, &#8230;, <em>An</em>.</li>
<li>Method <em>M</em> is always called before/after method <em>N</em>.</li>
<li>Method <em>M</em> never throws a <code>NullPointerException</code> (or any other exception).</li>
<li>Command <em>INS</em> can only return status codes <em>SW1</em>, &#8230;, <em>SWn</em></li>
<li>Toolkit buffers are only used when they are available.</li>
<li>and many more.</li>
</ul>
<p>Of course, there is no magic. When extending static analysis to many properties, it becomes more and more difficult to avoid false positives, <em>i.e.</em> errors that are caused by weaknesses in the algorithms. Put simply, an application is rejected although it is in fact correct.</p>
<p>Apart from working on the algorithms to make them better, there are two ways to deal with this issue:</p>
<ul>
<li>Providing the verification tool to developers, together with explanations about the rules to follow. Usually, it is rather simple for developers to ensure that their application can be verified, provided that they can use the tool throughout the development process.</li>
<li>Use the tool in a vetting process as a guide for evaluators, who then perform additional verifications. In that case, broken rules are considered as warnings, and then verified by the evaluators. Simple applications can usually be verified easily, and more complex verification requires a few checks, simplified by the fact that the most boring tasks are performed automatically.</li>
</ul>
<p>I believe in both approaches, but the second one has been proven efficient by my then colleagues of Trusted Labs. By using such a static analysis tool, they are able to optimize the vetting process of Java Card applications (and MIDlets, but this is another story) significantly, by allowing them to focus on the the most important parts of the applications.</p>
<p>In addition, this approach allows us to include many more security rules. For instance, hybrid applications must include code that can be modified into attack code through a simple attack. It is possible to build a library of patterns of such code sequences, and to check for them statically. Then, evaluators can be warned of the possible presence of an hybrid attack and check for it. This can be promising, because such checks (very boring to do, but very unlikely to lead to anything) are usually poorly performed by humans.</p>
<p>Finally, extended bytecode verification, or static analysis, has been proven to be a very efficient optimization tool. All optimizing compilers include a static analysis phase to perform their most complex optimizations. Java Card can take great advantage of this, because of the isolation between applications, and also because of the closed world hypothesis that is sometimes possible, when cards are closed (no additional applications can be downloaded).</p>
<p>So, bytecode verification has many uses in Java Card, but runtime security just isn&#8217;t the most compelling.</p>
]]></content:encoded>
			<wfw:commentRss>http://javacard.vetilles.com/2011/10/19/the-misuse-of-bytecode-verification/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Visting Gemalto in Gémenos</title>
		<link>http://javacard.vetilles.com/2011/10/06/visting-gemalto-in-gemenos/</link>
		<comments>http://javacard.vetilles.com/2011/10/06/visting-gemalto-in-gemenos/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 20:36:08 +0000</pubDate>
		<dc:creator>Eric Vétillard</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[tourism]]></category>

		<guid isPermaLink="false">http://javacard.vetilles.com/?p=715</guid>
		<description><![CDATA[During the past few months, I have very often visited Gemalto in Gémenos or La Ciotat. I didn&#8217;t like it much, since it kept me away from my family. However, although I am very happy right now in Sophia Antipolis and don&#8217;t want to move from there, I was born and raised in Marseille, and [...]]]></description>
			<content:encoded><![CDATA[<p>During the past few months, I have very often visited Gemalto in Gémenos or La Ciotat. I didn&#8217;t like it much, since it kept me away from my family. However, although I am very happy right now in Sophia Antipolis and don&#8217;t want to move from there, I was born and raised in Marseille, and these evenings by myself gave me the opportunity to get back in touch with the nature around it. So, in this post, here are a few tips and tricks about visiting Gemalto in Gémenos. Another post about La Ciotat will follow.</p>
<p>The first thing to know is that it is much better to have a car when you visit Gemalto, because the sites are in industrial zones, and staying there will not be fun at all. I will not cover here the hotels in these areas, because they are way too depressing.</p>
<p><strong>Staying in Gémenos</strong></p>
<p>In Gémenos, the best place to stay by far is the <a href="http://www.hostelleriedelasource.com/" class="liexternal">Hostellerie de la Source</a>. It is a very nice independent hotel, in a wonderful surrounding, and very nice tenants. The pool is very enjoyable, and the conteinental breakfast they offer is just perfect, at least for me. Some may be annoyed by the fact that they don&#8217;t have a restaurant, but I see this more as an opportunity to get out of the place and be active.</p>
<p>If you stay there, there is a restaurant at the entrance of the Gémenos village, <a href="http://www.chezmariusrestaurant.fr/" class="liexternal">Chez Marius</a>. I really liked it, with good, simple meals, and a wide variety to choose from, including grilled meat and pizzas; also, they offer a 25€ 3-course menu that can be fully satisfactory.</p>
<p>Other restaurants that I liked in Gémenos include <a href="http://www.resto.fr/restaurant/g%C3%A9menos/le_clos___pizzeria_grill_13/55614" class="liexternal">Le Clos</a>, on the road from the village to Gemalto, on your left after the schools. A very nice place, with great pizzas. If you take the menu, and especially if you start with a pizza as first course, be ready to leave with a full stomach&#8230; I also tried the Bar Ideal (with a big sign reading &#8220;Goûtez la Provence&#8221;). I am not sure that everything they serve is good, but their aïoli was just great, with snails and mussels in addition to the traditional cod and vegetables. If you don&#8217;t fear garlic, their terrace is a nicce place to be in a spring or summer evening.</p>
<p>If you want to adventure outside of Gémenos, the <a href="http://www.hotel-parc-gemenos.com/" class="liexternal">Hotel du Parc</a> offers a good restaurant (I haven&#8217;t tried the hotel, but the location sure looks nice), with reasonable prices.</p>
<p>Finally, if you are more into luxury, the Relais de la Magdeleine is a very nice restaurant, pricier than the others I have mentioned so far. I haven&#8217;t tried the hotel, but it should be nice.</p>
<p><strong>Hiking around Gémenos</strong></p>
<p>One of my favorite activities around Marseille is to go hiking in the small mountains surrounding the city. If you stay at La Source, you are quite likely to have a straight view into the Garlaban, which is famous (at least in France) for the Marcel Pagnol youth memories. Here is a <a href="http://www.endomondo.com/workouts/pInFPYKMsSE" class="liexternal">hike up the Garlaban</a>. Be careful, because it&#8217;s a bit long, and it took me over two hours of walking. Also, there are a lot of rocks on the trail, so good shoes are a good idea. I did this hike in the evenig of June 21st (the longest day), and ended at night, just in time to go to the Fête de la Musique in Gémenos. The view on top of the Garlaban is just wonderful, and definitely worth the hike.</p>
<p>On the opposite side of Gémenos, there is the Sainte-Baume mountain. It starts with the Vallée de Saint-Pons, which is a wondeful valley, with a small but powerful river in the middle. I did a hike through the valley and started climbing a bit from there. This is a <a href="http://www.endomondo.com/workouts/kisch8-mtSo" class="liexternal">wonderful hike</a>, because itstarts with the lush valley, and then leaves it to climb for a while on the mountains, with the bushes of the <em>maquis</em>.</p>
<p>Another possibility is to drive up the mountain, to get better views. If you follow the road, you will get to the top, and then you can climb up to &#8220;The grotto&#8221; which is a catholic sacred site. I haven&#8217;t done this hike, but it is a really easy climb). Instead, I tried to climb the Pic de Bertagne, which gives its name to the street on which Gemalto is. <a href="http://www.endomondo.com/workouts/kP0ZWTxvJ4Y" class="liexternal">This hike</a> didn&#8217;t turn out well; halfway in the climb, I noticed fresh wild boar traces, heard a few boar noises, and decided that, alone, at dusk, it wasn&#8217;t worth it. I turned around, and climbed of the other side of the pass, to take my picnic sitting on the border of the mountain, which saved the hike. On the way back, I took a look at a path going down on the other side of the mountain, until night got me back. This basically show that, at the Col de l&#8217;Espigoulier, there are many options, and all of them are nice.</p>
<p>I hope that these little suggestions can help a few people have a good time around Gémenos, and enjoy the nature. This area is nice around all seasons, although the end of Spring is a really nice time to visit, especially with the long evenings.</p>
]]></content:encoded>
			<wfw:commentRss>http://javacard.vetilles.com/2011/10/06/visting-gemalto-in-gemenos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hijacking NFC Tags</title>
		<link>http://javacard.vetilles.com/2011/10/05/hijacking-nfc-tags/</link>
		<comments>http://javacard.vetilles.com/2011/10/05/hijacking-nfc-tags/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 08:33:53 +0000</pubDate>
		<dc:creator>Eric Vétillard</dc:creator>
				<category><![CDATA[Discussions]]></category>
		<category><![CDATA[NFC]]></category>
		<category><![CDATA[tag]]></category>

		<guid isPermaLink="false">http://javacard.vetilles.com/?p=748</guid>
		<description><![CDATA[I have been thinking about tags for as a background task for a while, and one of my directions has been to look at the &#8220;hijacking&#8221; of tags. Here, I am not talking of replacing some tags by other tags (for instance pushing toward a competitor of a smart poster&#8217;s rightfful owner), as thie defnitely [...]]]></description>
			<content:encoded><![CDATA[<p>I have been thinking about tags for as a background task for a while, and one of my directions has been to look at the &#8220;hijacking&#8221; of tags. Here, I am not talking of replacing some tags by other tags (for instance pushing toward a competitor of a smart poster&#8217;s rightfful owner), as thie defnitely doesn&#8217;t look like something legit.</p>
<p>Here, the idea is about developing an application that would run on NFC-enabled phone, and that would catch all NFC tag traffic, proposing whatever action the tag was meant to propose, but also proposing alternatives. Here are a few potential uses for it:</p>
<ul>
<li>Propose alternative opinions. For instance, let&#8217;s imagine that a Google tag on a restaurant window redirects you straight to Zagat. This application may offer you some alternatives, like Michelin or Yelp.</li>
<li>Do something else with the tag. For instance, a tag installed by a city on a monument to provide tourist information could be used in an interaactive game. When the user scans the tag, something happens (for instance, some additional information is disclosed).</li>
</ul>
<p>There may be a business model behind such an application, but we must remember that the title of this post include the term &#8220;hijack&#8221;. Using somebody else&#8217;s infrastructure that is left in the open may be acceptable/legal/moral, but if we go too far, I am sure that some countermeasures can be put in place. However, this sounds like an interesting non-commercial project. Here is how I see it:</p>
<ul>
<li>Community project. The open community is required in order to create the alternative content. Without content, this mombile application simply is another indirection when using tags, which is not good.</li>
<li>Linked to other community projects. An obvious link is Wikipedia, which could provide alternative content for all kinds of monuments, public places, <em>etc</em>. But I am sure that there are other projects to draw from. The good thing about this is that it reduces the production of content to linking tags to new URL&#8217;s, which can be much faster than writing the content.</li>
<li>An experiment with tags. What people do with tags today is very boring, and we are expecting more ideas to come. Such a project could be tthe base of a wider experiment based on tags.</li>
</ul>
<p>I am not good at starting/managing developer communities, and I will soon have little time to do this. I have thought about a few things around this, that I would be happy to share with people interested to work on this, but my meager Web development skills have stopped me from starting a real implementation. This thing just sounds like a very nice group project on Mobile Web, with a mobile client, a Web site and database, a sprinkle of NFC for the hype, and much more later. If you&#8217;re interested, please drop me a line, as I would like to keep a (distant) eye on such a project.</p>
]]></content:encoded>
			<wfw:commentRss>http://javacard.vetilles.com/2011/10/05/hijacking-nfc-tags/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Open Source, GlobalPlatform, and Java Card</title>
		<link>http://javacard.vetilles.com/2011/10/05/open-source-globalplatform-and-java-card/</link>
		<comments>http://javacard.vetilles.com/2011/10/05/open-source-globalplatform-and-java-card/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 06:32:32 +0000</pubDate>
		<dc:creator>Eric Vétillard</dc:creator>
				<category><![CDATA[Discussions]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Open issues]]></category>
		<category><![CDATA[GlobalPlatform]]></category>
		<category><![CDATA[Java Card]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://javacard.vetilles.com/?p=741</guid>
		<description><![CDATA[The two concepts of open source and smart cards have not gone well together. There are some projects about specific applications and corresponding terminal-side software, such as the Muscle project for Linux, and the JMRTD library for e-passports (if you have one that you want me to mention, let me know). However, there are really [...]]]></description>
			<content:encoded><![CDATA[<p>The two concepts of open source and smart cards have not gone well together. There are some projects about specific applications and corresponding terminal-side software, such as the <a href="http://www.musclecard.com/" class="liexternal">Muscle</a> project for Linux, and the <a href="http://jmrtd.org/" class="liexternal">JMRTD</a> library for e-passports (if you have one that you want me to mention, let me know).</p>
<p>However, there are really few open source developments in the area of smart card operating systems and runtime environments. This is why the recent release of the <a href="http://secinfo.msi.unilim.fr/opal/" class="liexternal">OPAL</a> library by the University of Limoges is significant. This library offers a client-side implementation of the latest GlobalPlatform specifications, greatly simplifying the development of applications that manage applications on smart cards.</p>
<p>In particular, this development could be the basis for interoperable and open smart card testing tools. For instance, the <a href="http://mesure.gforge.inria.fr/" class="liexternal">Mesure</a> project, which defines benchmarks for Java Card, could use an open and complete GlobalPlatform implementation.</p>
<p>Now, can we go further than that? Is it possible to really get into the smart cards, and have open source operating systems, or parts of operating systems? Well, there are a few good reasons not to do it:</p>
<ul>
<li><strong>Licenses</strong>. The specificatoins like GlobalPlatform and Java Card are free to access, but after going through a click-wrap license, including some restrictions. For GlobalPlatform, the restricions are limited, mostly because GlobalPlatform is a community effort, and both the license to use the specification and to sell products bassed on it are free. The Java Card license is more restrictive, because it is owned by Oracle. Java Card is free for developers, but implementers need to pay a license.</li>
<li><strong>IP rights</strong>. The smart card industry is highly competitive, and has not always been very open source-friendly in the past. There are literally thousands of patents that have been filed on the technology, and it is hard not to infringe on any of them while writing a smart card operating system. Companies don&#8217;t have to enforce their IP, but they can, which means that any open source project is in under a constant threat.</li>
<li><strong>Security</strong>. This argument may not be as strong, but the smart card security community is very well organized, with manufacturers, labs, national authorities, <em>etc</em>. They have developed a significant set of documentation and guidelines aound Common Criteria certifications of cards, which is one of the best industry efforts available today. The industry may not be eager to see an active open-source community working on attacks and countermeasures in parallel to their own efforts. And if they are not happy, they may activate the <em>IP rights</em> argument.</li>
</ul>
<p>Of course, there is here a difference between academic projects and industrial projects. Consider Simulity&#8217;s <a href="http://dkard.org/" class="liexternal">DKard</a> project, a microcontroller (<em>i.e.</em>, smart card) virtual machine based on Android&#8217;s Dalvik VM. Google may have published Android as an open-source project (we can assume that the spec lcense part is covered), but this doesn&#8217;t make them safe from IP rights. If they start encountering the slightest success, somebody will remember that they infringe on their IP; and since this somebody is likely to be much larger than Simulity, this is not good news.</p>
<p>From my point of view, we can close the industrial part. It would be foolish to start a company with a business model based on open source software for smart card operating systems, unless it is strongly backed by at least one major manufacturer, with the ability to protect the small player from IP claims by competitors.</p>
<p>Now, we are left with the academic projects. There is an active research community around smart cards, focusing in particular on security aspects, particularly in Europe. One of the main problems faced by this community is that they don&#8217;t have a good playground: there is no open smart card operating system platform on which they can experiment.</p>
<p>Card vendors are not too keen to see academics use their products for experiments and attacks, because they don&#8217;t want to see publications claiming that their card was broken. As a consequence, card development kits usually come with licenses and non disclosure agreements that do not allow the use of the cards for research purposes.</p>
<p>The &#8220;obvious&#8221; solution is to develop an open source platform, just for research purposes. But then, we get back to the licenses and IP and everything. There are several choices, every one with pros and cons:</p>
<ul>
<li><strong>Implement Java Card</strong>. Here, a conflict is likely with the industry, especially if the implementation is good and can help outsiders develop/enhance their products.</li>
<li><strong>Implement something else</strong>. This could work, but the difficulty is to find the right balance between mimicking Java Card and differentiating from the spec.</li>
</ul>
<p>I don&#8217;t believe that the solution is ready here. Without industry support, getting funding for the research will likely be difficult. And the industry players may not look forward to sueing a few academic institutions. In the end, the stakeholderes need to talk to each other, really looking for a solution that suits everybody. This discussion never really took place in the past, let&#8217;s hope that it will happen some day, so we can at least remember that we tried.</p>
<p>Thoughts and remarks welcome, as comments or direct contact.</p>
]]></content:encoded>
			<wfw:commentRss>http://javacard.vetilles.com/2011/10/05/open-source-globalplatform-and-java-card/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

