<?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>KaKaRoTo&#039;s Blog &#187; collabora</title>
	<atom:link href="http://kakaroto.homelinux.net/tag/collabora/feed/" rel="self" type="application/rss+xml" />
	<link>http://kakaroto.homelinux.net</link>
	<description>Open your communications!</description>
	<lastBuildDate>Fri, 16 Mar 2012 21:02:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How the ECDSA algorithm works</title>
		<link>http://kakaroto.homelinux.net/2012/01/how-the-ecdsa-algorithm-works/</link>
		<comments>http://kakaroto.homelinux.net/2012/01/how-the-ecdsa-algorithm-works/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 02:05:07 +0000</pubDate>
		<dc:creator>kakaroto</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PS3]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[ecdsa]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[jailbreak]]></category>
		<category><![CDATA[mathematics]]></category>

		<guid isPermaLink="false">http://kakaroto.homelinux.net/?p=462</guid>
		<description><![CDATA[To popular demand, I have decided to try and explain how the ECDSA algorithm works. I&#8217;ve been struggling a bit to understand it properly and while I found a lot of documentation about it, I haven&#8217;t really found any &#8220;ECDSA for newbies&#8221; anywhere. So I thought it would be good to explain in simple terms [...]]]></description>
			<content:encoded><![CDATA[<p>To popular demand, I have decided to try and explain how the <a href="http://en.wikipedia.org/wiki/ECDSA">ECDSA</a> algorithm works. I&#8217;ve been struggling a bit to understand it properly and while I found a lot of documentation about it, I haven&#8217;t really found any &#8220;ECDSA for newbies&#8221; anywhere. So I thought it would be good to explain in simple terms how it works so others can learn from my research. I have found some websites that explain the basic principles but nowhere near enough to actually understand it, others that explains things without any basics, making it incomprehensible, and others that go way too deep into the the mathematics behind it.</p>
<p>ECDSA stands for &#8220;Elliptic Curve Digital Signature Algorithm&#8221;, it&#8217;s used to create a <a href="http://en.wikipedia.org/wiki/Digital_signature">digital signature</a> of data (a file for example) in order to allow you to verify its authenticity without compromising its security. Think of it like a real signature, you can recognize someone&#8217;s signature, but you can&#8217;t forge it without others knowing. The ECDSA algorithm is basically all about mathematics.. so I think it&#8217;s important to start by saying : &#8220;hey kids, don&#8217;t slack off at school, listen to your teachers, that stuff might be useful for you some day!&#8221; <img src='http://kakaroto.homelinux.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  But these maths are fairly complicated, so while I&#8217;ll try to vulgarize it and make it understandable for non technical people, you will still probably need some knowledge in mathematics to understand it properly. I will do this in two parts, one that is a sort of high level explanation about how it works, and another where I dig deeper into its inner workings to complete your understanding. Note however that I&#8217;ve just recently learned this stuff, so I&#8217;m definitely not an expert on the matter.</p>
<p>So the principle is simple, you have a mathematical equation which draws a curve on a graph, and you choose a random point on that curve and consider that your point of origin. Then you generate a random number, this is your private key, you do some magical mathematical equation using that random number and that &#8220;point of origin&#8221; and you get a second point on the curve, that&#8217;s your public key. When you want to sign a file, you will use this private key (the random number) with a hash of the file (a unique number to represent the file) into a magical equation and that will give you your signature. The signature itself is divided into two parts, called <em><strong>R</strong></em> and <em><strong>S</strong></em>. In order to verify that the signature is correct, you only need the public key (that point on the curve that was generated using the private key) and you put that into another magical equation with one part of the signature (<em><strong>S</strong></em>), and if it was signed correctly using the the private key, it will give you the other part of the signature (<em><strong>R</strong></em>). So to make it short, a signature consists of two numbers, <em><strong>R</strong></em> and <em><strong>S</strong></em>, and you use a private key to generate <em><strong>R</strong></em> and <em><strong>S</strong></em>, and if a mathematical equation using the public key and <em><strong>S</strong></em> gives you <em><strong>R</strong></em>, then the signature is valid. There is no way to know the private key or to create a signature using only the public key.</p>
<p>Alright, now for the more in depth understanding, I suggest you take an aspirin right now as this might hurt! <img src='http://kakaroto.homelinux.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Let&#8217;s start with the basics (which may be boring for people who know about it, but is mandatory for those who don&#8217;t) : ECDSA uses only integer mathematics, there are no floating points (this means possible values are 1, 2, 3, etc.. but not 1.5..),  also, the range of the numbers is bound by how many bits are used in the signature (more bits means higher numbers, means more security as it becomes harder to &#8216;guess&#8217; the critical numbers used in the equation), as you should know, computers use &#8216;bits&#8217; to represent data, a bit is a &#8216;digit&#8217; in binary notation (0 and 1) and 8 bits represent one byte. Every time you add one bit, the maximum number that can be represented doubles, with 4 bits you can represent values 0 to 15 (for a total of 16 possible values), with 5 bits, you can represent 32 values, with 6 bits, you can represent 64 values, etc.. one byte (8 bits) can represent 256 values, and 32 bits can represent 4294967296 values (4 Giga).. Usually ECDSA will use 160 bits total, so that makes&#8230; well, a very huge number with 49 digits in it&#8230;</p>
<p><a href="http://en.wikipedia.org/wiki/ECDSA">ECDSA</a> is used with a <a href="http://en.wikipedia.org/wiki/Sha1">SHA1</a> <a href="http://en.wikipedia.org/wiki/Cryptographic_hash_function">cryptographic hash</a> of the message to sign (the file). A <a href="http://en.wikipedia.org/wiki/Hash_function">hash</a> is simply another mathematical equation that you apply on every byte of data which will give you a number that is unique to your data. Like for example, the sum of the values of all bytes may be considered a very dumb hash function. So if anything changes in the message (the file) then the hash will be completely different. In the case of the SHA1 hash algorithm, it will always be 20 bytes (160 bits). It&#8217;s very useful to validate that a file has not been modified or corrupted, you get the 20 bytes hash for a file of any size, and you can easily recalculate that hash to make sure it matches. What ECDSA signs is actually that hash, so if the data changes, the hash changes, and the signature isn&#8217;t valid anymore.</p>
<p>Now, how does it work? Well <a href="http://en.wikipedia.org/wiki/Elliptic_curve_cryptography">Elliptic Curve cryptography</a> is based on an equation of the form :</p>
<p style="text-align: center;"><em><strong>y^2 = (x^3 + a * x + b) mod p</strong></em></p>
<p>First thing you notice is that there is a modulo and that the &#8216;<em><strong>y</strong></em>&#8216; is a square. This means that for any <em><strong>x</strong></em> coordinate, you will have two values of <em><strong>y</strong></em> and that the curve is symmetric on the <em>X axis</em>. The modulo is a prime number and makes sure that all the values are within our range of 160 bits and it allows the use of &#8220;<a href="http://en.wikipedia.org/wiki/Modular_square_root">modular square root</a>&#8221; and &#8220;<a href="http://en.wikipedia.org/wiki/Modular_multiplicative_inverse">modular multiplicative inverse</a>&#8221; mathematics which make calculating stuff easier (I think). Since we have a modulo (<em><strong>p</strong></em>) , it means that the possible values of <em><strong>y^2</strong></em> are between  0 and <em><strong>p</strong></em>-1, which gives us <em><strong>p</strong></em> total possible values. However, since we are dealing with integers, only a smaller subset of those values will be a &#8220;<a href="http://en.wikipedia.org/wiki/Square_number">perfect square</a>&#8221; (the square value of two integers), which gives us <em><strong>N</strong></em> possible points on the curve where <em><strong>N &lt; p</strong></em> (<em><strong>N</strong></em> being the number of perfect squares between 0 and<em><strong> p</strong></em>). Since each <strong><em>x </em></strong>will yield two points (positive and negative values of the square-root of <em><strong>y^2</strong></em>), this means that there are <em><strong>N/2</strong></em> possible &#8216;<em><strong>x</strong></em>&#8216; coordinates that are valid and that give a point on the curve. So this elliptic curve has a finite number of points on it, and it&#8217;s all because of the integer calculations and the modulus. Another thing you need to know about <a href="http://en.wikipedia.org/wiki/Elliptic_curve">Elliptic curves</a>, is the notion of &#8220;<a href="http://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication">point addition</a>&#8220;. It is defined as adding one point <em><strong>P</strong></em> to another point <em><strong>Q</strong></em> will lead to a point <em><strong>S</strong></em> such that if you draw a line from <em><strong>P</strong></em> to <em><strong>Q</strong></em>, it will intersect the curve on a third point <em><strong>R</strong></em> which is the negative value of <em><strong>S</strong></em> (remember that the curve is symmetric on the <em>X axis</em>). In this case, we define <em><strong>R = -S</strong></em> to represent the symmetrical point of <em><strong>R</strong></em> on the <em>X axis</em>. This is easier to illustrate with an image :<a href="http://kakaroto.homelinux.net/wp-content/uploads/2012/01/ecdsa1.png"><img class="aligncenter size-medium wp-image-465" title="ecdsa1" src="http://kakaroto.homelinux.net/wp-content/uploads/2012/01/ecdsa1-300x251.png" alt="" width="300" height="251" /></a> So you can see a curve of the form <em><strong>y^2 = x^3 + ax + b</strong></em> (where <em><strong>a = -4</strong></em> and <em><strong>b = 0</strong></em>), which is symmetric on the <em>X axis</em>, and where <em><strong>P+Q</strong></em> is the symmetrical point through <em>X</em> of the point <em><strong>R</strong></em> which is the third intersection of a line going from <em><strong>P</strong></em> to <em><strong>Q</strong></em>. In the same manner, if you do <em><strong>P + P</strong></em>,  it will be the symmetrical point of <em><strong>R</strong></em> which is the intersection of the line that is a tangent to the point <em><strong>P</strong></em>.. And <em><strong>P + P + P</strong></em> is the addition between the resulting point of <em><strong>P+P</strong></em> with the point <em><strong>P</strong></em> since <strong><em>P + P + P</em></strong> can be written as <strong><em>(P+P) + P</em></strong>.. This defines the &#8220;<a href="http://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication">point multiplication</a>&#8221; where <em><strong>k*P</strong></em> is the addition of the point <em><strong>P</strong></em> to itself <em><strong>k</strong></em> times&#8230; here are two examples showing this : <a href="http://kakaroto.homelinux.net/wp-content/uploads/2012/01/ecdsa3.png"><img class="aligncenter size-medium wp-image-470" title="ecdsa3" src="http://kakaroto.homelinux.net/wp-content/uploads/2012/01/ecdsa3-300x242.png" alt="" width="300" height="242" /></a> <a href="http://kakaroto.homelinux.net/wp-content/uploads/2012/01/ecdsa4.png"><img class="aligncenter size-medium wp-image-471" title="ecdsa4" src="http://kakaroto.homelinux.net/wp-content/uploads/2012/01/ecdsa4-300x235.png" alt="" width="300" height="235" /></a></p>
<p style="text-align: left;">Here, you can see two elliptic curves, and a point <em><strong>P</strong></em> from which you draw the tangent, it intersects the curve with a third point, and its symmetric point it <em><strong>2P</strong></em>, then from there, you draw a line from <em><strong>2P</strong></em> and <em><strong>P</strong></em> and it will intersect the curve, and the symmetrical point is <em><strong>3P</strong></em>. etc&#8230; you can keep doing that for the point multiplication. You can also already guess why you need to take the symmetric point of <strong><em>R</em></strong> when doing the addition, otherwise, multiple additions of the same point will always give the same line and the same three intersections.</p>
<p style="text-align: left;">One particularity of this point multiplication is that if you have a point <em><strong>R = k*P</strong></em>, where you know <em><strong>R</strong></em> and you know <em><strong>P</strong></em>, there is no way to find out what the value of &#8216;<em><strong>k</strong></em>&#8216; is. Since there is no point subtraction or point division, you cannot just resolve <em><strong>k = R/P</strong></em>. Also, since you could be doing millions of  point additions, you will just end up on another point on the curve, and you&#8217;d have no way of knowing &#8220;how&#8221; you got there. You can&#8217;t reverse this operation, and you can&#8217;t find the value &#8216;<em><strong>k</strong></em>&#8216; which was multiplied with your point <em><strong>P</strong></em> to give you the resulting point <em><strong>R</strong></em>.</p>
<p style="text-align: left;">This thing where you can&#8217;t find the multiplicand even when you know the original and destination points is the whole basis of the security behind the ECDSA algorithm, and the principle is called a &#8220;<a href="http://en.wikipedia.org/wiki/Trap_door_function">trap door function</a>&#8220;.</p>
<p style="text-align: left;">Now that we&#8217;ve handled the &#8220;basics&#8221;, let&#8217;s talk about the actual ECDSA signature algorithm. For ECDSA, you first need to know your curve parameters, those are <em><strong>a, b, p, N</strong></em> and <em><strong>G</strong></em>. You already know that &#8216;<em><strong>a</strong></em>&#8216; and &#8216;<em><strong>b</strong></em>&#8216; are the parameters of the curve function (<em><strong>y^2 = x^3 + ax + b</strong></em>), that &#8216;<em><strong>p</strong></em>&#8216; is the prime modulus,  and that &#8216;<em><strong>N</strong></em>&#8216; is the number of points of the curve, but there is also &#8216;<em><strong>G</strong></em>&#8216; that is needed for ECDSA, and it represents a &#8216;reference point&#8217; or a point of origin if you prefer. Those curve parameters are important and without knowing them, you obviously can&#8217;t sign or verify a signature. Yes, verifying a signature isn&#8217;t just about knowing the public key, you also need to know the curve parameters for which this public key is derived from.</p>
<p style="text-align: left;">So first of all, you will have a private and a public key.. the private key is a random number (of 20 bytes) that is generated, and the public key is a point on the curve generated from the point multiplication of <em><strong>G</strong></em> with the private key. We set &#8216;<em><strong>dA</strong></em>&#8216; as the private key (random number) and &#8216;<em><strong>Qa</strong></em>&#8216; as the public key (a point), so we have : <em><strong>Qa = dA * G</strong></em> (where <em><strong>G</strong></em> is the point of reference in the curve parameters).</p>
<p style="text-align: left;">So how do you sign a file/message ? First, you need to know that the signature is 40 bytes and is represented by two values of 20 bytes each, the first one is called <em><strong>R</strong></em> and the second one is called <em><strong>S</strong></em>.. so the pair <em><strong>(R, S)</strong></em> together is your ECDSA signature.. now here&#8217;s how you can create those two values in order to sign a file.. first you must generate a random value &#8216;<em><strong>k</strong></em>&#8216; (of 20 byes), and use point multiplication to calculate the point <em><strong>P=k*G</strong></em>. That point&#8217;s <em><strong>x</strong></em> value will represent &#8216;<em><strong>R</strong></em>&#8216;. Since the point on the curve <em><strong>P</strong></em> is represented by its <em><strong>(x, y)</strong></em> coordinates (each being 20 bytes long), you only need the &#8216;<em><strong>x</strong></em>&#8216; value (20 bytes) for the signature, and that value will be called &#8216;<em><strong>R</strong></em>&#8216;. Now all you need is the &#8216;<em><strong>S</strong></em>&#8216; value.</p>
<p style="text-align: left;">To calculate <em><strong>S</strong></em>, you must make a SHA1 hash of the message, this gives you a 20 bytes value that you will consider as a very huge integer number and we&#8217;ll call it &#8216;<em><strong>z</strong></em>&#8216;. Now you can calculate <em><strong>S</strong></em> using the equation :</p>
<p style="text-align: center;"><em><strong>S = k^-1 (z + dA * R) mod p</strong></em></p>
<p style="text-align: left;">Note here the <em><strong>k^-1</strong></em> which is the &#8216;<em><a href="http://en.wikipedia.org/wiki/Modular_multiplicative_inverse">modular multiplicative inverse</a></em>&#8216; of <em><strong>k</strong></em>&#8230; it&#8217;s basically the inverse of <em><strong>k</strong></em>, but since we are dealing with integer numbers, then that&#8217;s not possible, so it&#8217;s a number such that <em><strong>(k^-1 * k ) mod p</strong></em> is equal to 1. And again, I remind you that <em><strong>k</strong></em> is the random number used to generate <em><strong>R</strong></em>, <em><strong>z</strong></em> is the hash of the message to sign, <em><strong>dA</strong></em> is the private key and <em><strong>R</strong></em> is the <em><strong>x</strong></em> coordinate of <em><strong>k*G</strong></em> (where <em><strong>G</strong></em> is the point of origin of the curve parameters).</p>
<p style="text-align: left;">Now that you have your signature, you want to verify it, it&#8217;s also quite simple, and you only need the public key (and curve parameters of course) to do that. You use this equation to calculate a point <strong><em>P</em></strong> :</p>
<p style="text-align: center;"><em><strong>P=  S^-1*z*G + S^-1 * R * Qa</strong></em></p>
<p style="text-align: left;">If the <em><strong>x</strong></em> coordinate of the point <em><strong>P</strong></em> is equal to <em><strong>R</strong></em>, that means that the signature is valid, otherwise it&#8217;s not.</p>
<p style="text-align: left;">Pretty simple, huh? now let&#8217;s see why and how&#8230; and this is going to require some mathematics to verify :</p>
<p style="text-align: left;">We have :</p>
<p style="text-align: left;"><em><strong>P = S^-1*z*G + S^-1 * R *Qa</strong></em></p>
<p style="text-align: left;">but <em><strong>Qa = dA*G</strong></em>, so:</p>
<p style="text-align: left;"><em><strong>P = S^-1*z*G + S^-1 * R * dA*G = S^-1 (z + dA* R) * G</strong></em></p>
<p style="text-align: left;">But the <strong><em>x</em></strong> coordinate of <em><strong>P</strong></em> must match <em><strong>R</strong></em> and <em><strong>R</strong></em> is the <em><strong>x</strong></em> coordinate of <em><strong>k * G</strong></em>, which means that :</p>
<p style="text-align: left;"><em><strong>k*G = S^-1 (z + dA * R) *G</strong></em></p>
<p style="text-align: left;">we can simplify by removing <em><strong>G</strong></em> which gives us :</p>
<p style="text-align: left;"><em><strong>k = S^-1(z + dA * R)</strong></em></p>
<p style="text-align: left;">by inverting <em><strong>k</strong></em> and <strong><em>S</em></strong>, we get :</p>
<p style="text-align: left;"><em><strong>S = k^-1 (z + dA *R)</strong></em></p>
<p style="text-align: left;">and that is the equation used to generate the signature.. so it matches, and that is the reason why you can verify the signature with it.</p>
<p style="text-align: left;">You can note that you need both &#8216;<em><strong>k</strong></em>&#8216; (random number) and &#8216;<em><strong>dA</strong></em>&#8216; (the private key) in order to calculate <em><strong>S</strong></em>, but you only need <em><strong>R</strong></em> and <em><strong>Qa</strong></em> (public key) to validate the signature. And since <em><strong>R=k*G </strong></em>and<strong></strong><em><strong> Qa = dA*G</strong></em> and because of the trap door function in the ECDSA point multiplication (explained above), we cannot calculate <em><strong>dA</strong></em> or <em><strong>k</strong></em> from knowing <em><strong>Qa</strong></em> and <em><strong>R</strong></em>, this makes the ECDSA algorithm secure, there is no way of finding the private keys, and there is no way of faking a signature without knowing the private key.</p>
<p style="text-align: left;">The ECDSA algorithm is used everywhere and has not been cracked and it is a vital part of most of today&#8217;s security.</p>
<p style="text-align: left;">Now I&#8217;ll discuss on how and why the ECDSA signatures that Sony  used in the PS3 were faulty and how it allowed us to gain access to their private key.</p>
<p style="text-align: left;">So you remember the equations needed to generate a signature.. <em><strong>R = k*G</strong></em> and <em><strong>S= k^-1(z + dA*R) mod p</strong></em>.. well this equation&#8217;s strength is in the fact that you have one equation with two unknowns (<em><strong>k</strong></em> and <em><strong>dA</strong></em>) so there is no way to determine either one of those. However, the security of the algorithm is based on its implementation and it&#8217;s important to make sure that &#8216;<em><strong>k</strong></em>&#8216; is randomly generated and that there is no way that someone can guess, calculate, or use a timing attack or any other type of attack in order to find the random value &#8216;<em><strong>k</strong></em>&#8216;. But Sony made a huge mistake in their implementation, they used the same value for &#8216;<em><strong>k</strong></em>&#8216; everywhere, which means that if you have two signatures, both with the same <em><strong>k</strong></em>, then they will both have the same <em><strong>R</strong></em> value, and it means that you can calculate <em><strong>k</strong></em> using two <em><strong>S</strong></em> signatures of two files with hashes <em><strong>z</strong></em> and <em><strong>z&#8217;</strong></em> and signatures <em><strong>S</strong></em> and <em><strong>S&#8217;</strong></em> respectively :</p>
<p style="text-align: left;"><em><strong>S &#8211; S&#8217; = k^-1 (z + dA*R) &#8211; k^-1 (z&#8217; + da*R) = k^-1 (z + da*R &#8211; z&#8217; -dA*R) = k^-1 (z &#8211; z&#8217;)</strong></em></p>
<p style="text-align: left;">So : <em><strong>k = (z &#8211; z&#8217;) / (S &#8211; S&#8217;)</strong></em></p>
<p style="text-align: left;">Once you know <em><strong>k</strong></em>, then the equation  for <em><strong>S</strong></em> because one equation with one unknown and is then easily resolved for <em><strong>dA</strong></em> :</p>
<p style="text-align: left;"><em><strong>dA = (S*k &#8211; z) / R</strong></em></p>
<p style="text-align: left;">Once you know the private key <em><strong>dA</strong></em>, you can now sign your files and the PS3 will recognize it as an authentic file signed by Sony. This is why it&#8217;s important to make sure that the random number used for generating the signature is actually &#8220;cryptographically random&#8221;.  This is also the reason why it is impossible to have a custom firmware above 3.56, simply because since the 3.56 version, Sony have fixed their ECDSA algorithm implementation and used new keys for which it is impossible to find the private key.. if there was a way to find that key, then the security of every computer, website, system may be compromised since a lot of systems are relying on ECDSA for their security, and it is impossible to crack.</p>
<p style="text-align: left;">Finally! I hope this makes the whole algorithm clearer to many of you.. I know that this is still very complicated and hard to understand. I usually try to make things easy to understand for non technical people, but this algorithm is too complex to be able to explain in any simpler terms. After all that&#8217;s why I prefer to call it the MFET algorithm (Mathematics For Extra Terrestrials) <img src='http://kakaroto.homelinux.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: left;">But if you are a developer or a mathematician or someone interested in learning about this because you want to help or simple gain knowledge, then I&#8217;m sure that this contains enough information for you to get started or to at least understand the concept behind this unknown beast called &#8220;ECDSA&#8221;.</p>
<p style="text-align: left;">That being said, I&#8217;d like to thank a few people who helped me understand all of this, one particularly who wishes to remain anonymous, as well as the many wikipedia pages I linked to throughout this article, and Avi Kak thanks to <a href="https://engineering.purdue.edu/kak/compsec/NewLectures/Lecture14.pdf">his paper</a> explaining the mathematics behind ECDSA, and from which I have taken those graph images aboves.</p>
<p style="text-align: left;">P.s: In this article, I used &#8217;20 bytes&#8217; in my text to talk about the ECDSA signature because that&#8217;s what is usually used as it matches the SHA1 hash size of 20 bytes and that&#8217;s what the PS3 security uses, but the algorithm itself can be used with any size of numbers. There may be other inaccuracies in this article, but like I said, I&#8217;m not an expert, I just barely learned all of this in the past week.</p>
]]></content:encoded>
			<wfw:commentRss>http://kakaroto.homelinux.net/2012/01/how-the-ecdsa-algorithm-works/feed/</wfw:commentRss>
		<slash:comments>158</slash:comments>
		</item>
		<item>
		<title>GstFilters library released!</title>
		<link>http://kakaroto.homelinux.net/2011/12/gstfilters-library-released/</link>
		<comments>http://kakaroto.homelinux.net/2011/12/gstfilters-library-released/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 00:59:59 +0000</pubDate>
		<dc:creator>kakaroto</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Farsight]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[farsight]]></category>
		<category><![CDATA[farsight-utils]]></category>
		<category><![CDATA[farstream]]></category>
		<category><![CDATA[fsio]]></category>
		<category><![CDATA[fsu]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gstfilters]]></category>
		<category><![CDATA[gstreamer]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://kakaroto.homelinux.net/?p=445</guid>
		<description><![CDATA[After the various blog posts about it, and the talk I gave at the GStreamer Conference, there was a lot of interest in the GstFilters library that I&#8217;ve been working on. The original plan was for it to get merged into gst-plugins-base, however, it seems like that&#8217;s not going to happen. The GStreamer developers would [...]]]></description>
			<content:encoded><![CDATA[<p>After the <a href="http://kakaroto.homelinux.net/2010/08/fsu-gstreamer-made-simple/">various</a> <a href="http://kakaroto.homelinux.net/2010/10/gstreamer-gstfilters-to-be-merged-into-gst-plugins-base/">blog</a> <a href="http://kakaroto.homelinux.net/2011/11/gstreamer-conference-2011-videos/">posts</a> about it, and the <a href="http://gstconf.ubicast.tv/videos/gstreamer-and-farsight/">talk</a> I gave at the <a href="http://gstreamer.freedesktop.org/conference/">GStreamer Conference</a>, there was a lot of interest in the <a href="http://www.freedesktop.org/wiki/Software/GstFilters">GstFilters</a> library that I&#8217;ve been working on. The original plan was for it to get merged into gst-plugins-base, however, it seems like that&#8217;s not going to happen. The <a href="http://gstreamer.net">GStreamer</a> developers would prefer seeing some of its features integrated into the core, but they don&#8217;t want the library itself. So I have finally decided to release it as a standalone package so everyone interested can already start using it.</p>
<p>As features from GstFilters will slowly get merged into the core of GStreamer, I will adapt the library to make use of these new features, reducing its internal code. However I believe it is still very useful to have Gstfilters as it&#8217;s a very simple library for those who are not familiar with GStreamer. Also the concept of the &#8216;filters&#8217; is very different from the GstElements because an element can only be added once in a pipeline but filters can be added any number of times in a pipeline (a GstFilter doesn&#8217;t represent an actual element, it&#8217;s more like a helper function for &#8220;create and link these elements for me&#8221;). Also the points I&#8217;ve made about the steep learning curve and the robustness checks will still be valid even after the Gst core makes dynamic pipeline modifications easier.</p>
<p>GstFilters are now released and will be hosted on <a href="http://freedesktop.org">freedesktop.org</a> under <a href="http://www.freedesktop.org/wiki/Software/Farstream">Farstream&#8217;s</a> project. While Farstream users will be the most interested in this library and it is very useful for VoIP/Farstream users, it can also be used for non VoIP applications.</p>
<p>On a similar note, the Farsight-Utils library and API that I presented at the GStreamer Conference has been modified to make it even simpler. The library has been renamed into Farstream-IO since it basically takes care of all the Input/Output to the Farstream conference. The new API is based on a single object now, a FsIoPipeline that you create (which is a subclass of GstPipeline) and to which you register the FsConference/FsSession/FsStream. All the methods from the previous Farsight-Utils classes (FsuConference, FsuSession and FsuStream) will stay the same but will be merged into this single FsIoPipeline class, making everything easier and you&#8217;d only need to keep track of a single object.</p>
<p>The FsIo API will be merged into Farstream and released for the next version.</p>
<p>Here is the link to the new GstFilters page : <a href="http://www.freedesktop.org/wiki/Software/GstFilters">http://www.freedesktop.org/wiki/Software/GstFilters </a></p>
<p>And you can get the release tarball from here : <a href="http://freedesktop.org/software/farstream/releases/gstfilters/">http://freedesktop.org/software/farstream/releases/gstfilters/</a></p>
<p>And browse its documentation here : <a href="http://www.freedesktop.org/software/farstream/apidoc/gstfilters/">http://www.freedesktop.org/software/farstream/apidoc/gstfilters/ </a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://kakaroto.homelinux.net/2011/12/gstfilters-library-released/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ExpoLibre 2011 in Talca/Chile</title>
		<link>http://kakaroto.homelinux.net/2011/12/expolibre-2011-in-talcachile/</link>
		<comments>http://kakaroto.homelinux.net/2011/12/expolibre-2011-in-talcachile/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 23:27:06 +0000</pubDate>
		<dc:creator>kakaroto</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[chile]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[expolibre]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[talca]]></category>
		<category><![CDATA[talk]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://kakaroto.homelinux.net/?p=434</guid>
		<description><![CDATA[Hi all, About 2 weeks ago, I was in Talca, Chile for the ExpoLibre 2011 conference. It was really awesome, I had one of the best experiences as a speaker! One of the particularities of that conference, is that it&#8217;s organized by the university and its target audience is students, teachers and enthusiasts in open [...]]]></description>
			<content:encoded><![CDATA[<p>Hi all,</p>
<p>About 2 weeks ago, I was in Talca, Chile for the <a href="http://expolibre.cl/">ExpoLibre 2011</a> conference. It was really awesome, I had one of the best experiences as a speaker!</p>
<p>One of the particularities of that conference, is that it&#8217;s organized by the university and its target audience is students, teachers and enthusiasts in open source. The majority of the attendees were not open source developers, but they were people who wanted to learn more about it.<br />
For that reason, this was my very first &#8220;motivational talk&#8221; rather than my usual technical talks that I&#8217;ve given in the past, and I loved it!</p>
<p>Another interesting point was that the audience was mostly speaking Spanish, and not everyone understood English, so I had my colleagues (Reynaldo Verdejo and Thibault Saunier) there to translate what I was saying. That created a very pleasant experience as I had time to relax between each slide while they were translating, and it also made the talk more casual and interactive. I wasn&#8217;t nervous for the first time, and it felt great! <img src='http://kakaroto.homelinux.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>After the talk, I received some very interesting questions and I thoroughly enjoyed answered everyone of them. I saw a lot of people who were interested and I felt like I connected with everyone and I was able to touch them with my ideas. If I was able to change at least one attendee&#8217;s perception of open source, and hopefully get them involved in various FLOSS projects, then my mission is a success!</p>
<p>Today, the organizers of the ExpoLibre conference sent me the video recording of my talk, and I&#8217;ve shared it on youtube so everyone can listen to what I had stay. I hope everyone enjoys it as much as I enjoyed doing it.</p>
<p>On a final note, I&#8217;d like to say that Chile is a beautiful country. I stayed there for almost two weeks, and even though travel from/to Canada is a pain, it was totally worth it! I can&#8217;t wait for the next opportunity for me to go there.</p>
<p><strong>Update :</strong> Some people complained about the rhythm being broken because of the translation to spanish,  so I asked here for anyone who wants to contribute, to edit the video and crop the non-english sections, so english-only speaking people can view the talk in one constant rhythm/flow without the interruptions by the translators.</p>
<p>Patrick Donnelly, one of the people who saw the video (and my request for an edit) did it and commented below  with a link to an english-only version of my talk (the intro and questions part were left untouched at my request). Here it is for those who need it :<br />
<iframe src="http://www.youtube.com/embed/aBv_czt3CNw" frameborder="0" width="420" height="315"></iframe></p>
<p>&nbsp;</p>
<p>And here is the original, unedited version of my talk I gave, enjoy it!</p>
<p><iframe src="http://www.youtube.com/embed/A6Hq4enqz4A" frameborder="0" width="420" height="315"></iframe></p>
<p>Ps: The video I tried to show to the audience (around 6:30) which did not work, was this one : <a href="http://www.youtube.com/watch?v=20ClL3mL8Gc">http://www.youtube.com/watch?v=20ClL3mL8Gc</a></p>
<p>And here are the slides used during the talk, in PDF format : <a href="http://people.collabora.co.uk/~kakaroto/expolibre-2011.pdf">http://people.collabora.co.uk/~kakaroto/expolibre-2011.pdf </a></p>
<p>&nbsp;</p>
<p>KaKaRoTo</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://kakaroto.homelinux.net/2011/12/expolibre-2011-in-talcachile/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
		</item>
		<item>
		<title>GStreamer Conference 2011 videos</title>
		<link>http://kakaroto.homelinux.net/2011/11/gstreamer-conference-2011-videos/</link>
		<comments>http://kakaroto.homelinux.net/2011/11/gstreamer-conference-2011-videos/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 23:35:43 +0000</pubDate>
		<dc:creator>kakaroto</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Farsight]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[farsight]]></category>
		<category><![CDATA[farsight-utils]]></category>
		<category><![CDATA[farstream]]></category>
		<category><![CDATA[fsu]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gstfilters]]></category>
		<category><![CDATA[gstreamer]]></category>
		<category><![CDATA[prague]]></category>
		<category><![CDATA[videos]]></category>

		<guid isPermaLink="false">http://kakaroto.homelinux.net/?p=417</guid>
		<description><![CDATA[The videos of the presentations given at the GStreamer Conference from last month in Prague are finally available online! So if you missed the conference, you can still catch all the interesting talks on video. Thanks to the great work of Ubicast who used a GStreamer-based system for capturing the videos and slides, and it [...]]]></description>
			<content:encoded><![CDATA[<p>The videos of the presentations given at the<a href="http://gstreamer.freedesktop.org/conference/"> GStreamer Conference</a> from last month in Prague are finally available online! So if you missed the conference, you can still catch all the interesting talks on video. Thanks to the great work of <a href="http://ubicast.eu/">Ubicast</a> who used a GStreamer-based system for capturing the videos and slides, and it looks awesome!</p>
<p>I gave a presentation in which I introduced two libraries : GstFilters and FsUtils.</p>
<p>Both libraries are  convenience libraries that sit on top of <a href="http://gstreamer.net">Gstreamer</a> and <a href="http://www.freedesktop.org/wiki/Software/Farstream">Farstream</a> respectively, and they should make your lives much easier. I discussed them a bit before in a <a href="http://kakaroto.homelinux.net/2010/08/fsu-gstreamer-made-simple/">blog post</a>, but now you can see the full talk with all the details and explanation.</p>
<p>Here&#8217;s a link to the conference talks : <a href="http://gstconf.ubicast.tv/channels/#conferences2011">http://gstconf.ubicast.tv/channels/#conferences2011 </a></p>
<p>And a link to my presentation about GstFilters and FsUtils : <a href="http://gstconf.ubicast.tv/videos/gstreamer-and-farsight/">http://gstconf.ubicast.tv/videos/gstreamer-and-farsight/ </a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://kakaroto.homelinux.net/2011/11/gstreamer-conference-2011-videos/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Network emulator tool for Linux</title>
		<link>http://kakaroto.homelinux.net/2011/09/network-emulator-tool-for-linux/</link>
		<comments>http://kakaroto.homelinux.net/2011/09/network-emulator-tool-for-linux/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 01:20:50 +0000</pubDate>
		<dc:creator>kakaroto</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Farsight]]></category>
		<category><![CDATA[bandwidth]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[emulation]]></category>
		<category><![CDATA[farsight]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[hls]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[netem]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[rate control]]></category>

		<guid isPermaLink="false">http://kakaroto.homelinux.net/?p=398</guid>
		<description><![CDATA[I have finally decided to blog about my netem tool that I wrote a couple of months ago. First, the introductions, netem is a kernel component for controlling QoS, rate control and various network properties that allows you to emulate a network by modifying the kernel&#8217;s IP stack&#8217;s queue disciplines. You can read more about [...]]]></description>
			<content:encoded><![CDATA[<p>I have finally decided to blog about my netem tool that I wrote a couple of months ago.<br />
First, the introductions, netem is a kernel component for controlling QoS, rate control and various network properties that allows you to emulate a network by modifying the kernel&#8217;s IP stack&#8217;s queue disciplines. You can read more about it here : http://www.linuxfoundation.org/collaborate/workgroups/networking/netem</p>
<p>The issue I had with the netem queue was that it was hard/complicated to use and required a fair bit of reading and understanding of how the Linux IP stack worked in order to even use it properly. I needed an easy to use tool in order to test multiple network properties quickly. I looked around for a tool that would help me with that and only found phpnetemgui which is a very old piece of code, not even compatible with the latest php versions and which requires you to run a server on localhost and give sudo access to the web server&#8230; I didn&#8217;t like that, so I wrote my own tool for easy netem configuration (thanks to the phpnetemgui code, it was helpful in providing some of the commands).</p>
<p>You can find my netem tool here : http://cgit.collabora.com/git/user/kakaroto/netem.git/</p>
<p>The README has all the information you need in order to use it, so make sure you read it, but let me summarize a bit how it works.<br />
Netem uses a CSV file in which you can set multiple rules, each with its own set of properties (10% packet loss, 5% duplicated packets, 100ms delay with 25ms of jitter, limit bandwidth to 256Kbps, etc..). Each rule has a name and you can have multiple rules with the same name (limit bandwidth to 256Kbps for IP 1.2.3.4, and 512Kbps to IP 1.2.3.5). All these sub-rules with the same name will be considered as being a single rule. You can run netem on an interface, giving it the CSV filename and the name of the rule that you want to activate and it will output all the commands you need to execute in order to emulate the network as specified in the rules from the CSV file.</p>
<p>To actually run the network emulation, just pipe the output to &#8216;sh&#8217;, for example : <em>./netem eth0 my_rules.csv 256kbps | sudo sh</em></p>
<p>The reason I did this was to help my colleague Olivier Crete who was working on <a href="http://www.ietf.org/rfc/rfc3448.txt">TFRC</a> (Tcp-Friendly Rate Control) for RTP in <a href="http://farsight.freedesktop.org/wiki/">Farsight</a>. He needed to be able to emulate various network configurations, change the bandwidth limitations, introduce packet drop, etc.. and see how TFRC would react to make sure that the video/audio stream&#8217;s quality stays acceptable and the bitrate calculation adapts correctly to changing network conditions. I&#8217;ve also been recently working on <a href="http://tools.ietf.org/html/draft-pantos-http-live-streaming-06">HLS</a> (HTTP Live Streaming) support in GStreamer and I&#8217;ve used the tool to make sure that the HLS stream correctly adapts to the network bandwidth and switches the bitrate/resolution correctly. This tool has been a great help in doing all these tests, so it&#8217;s time now to share it with whoever it might interest.</p>
<p>I&#8217;ll conclude with these example outputs for three different rules (taken from the provided test.csv in git) :</p>
<ul>
<li>Limit inbound and outbound bandwidth to 1024Kbps (2 sub-rules)</li>
</ul>
<blockquote><p>kakaroto@kakaroto:~/coding/netem$ ./netem wlan0 test.csv 1024kbps<br />
modprobe ifb<br />
ip link set dev ifb0 up<br />
tc qdisc del dev wlan0 ingress<br />
tc qdisc add dev wlan0 ingress<br />
tc filter add dev wlan0 parent ffff: protocol ip u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb0<br />
tc qdisc del dev ifb0 root<br />
tc qdisc add dev ifb0 root handle 1: prio bands 10<br />
tc qdisc del dev wlan0 root<br />
tc qdisc add dev wlan0 root handle 1: prio bands 10<br />
tc qdisc add dev ifb0 parent 1:1 handle 10: htb default 1<br />
tc class add dev ifb0 parent 10: classid 0:1 htb rate 1024kbit ceil 1024kbit burst 0 cburst 0<br />
tc qdisc add dev wlan0 parent 1:1 handle 10: htb default 1<br />
tc class add dev wlan0 parent 10: classid 0:1 htb rate 1024kbit ceil 1024kbit burst 0 cburst 0<br />
tc filter add dev wlan0 protocol ip parent 1:0 prio 1 u32 match ip src 0.0.0.0/0 match ip dst 0.0.0.0/0 flowid 10:1<br />
tc filter add dev ifb0 protocol ip parent 1:0 prio 1 u32 match ip src 0.0.0.0/0 match ip dst 0.0.0.0/0 flowid 10:1</p></blockquote>
<ul>
<li>A rule to add 100ms of delay with 25ms of jitter using a normal distribution with 25% of correlation</li>
</ul>
<blockquote><p>kakaroto@kakaroto:~/coding/netem$ ./netem wlan0 test.csv delay<br />
tc qdisc del dev wlan0 root<br />
tc qdisc add dev wlan0 root handle 1: prio bands 10<br />
tc qdisc add dev wlan0 parent 1:1 handle 10: netem delay 100ms 25ms 25% distribution normal<br />
tc filter add dev wlan0 protocol ip parent 1:0 prio 1 u32 match ip src 0.0.0.0/0 match ip dst 0.0.0.0/0 flowid 10:1</p></blockquote>
<ul>
<li>A rule that emulates various packet loss, delay, duplication, packet reordering, rate control, for both inbound and outbound connection with IP and port matching (3 sub-rules)</li>
</ul>
<blockquote><p>kakaroto@kakaroto:~/coding/netem$ ./netem wlan0 test.csv test1<br />
modprobe ifb<br />
ip link set dev ifb0 up<br />
tc qdisc del dev wlan0 ingress<br />
tc qdisc add dev wlan0 ingress<br />
tc filter add dev wlan0 parent ffff: protocol ip u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb0<br />
tc qdisc del dev ifb0 root<br />
tc qdisc add dev ifb0 root handle 1: prio bands 10<br />
tc qdisc del dev wlan0 root<br />
tc qdisc add dev wlan0 root handle 1: prio bands 10<br />
tc qdisc add dev wlan0 parent 1:1 handle 10: htb default 1<br />
tc class add dev wlan0 parent 10: classid 0:1 htb rate 256kbit ceil 256kbit burst 0 cburst 0<br />
tc qdisc add dev wlan0 parent 10:1 handle 11: netem loss 0.5% 25% duplicate 5% delay 100ms 50ms 25% distribution pareto reorder 1% limit 1000<br />
tc qdisc add dev wlan0 parent 1:2 handle 20: netem loss 0.5% 50% limit 1000<br />
tc qdisc add dev ifb0 parent 1:1 handle 10: netem loss 5% reorder 5% limit 1000<br />
tc filter add dev wlan0 protocol ip parent 1:0 prio 1 u32 match ip dst 1.2.3.4/32 match ip dport 1234 0xffff flowid 10:1<br />
tc filter add dev wlan0 protocol ip parent 1:0 prio 2 u32 match ip sport 4321 0xffff flowid 10:1<br />
tc qdisc add dev wlan0 parent 1:3 handle 30: pfifo<br />
tc filter add dev wlan0 protocol ip parent 1:0 prio 3 u32 match ip src 0.0.0.0/0 match ip dst 0.0.0.0/0 flowid 30:3<br />
tc filter add dev ifb0 protocol ip parent 1:0 prio 1 u32 match ip src 1.2.3.4/32 match ip sport 1234 0xffff flowid 10:1<br />
tc qdisc add dev ifb0 parent 1:2 handle 20: pfifo<br />
tc filter add dev ifb0 protocol ip parent 1:0 prio 2 u32 match ip src 0.0.0.0/0 match ip dst 0.0.0.0/0 flowid 20:2</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://kakaroto.homelinux.net/2011/09/network-emulator-tool-for-linux/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Libnice 0.1.0 released!</title>
		<link>http://kakaroto.homelinux.net/2011/01/libnice-0-1-0-released/</link>
		<comments>http://kakaroto.homelinux.net/2011/01/libnice-0-1-0-released/#comments</comments>
		<pubDate>Fri, 21 Jan 2011 21:40:09 +0000</pubDate>
		<dc:creator>kakaroto</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[libnice]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[farsight]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://kakaroto.homelinux.net/?p=322</guid>
		<description><![CDATA[Yesterday, I released a new version of Libnice, This is a new major version that has a small API/ABI break from previous versions. Here are the main changes : Added nice_candidate_copy to the public API Make stun_timer timeouts configurable (Breaks API and ABI) Add compatibility support for MSOC 2007 and MSOC 2007 R2 Add MS-TURN [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I released a new version of <a href="http://nice.freedesktop.org">Libnice</a>, This is a new major version that has a small API/ABI break from previous versions.</p>
<p>Here are the main changes :</p>
<ul>
<li> Added nice_candidate_copy to the public API</li>
<li>Make stun_timer timeouts configurable (Breaks API and ABI)</li>
<li>Add compatibility support for MSOC 2007 and <a href="http://office.microsoft.com/en-us/communicator-help/microsoft-office-communicator-2007-r2-product-overview-HA010203715.aspx">MSOC 2007 R2</a></li>
<li>Add MS-TURN support for MSOC</li>
<li>Added and completed TURN <a href="http://tools.ietf.org/html/rfc5766">RFC 5766</a> support</li>
<li>Add a <a href="http://nice.freedesktop.org/libnice/NiceAgent.html#nice-agent-set-port-range">nice_agent_set_port_range</a> API to force a component to use a specific port range</li>
<li>Fix various bugs and memory leaks</li>
<li>Improved documentation</li>
</ul>
<p>The API and ABI break is with the <a href="http://nice.freedesktop.org/libnice/libnice-Timer.html">StunTimer</a> usage, so if you use it, you&#8217;ll need to do a small change to your code. Because the library version changed, you&#8217;ll also need to recompile your applications that link with libnice.</p>
<p>The biggest change in this version is the full support for the recently published <a href="http://tools.ietf.org/html/rfc5766">RFC 5766</a> TURN standard (UDP and TCP) as well as the addition of <a href="http://office.microsoft.com/en-us/communicator-help/microsoft-office-communicator-2007-r2-product-overview-HA010203715.aspx">MS Office Communicator</a> compatibility. The API/ABI break introduced in the StunTimer usage is to allow specifying the timeout of STUN retransmissions. The timeout for the STUN and TURN discovery during the candidate gathering phase has also been lowered to 3 seconds now instead of the 9 second timeout that we had before, which should make for a quicker candidate gathering phase and a more responsive UI.</p>
<p>Another interesting change is the addition of the <a href="http://nice.freedesktop.org/libnice/NiceAgent.html#nice-agent-set-port-range">nice_agent_set_port_range</a> API that allows you to specify a range of ports that you want a component to listen to for host candidates. This should help those who use port forwarding with symmetric NATs.</p>
<p>The stun_usage_timer configurable timeout as well as the nice_agent_set_port_range addition were suggested by Tom Kaminski.<br />
The MSOC support was added by Jakub Adam.<br />
The RFC 5766 TURN support was added by Marcus Lundblad and myself.<br />
Other small fixes that were reported on the <a href="http://lists.freedesktop.org/mailman/listinfo/nice">libnice mailing list</a> were also fixed and included in this version.<br />
Thanks to everyone who contributed in this release and thanks to <a href="http://collabora.co.uk">Collabora</a> and <a href="http://www.nokia.com">Nokia</a> for sponsoring that work!</p>
<p>A new version of <a href="http://farsight.freedesktop.org/wiki/">Farsight2</a> has also been released today (0.0.23) which should work with the new API of this Libnice release.</p>
<p>You can download this new version of Libnice from the <a href="http://nice.freedesktop.org/releases/">usual place</a>.</p>
<p>Enjoy!</p>
<p>Youness.</p>
]]></content:encoded>
			<wfw:commentRss>http://kakaroto.homelinux.net/2011/01/libnice-0-1-0-released/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>GStreamer: GstFilters to be (hopefully) merged into gst-plugins-base</title>
		<link>http://kakaroto.homelinux.net/2010/10/gstreamer-gstfilters-to-be-merged-into-gst-plugins-base/</link>
		<comments>http://kakaroto.homelinux.net/2010/10/gstreamer-gstfilters-to-be-merged-into-gst-plugins-base/#comments</comments>
		<pubDate>Wed, 27 Oct 2010 02:59:48 +0000</pubDate>
		<dc:creator>kakaroto</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Farsight]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[farsight]]></category>
		<category><![CDATA[farsight-utils]]></category>
		<category><![CDATA[fsu]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gst-filters]]></category>
		<category><![CDATA[gstreamer]]></category>
		<category><![CDATA[open-source]]></category>

		<guid isPermaLink="false">http://kakaroto.homelinux.net/?p=287</guid>
		<description><![CDATA[Today is the day of the Gstreamer Conference 2010 in Cambridge. Unfortunately, I couldn&#8217;t attend, but I thought I&#8217;d share a little something about the things I&#8217;ve done on GStreamer, as part of my work for Collabora. If you remember my last post about Fsu, I talked about how you could use the FsuFilterManager and [...]]]></description>
			<content:encoded><![CDATA[<p>Today is the day of the<a href="http://www.gstreamer.net/conference/"> Gstreamer Conference 2010</a> in Cambridge. Unfortunately, I couldn&#8217;t attend, but I thought I&#8217;d share a little something about the things I&#8217;ve done on GStreamer, as part of my work for <a href="http://www.collabora.co.uk">Collabora</a>.</p>
<p>If you remember my <a href="http://kakaroto.homelinux.net/2010/08/fsu-gstreamer-made-simple/">last post about Fsu</a>, I talked about how you could use the FsuFilterManager and FsuFilter  classes to create some really cool <a href="http://www.gstreamer.net">GStreamer</a> applications that can modify the pipeline dynamically, using a <a href="http://git.collabora.co.uk/?p=user/kakaroto/gst-plugins-base.git;a=blob;f=tests/examples/filters/grid-effects.c;h=8bff7e68339a9cd53e3ac1936ae33072f2f2541e;hb=7379fb3b84fbc63892d12236ce67dd6a87bfaa62#l155">minimum amount of code</a> and a very <a href="http://people.collabora.co.uk/~kakaroto/gpb-docs/gstreamer-filters.html">easy to use API</a>. There was a lot of interest to this during last <a href="http://guadec.org">GUADEC</a> and I decided to move the code from Farsight into Gstreamer itself. The FsuFilter* objects are independent of <a href="http://farsight.freedesktop.org">Farsight</a>, and can be useful to a lot of people, so there was no reason to keep them there.</p>
<p>I have ported the code from Farsight into gst-plugins-base and renamed the FsuFilter* classes into GstFilter* and made it into a libgstfilters library. I opened a <a href="https://bugzilla.gnome.org/show_bug.cgi?id=631574">bug report</a> on Gnome&#8217;s bugzilla asking for my branch to be merged into gst-plugins-base. I would appreciate it if everyone interested in this could have a look, <a href="http://git.collabora.co.uk/?p=user/kakaroto/gst-plugins-base.git;a=shortlog;h=refs/heads/move-filters">review the code</a> if possible, mainly review the <a href="http://people.collabora.co.uk/~kakaroto/gpb-docs/gstreamer-filters.html">API</a> and try to use it. I&#8217;d like to make sure that the API is stable, feature complete and easy to use for everyone, so if you have any complaints about it, feel free to comment on the <a href="https://bugzilla.gnome.org/show_bug.cgi?id=631574">bugzilla</a> so I can fix it and hopefully get cleaner/better code merged upstream soon!</p>
<p>You can find the built gtk-doc of the GstFilters library <a href="http://people.collabora.co.uk/~kakaroto/gpb-docs/gstreamer-filters.html">here</a>.</p>
<p><strong>Update:</strong> To clear any possible misunderstandings, the GstFilters library hasn&#8217;t been accepted yet into gst-plugins-base. So far, I&#8217;ve only opened a bug report and hopefully, after it gets reviewed, it might get accepted into -base (or not). I&#8217;d just like to get people to comment on the API and help me improve it.</p>
<p>Thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://kakaroto.homelinux.net/2010/10/gstreamer-gstfilters-to-be-merged-into-gst-plugins-base/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>FSU: Gstreamer made simple!</title>
		<link>http://kakaroto.homelinux.net/2010/08/fsu-gstreamer-made-simple/</link>
		<comments>http://kakaroto.homelinux.net/2010/08/fsu-gstreamer-made-simple/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 15:41:05 +0000</pubDate>
		<dc:creator>kakaroto</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Farsight]]></category>
		<category><![CDATA[cheese]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[farsight]]></category>
		<category><![CDATA[farsight-utils]]></category>
		<category><![CDATA[fsu]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gnome-video-effects]]></category>
		<category><![CDATA[gstreamer]]></category>
		<category><![CDATA[open-source]]></category>

		<guid isPermaLink="false">http://kakaroto.homelinux.net/?p=95</guid>
		<description><![CDATA[Hi everyone! Many of you probably know how to use GStreamer, and many others probably know how complicated it can be to use GStreamer. When you want to build complex pipelines and mostly dynamic pipelines, it can get pretty complicated and will usually require a huge amount of code to properly build or modify your [...]]]></description>
			<content:encoded><![CDATA[<p>Hi everyone!</p>
<p>Many of you probably know how to use <a href="http://gstreamer.net">GStreamer</a>, and many others probably know how complicated it can be to use GStreamer.</p>
<p>When you want to build complex pipelines and mostly dynamic pipelines, it can get pretty complicated and will usually require a huge amount of code to properly build or modify your pipeline without killing yourself in the process.</p>
<p>I&#8217;ve been working in the last few months on a subproject of <a href="http://farsight.freedesktop.org">Farsight</a> that I called &#8220;Farsight-utils&#8221; (for now) which consists of a library that will help you build complex GStreamer pipelines very very easily.</p>
<p>It was mainly written for VoIP applications that want to concentrate on the UI rather than the GStreamer API, but it can be used for pretty much anything else (<a href="http://projects.gnome.org/cheese/">Cheese</a> or <a href="http://www.pitivi.org/">PiTiVi</a> for example).  The API is really simple and extensible. FSU (Farsight-Utils) is made of three layers, the first layer is what this post is all about, it&#8217;s a set of classes (FsuFilter(s) and FsuFilterManager) which build the pipelines for you while giving you a simple API to do it. The second layer is a set of classes which simply wrap the Farsight objects and take care of the GStreamer part of things (linking the Farsight element with the source/sink, etc..), and provide access to a filter manager for the session and streams. The third and last part of FSU is a set of higher level classes that take care of the signaling part of Farsight for you and allow you to do simple audio/video calls with a very minimalistic API. But let&#8217;s talk about the FilterManager and the filters and the best way to explain it is to start with a simple use case :</p>
<p>The story is simple, I was talking to Olivier Crete (Farsight developer)  about FSU, then we talked about how iChat has this video effects grid that allows you to preview different effects and choose an effect to apply to your video, so I thought &#8220;how hard can it be&#8221;, and I started hacking on a simple example to do that. It took me 10 minutes to write (literally) and less than 150 lines of code (no, not python, yes, C code). Let&#8217;s show you a screencast of it first :</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="450" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/hMN4n1gz9QI&amp;hl=en_US&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="450" height="385" src="http://www.youtube.com/v/hMN4n1gz9QI&amp;hl=en_US&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Or for people without flash, you can <a href="http://kakaroto.homelinux.net/wp-content/uploads/2010/07/fsu.avi">download the video here</a>.</p>
<p>So, as you can see, it works! and it&#8217;s really nice! Also, thanks to the latest git version of GStreamer, the dynamic changes to the pipeline are quite fast as you probably noticed! I won&#8217;t bore you with the main (which is about 25 lines of C code) which builds the whole pipeline, but I&#8217;d like to show you how the magic is done when you click/choose an effect :</p>
<div class="geshi no c">
<ol>
<li class="li1">
<div class="de1"><span class="kw4">static</span> <span class="kw4">void</span></div>
</li>
<li class="li1">
<div class="de1">button_clicked <span class="br0">&#40;</span>GtkButton <span class="sy0">*</span>button, gpointer user_data<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw4">static</span> FsuFilterId <span class="sy0">*</span>effect_id <span class="sy0">=</span> <span class="kw2">NULL</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw4">static</span> gchar <span class="sy0">*</span>previous_filename <span class="sy0">=</span> <span class="kw2">NULL</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; gchar <span class="sy0">*</span>filename <span class="sy0">=</span> user_data;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; FsuFilterManager <span class="sy0">*</span>preview_manager <span class="sy0">=</span> <span class="kw2">NULL</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; FsuFilter <span class="sy0">*</span>filter <span class="sy0">=</span> FSU_FILTER <span class="br0">&#40;</span>fsu_gnome_effect_filter_new <span class="br0">&#40;</span>filename, <span class="kw2">NULL</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; g_object_get <span class="br0">&#40;</span>preview, <span class="st0">&quot;filter-manager&quot;</span>, <span class="sy0">&amp;</span>amp;preview_manager, <span class="kw2">NULL</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>effect_id <span class="sy0">==</span> <span class="kw2">NULL</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="coMULTI">/* Add the filter if there are none */</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; effect_id <span class="sy0">=</span> fsu_filter_manager_append_filter <span class="br0">&#40;</span>preview_manager, filter<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; previous_filename <span class="sy0">=</span> filename;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="kw1">if</span> <span class="br0">&#40;</span><span class="sy0">!</span>strcmp <span class="br0">&#40;</span>filename, previous_filename<span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="coMULTI">/* Remove the existing effect if it was clicked twice */</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; fsu_filter_manager_remove_filter <span class="br0">&#40;</span>preview_manager, effect_id<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; effect_id <span class="sy0">=</span> <span class="kw2">NULL</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; filename <span class="sy0">=</span> <span class="kw2">NULL</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="coMULTI">/* Replace the existing effect with the new one*/</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; effect_id <span class="sy0">=</span> fsu_filter_manager_replace_filter <span class="br0">&#40;</span>preview_manager, filter,</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; effect_id<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; previous_filename <span class="sy0">=</span> filename;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; g_object_unref <span class="br0">&#40;</span>filter<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; g_object_unref <span class="br0">&#40;</span>preview_manager<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>I think this is pretty straightforward so I won&#8217;t try to explain it to you, however you probably notice that there is no error checking, or pad blocking, etc.. because the FilterManager takes care of everything for us, it will do a pad_block, then find where in the pipeline it should do the change, unlink, apply the filter and relink. All of this asynchronously! And if a filter fails to apply (a non-existing element or some caps issue), then the filter manager will send you a signal to let you know what happened, and it will just ignore that specific filter and revert the change it did (if any) and keep your pipeline in a coherent/working state.</p>
<p>As you might have noticed in the code, the filter I used is called FsuGnomeEffectFilter. This filter takes a filename to a .effect file ﻿from the recently created <a href="http://git.gnome.org/browse/gnome-video-effects/">gnome-video-effects </a>package and creates the proper pipeline from it, as well as providing us with the name and categories of the effect. It also has an API to list all the effects :</p>
<div class="geshi no c">
<ol>
<li class="li1">
<div class="de1">&nbsp; GList <span class="sy0">*</span>effects <span class="sy0">=</span> fsu_gnome_effect_list_effects <span class="br0">&#40;</span><span class="st0">&quot;/usr/share/gnome-video-effects&quot;</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
<p>Using the filter manager is also quite easy, all you have to do is to &#8216;apply&#8217; it between the source and the sink, then we can add all sorts of FsuFilters to the FilterManager, like the resolution filter, the gnome-effect filter or the preview filter (to which you give a window x-id as argument in the &#8216;new&#8217; and you don&#8217;t have to bother with listening to the proper GstMessage on the Bus, etc..). To &#8216;apply&#8217; the filter manager, just do :</p>
<div class="geshi no c">
<ol>
<li class="li1">
<div class="de1">&nbsp; sink_pad <span class="sy0">=</span> fsu_filter_manager_apply <span class="br0">&#40;</span>filters, GST_BIN <span class="br0">&#40;</span>pipeline<span class="br0">&#41;</span>, sink_pad<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; gst_pad_link <span class="br0">&#40;</span>src_pad, sink_pad<span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
<p>You can also just append a level and volume filter to your audio pipeline and get an API to control the volume and receive a gobject signal (not a GstMessage on the bus) whenever the sound level changes, so you can really start concentrating on making a beautiful UI that uses/shows all these features to your users!</p>
<p>I think that&#8217;s it for now, I will let everyone digest everything, and I&#8217;ll post something soon to show the progress and explain a bit more on the API!</p>
<p>In the meantime, you can try that demo app (from the screencast) from my <a href="http://git.collabora.co.uk/?p=user/kakaroto/farsight2.git;a=shortlog;h=refs/heads/fsu">&#8216;fsu&#8217; branch</a> of <a href="http://git.collabora.co.uk/?p=user/kakaroto/farsight2.git;a=summary">Farsight git</a>. The example is in <a href="http://git.collabora.co.uk/?p=user/kakaroto/farsight2.git;a=blob;f=examples/filter-manager/grid-effects2.c;h=c2711cef86664bc3035024f2ead0fcdf181b1755;hb=b7068ddd093db2b452a2b4e7178dd8fcfd29e8d3">examples/filter-manager/grid-effects2.c</a>.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://kakaroto.homelinux.net/2010/08/fsu-gstreamer-made-simple/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
<enclosure url="http://kakaroto.homelinux.net/wp-content/uploads/2010/07/fsu.avi" length="6838954" type="video/avi" />
		</item>
		<item>
		<title>Release libnice 0.0.13</title>
		<link>http://kakaroto.homelinux.net/2010/08/release-libnice-0-0-13/</link>
		<comments>http://kakaroto.homelinux.net/2010/08/release-libnice-0-0-13/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 15:30:07 +0000</pubDate>
		<dc:creator>kakaroto</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[libnice]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://kakaroto.homelinux.net/?p=143</guid>
		<description><![CDATA[Hello, Libnice 0.0.13 has just been released..  It&#8217;s a small release that fixes a few bugs, cleans the code a bit and makes coverity happy! Also, this release adds support for IPv6 which now makes the library a bit more universal! Another important fix was the &#8216;crc32&#8242; function used internally in libnice which was conflicting [...]]]></description>
			<content:encoded><![CDATA[<p>Hello,</p>
<p><a href="http://nice.freedesktop.org">Libnice</a> 0.0.13 has just been released..  It&#8217;s a small release that fixes a few bugs, cleans the code a bit and makes <a href="http://www.coverity.com/">coverity</a> happy!</p>
<p>Also, this release adds support for IPv6 which now makes the library a bit more universal!</p>
<p>Another important fix was the &#8216;crc32&#8242; function used internally in libnice which was conflicting with the same symbol in libz.so. After a user reported a crash in libnice when he used it with his application (which was linking to libz.so as well), I realized the conflict and have now renamed the function from &#8216;crc32&#8242; into &#8216;stun_crc32&#8242;, which now makes libnice safer to use. Hopefully, there won&#8217;t be any more similar problem.</p>
<p>If you find issues or bugs with libnice, please <a href="https://bugs.freedesktop.org/enter_bug.cgi?product=nice">report</a> them and we&#8217;ll try to fix them for the next release!</p>
<p>As discussed in my previous <a href="http://kakaroto.homelinux.net/2010/05/release-libnice-0-0-12/">post</a>, TURN support still isn&#8217;t complete for now, and I&#8217;m still waiting for some charitable mind to send me a patch for upgrading TURN support in libnice to its latest <a href="http://tools.ietf.org/html/rfc5766">RFC</a>. Otherwise, you&#8217;ll have to be patient until I get some free time!</p>
<p>KaKaRoTo</p>
]]></content:encoded>
			<wfw:commentRss>http://kakaroto.homelinux.net/2010/08/release-libnice-0-0-13/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>GTalk-compatible file transfers in telepathy-gabble!</title>
		<link>http://kakaroto.homelinux.net/2010/06/gtalk-compatible-file-transfers-in-telepathy-gabble/</link>
		<comments>http://kakaroto.homelinux.net/2010/06/gtalk-compatible-file-transfers-in-telepathy-gabble/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 22:23:49 +0000</pubDate>
		<dc:creator>kakaroto</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Telepathy]]></category>
		<category><![CDATA[collabora]]></category>
		<category><![CDATA[empathy]]></category>
		<category><![CDATA[file-transfers]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gtalk]]></category>
		<category><![CDATA[igoogle]]></category>
		<category><![CDATA[libnice]]></category>
		<category><![CDATA[reliable]]></category>
		<category><![CDATA[telepathy]]></category>
		<category><![CDATA[telepathy-gabble]]></category>

		<guid isPermaLink="false">http://kakaroto.homelinux.net/?p=88</guid>
		<description><![CDATA[Update: This is now available in telepathy-gabble 0.9.13! Hi all, As some of you might know, I&#8217;ve worked for a while on telepathy-gabble and I had the task of adding GoogleTalk-compatible file transfers to it. I&#8217;m proud to announce that my changes have been merged into telepathy-gabble and you will be able to enjoy my [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong>Update:</strong> This is now available in telepathy-gabble 0.9.13!</em></p>
<p>Hi all,</p>
<p>As some of you might know, I&#8217;ve worked for a while on <a href="http://telepathy.freedesktop.org/wiki/">telepathy-gabble</a> and I had the task of adding GoogleTalk-compatible file transfers to it. I&#8217;m proud to announce that my changes have been merged into telepathy-gabble and you will be able to enjoy my (awesome) code in the next release of telepathy-gabble.</p>
<p>This means that anyone using Empathy or any other telepathy-enabled IM client will be able to enjoy the feature and transfer files with friends connected on Google Talk. This is also great news because even if you are not using GTalk, but you are using a @gmail.com account you will also be able to transfer your files using the new feature between you and another telepathy user. What this feature brings you is the ability to use libnice and do proper NAT traversal techniques in order to enjoy high speed file transfers instead of relying on the SOCKS proxies that jabber servers provide for people behind a NAT.</p>
<p>This was not a simple task to achieve though, I&#8217;ve had to reverse engineer the protocol, learn telepathy-gabble, and implement all that stuff. The biggest achievement that came from this is the new ability to have reliable streams in libnice as previously <a href="http://kakaroto.homelinux.net/2010/02/adding-reliability-to-libnice/">announced on my blog.</a> Indeed, that feature was added in libnice mainly for the purpose of having reliable file transfers with GTalk.</p>
<p>Also, as <a href="http://googletalk.blogspot.com/2010/03/file-transfer-in-igoogle-and-orkut-chat.html">announced by Google</a> a while ago, their <a href="http://www.google.com/ig">iGoogle</a> service now also supports file transfers. However, the protocol it uses is slightly different (Gtalk dialect 3 instead of dialect 4). I&#8217;ve spent some time trying to see if my code was compatible with it, and I did some reverse engineering, and tried to make it work, but because of lack of time, I wasn&#8217;t able to make my code work in compatibility with iGoogle. However, fear not, as it should be fairly simple to implement, given enough time and motivation. Google also said that they would add file transfers support into the chat features of GMail, when that happens, I&#8217;ll have another go at this and try to make telepathy-gabble compatible with iGoogle and GMail file transfers.</p>
<p><span style="text-decoration: line-through;">I&#8217;ll let you know when telepathy-gabble gets released with the feature, in the meantime, you can go grab the latest <a href="http://git.collabora.co.uk/?p=telepathy-gabble.git;a=summary">git version of tp-gabble</a> and enjoy the new high speed file transfers with your GTalk friends!</span></p>
<p>Telepathy gabble <a href="http://telepathy.freedesktop.org/releases/telepathy-gabble/telepathy-gabble-0.9.13.tar.gz ">0.9.13</a> has just been releeased with the feature, so go <a href="http://telepathy.freedesktop.org/releases/telepathy-gabble/">grab it</a> and enjoy high speed file transfers with your GTalk friends!</p>
<p>Special thanks goes to Intel for sponsoring this work as a part of MeeGo Netbook 1.0.</p>
<p>Enjoy,</p>
<p>KaKaRoTo</p>
]]></content:encoded>
			<wfw:commentRss>http://kakaroto.homelinux.net/2010/06/gtalk-compatible-file-transfers-in-telepathy-gabble/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

