title: Speed of different PHP mcrypt algorithms
body: <p>Hy guys. Today I was testing the php mcrypt algorithms.</p>
  
  <p>I run a test to check the speed of different mcrypt algos.</p>
  
  <p><strong>Tested algorithms:</strong> <em>Cast-128, Gost, Rijndael-128, Twofish, Cast-256, Loki97, Rijndael-192, Saferplus, Blowfish-compat, Des, Rijndael-256, Serpent, Xtea, Blowfish, Rc2, Tripledes</em>. </p>
  
  <p>The test was run in ECB mode (you also can use: <em>CBC, CFB, CTR, ECB, NCFB, NOFB, OFB</em>).</p>
  
  <p>I encrypted a simple string: "This is a test". The following results are for 1000 iterations (results are in second).</p>
  
  <blockquote>
    <p><strong>BLOWFISH</strong>
    0.5217170715332</p>
    
    <p><strong>BLOWFISH COMPAT</strong>
    0.46304702758789</p>
    
    <p><strong>CAST 128</strong>
    0.19502091407776</p>
    
    <p><strong>CAST 256</strong>
    0.28649806976318 </p>
    
    <p><strong>DES</strong>
    0.45267295837402</p>
    
    <p><strong>GOST</strong>
    0.19383502006531</p>
    
    <p><strong>LOKI97</strong>
    0.27537798881531 </p>
    
    <p><strong>RC2</strong>
    0.44201898574829 </p>
    
    <p><strong>RIJNDAEL 128</strong>
    0.2560601234436 </p>
    
    <p><strong>RIJNDAEL 192</strong>
    0.33414602279663 </p>
    
    <p><strong>RIJNDAEL 256</strong>
    0.42553782463074 </p>
    
    <p><strong>SAFERPLUS</strong>
    0.32848501205444 </p>
    
    <p><strong>SERPENT</strong>
    0.391037940979 </p>
    
    <p><strong>TRIPLEDES</strong>
    0.65123796463013 </p>
    
    <p><strong>TWOFISH</strong>
    0.27349305152893 </p>
    
    <p><strong>XTEA</strong>
    0.37829685211182</p>
  </blockquote>
  
  <p>Of course that process time is not the most important thing when we talk about security. I just want to share my results.</p>
  
  <p><strong>What mcrypt algo and mode are you using, and why?</strong>
  I know that it depends on the situation, security level, etc. but give some examples please.</p>