<?xml version="1.0"?>
<!-- name="generator" content="blosxom/2.0" -->
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">
  <channel>
    <title>malb::blog   </title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl</link>
    <description>blog on rocket science and social skills</description>
    <language>en</language>

  <item>
    <title>Sage Development Visualisation by Alex Ghitza</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2009/10/19#codeswarm-2009-10</link>
    <description>In the first few seconds were Gonzalo does all the work, he imports all of Sage into the revision control system DARCS. Before then we were not using revision control at all.&lt;/p&gt;
&lt;p&gt;
&lt;object width=&quot;400&quot; height=&quot;300&quot; data=&quot;http://vimeo.com/moogaloop.swf?clip_id=7133792&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot; /&gt;&lt;param name=&quot;movie&quot; value=&quot;http://vimeo.com/moogaloop.swf?clip_id=7133792&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1&quot;  /&gt;&lt;/object&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://vimeo.com/7133792&quot;&gt;Sage code swarm&lt;/a&gt; from &lt;a href=&quot;http://vimeo.com/user2480388&quot;&gt;Alex Ghitza&lt;/a&gt; on &lt;a href=&quot;http://vimeo.com&quot;&gt;Vimeo&lt;/a&gt; &lt;b&gt;PS:&lt;/b&gt; &lt;a href=&quot;http://ken-blog.krugler.org/2008/06/14/converting-vimeo-embedded-html-to-xhtml/&quot;&gt;Vimeo for XHTML&lt;/a&gt;.</description>
  </item>
  <item>
    <title>LQUP vs. PLUQ</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2009/06/27#m4ri-lqup-the-pluq-then-lqup</link>
    <description>At SD16 Cl&amp;eacute;ment Pernet and myself have been working on improving the asymptotically fast PLUQ factorisation over GF(2) in M4RI. As mentioned earlier, one of the main problems is that column swaps are pretty expensive compared to many other operations we do. Eventually, we settled for LQUP over PLUQ since it has fewer column swaps overall since it does not compress U. We also improved the base case both w.r.t. to sparse matrices and in general (more Gray code tables are used now) and the column swap performance overall (cf. &lt;a href=&quot;http://wiki.sagemath.org/days16/projects&quot;&gt;SD 16 Wiki&lt;/a&gt;). The result is noticeable, but we are not quite there yet:
&lt;/p&gt;
&lt;img src=&quot;http://www.informatik.uni-bremen.de/~malb/binary/m4ri-lqup-sparse-ish-2-14.png&quot; alt=&quot;M4RI r284 vs. r292&quot; title=&quot;M4RI r284 vs. r292&quot; /&gt;
&lt;p&gt;
There are still some places which could be improved so this should get better eventually. Also, we might have another strategy to deal with these sparse-ish/structured matrices. Anyway, the new PLUQ code is at least as fast as M4RI for the structured HFE examples on the M4RI website on my Core2Duo 2.33Ghz notebook (and of course much faster on random examples and on other platforms) The new code is available on &lt;a href=&quot;http://www.bitbucket.org/malb/m4ri&quot;&gt;BitBucket&lt;/a&gt;.</description>
  </item>
  <item>
    <title>More OpenMP Experiments with M4RI</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2009/06/18#more-m4ri-openmp</link>
    <description>Motivated by a thread on &lt;a href=&quot;http://groups.google.com/group/mpir-dev/browse_thread/thread/d00c8765cacf600a&quot;&gt;[mpir-dev]&lt;/a&gt; I played around with &lt;a href=&quot;http://openmp.org/wp/&quot;&gt;OpenMP&lt;/a&gt; again today. The performance does not scale linearly &amp;#8230; but hey it scales at all. I guess eventually I&amp;#8217;ll have to get serious about this and sit down to make this proper. Anyway, here are the timings (on &lt;a href=&quot;http://geom.math.washington.edu&quot;&gt;geom.math.washington.edu&lt;/a&gt;)
&lt;/p&gt;

&lt;table&gt;
&lt;caption&gt;Computing the reduced row echelon form of an $n \times n$ random dense matrix over $\mathbf{F}_2$.&lt;/caption&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;n&lt;/th&gt;
&lt;th&gt;M4RI &lt;br /&gt;1 thread&lt;/th&gt;
&lt;th&gt;PLUQ &lt;br /&gt;1 thread&lt;/th&gt;
&lt;th&gt;M4RI &lt;br /&gt;4 threads&lt;/th&gt;
&lt;th&gt;PLUQ &lt;br /&gt;4 threads&lt;/th&gt;
&lt;th&gt;M4RI &lt;br /&gt;16 threads&lt;/th&gt;
&lt;th&gt;PLUQ &lt;br /&gt;16 threads&lt;/th&gt;
&lt;th&gt;PLUQ 16 threads&lt;br /&gt; cutoff=2048&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;  10,000 &lt;/td&gt;&lt;td&gt;    1.72 &lt;/td&gt;&lt;td&gt;  0.85 &lt;/td&gt;&lt;td&gt;   1.03 &lt;/td&gt;&lt;td&gt;  0.86 &lt;/td&gt;&lt;td&gt;   0.58 &lt;/td&gt;&lt;td&gt;   0.80 &lt;/td&gt;&lt;td&gt;   0.77&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;  16,384 &lt;/td&gt;&lt;td&gt;   13.75 &lt;/td&gt;&lt;td&gt;  5.76 &lt;/td&gt;&lt;td&gt;        &lt;/td&gt;&lt;td&gt;  4.78 &lt;/td&gt;&lt;td&gt;        &lt;/td&gt;&lt;td&gt;   4.23 &lt;/td&gt;&lt;td&gt;       &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;  20,000 &lt;/td&gt;&lt;td&gt;   27.02 &lt;/td&gt;&lt;td&gt;  5.45 &lt;/td&gt;&lt;td&gt;   7.35 &lt;/td&gt;&lt;td&gt;  5.48 &lt;/td&gt;&lt;td&gt;   3.27 &lt;/td&gt;&lt;td&gt;   3.68 &lt;/td&gt;&lt;td&gt;       &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;  32,000 &lt;/td&gt;&lt;td&gt;  112.74 &lt;/td&gt;&lt;td&gt; 21.96 &lt;/td&gt;&lt;td&gt;  30.51 &lt;/td&gt;&lt;td&gt; 22.02 &lt;/td&gt;&lt;td&gt;  13.78 &lt;/td&gt;&lt;td&gt;  13.91 &lt;/td&gt;&lt;td&gt;  12.95&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;  64,000 &lt;/td&gt;&lt;td&gt;         &lt;/td&gt;&lt;td&gt;       &lt;/td&gt;&lt;td&gt; 227.80 &lt;/td&gt;&lt;td&gt;157.03 &lt;/td&gt;&lt;td&gt; 104.94 &lt;/td&gt;&lt;td&gt;  75.95 &lt;/td&gt;&lt;td&gt;  66.54&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; 100,000 &lt;/td&gt;&lt;td&gt; 1078.72 &lt;/td&gt;&lt;td&gt;429.32 &lt;/td&gt;&lt;td&gt; 869.43 &lt;/td&gt;&lt;td&gt;596.51 &lt;/td&gt;&lt;td&gt; 428.08 &lt;/td&gt;&lt;td&gt; 260.99 &lt;/td&gt;&lt;td&gt; 231.01&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;                                                                                                             
&lt;/table&gt;                                                                                                             
&lt;p&gt;
For some reason which I don&amp;#8217;t understand yet is PLUQ slower for 16,384 than 20,000 on this machine. The code is &lt;a href=&quot;http://bitbucket.org/malb/m4ri/&quot;&gt;on bitbucket&lt;/a&gt;.</description>
  </item>
  <item>
    <title>F4-Style F5 &amp;#8212; Next Attempt</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2009/05/20#f4-style-f5-2</link>
    <description>Since the F4-style F5 I &lt;a href=&quot;http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2009/01/25#f4-style-f5&quot;&gt;mentioned&lt;/a&gt; a while ago wasn&amp;#8217;t really that &amp;#8220;F4-style&amp;#8221; I&amp;#8217;ve pushed &lt;a href=&quot;http://bitbucket.org/malb/algebraic_attacks/src/tip/f5_2.py&quot;&gt;my next attempt&lt;/a&gt; into the public &amp;#8220;algebraic attack&amp;#8221; &lt;a href=&quot;http://bitbucket.org/malb/algebraic_attacks/src/&quot;&gt;bitbucket repository&lt;/a&gt;. This version swaps the two outer loops, i.e. it proceeds by degree in the outer loop instead of the index of the polynomials. Of course, we are talking about a toy implementation here to understand the algorithm and not an attempt to implement F5 efficiently.</description>
  </item>
  <item>
    <title>Funny</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2009/04/07#mathematica-ad</link>
    <description>It might very well be just a conincidence, but superficially it looks like &lt;a href=&quot;http://www.wolfram.com&quot;&gt;Mathematica&lt;/a&gt; is targeting &lt;a href=&quot;http://www.sagemath.org&quot;&gt;Sage&lt;/a&gt; users with ads on Google.
&lt;/p&gt;
&lt;img alt=&quot;Mathematica ad&quot; src=&quot;http://www.informatik.uni-bremen.de/~malb/binary/mathematica_ad.png&quot; /&gt;
&lt;p&gt;
Source: &lt;a href=&quot;http://groups.google.com/group/sage-devel/browse_thread/thread/73f461c63d90f152&quot;&gt;[sage-devel]&lt;/a&gt; &amp;#8230; scroll down to see Harald Schilly debunk the whole thing. Still, it&amp;#8217;s funny.</description>
  </item>
  <item>
    <title>Windows Sage 0.3</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2009/03/22#windows-sage-0-3-3</link>
    <description>As you might have heard, there is a &lt;a href=&quot;http://windows.sagemath.org/&quot;&gt;Windows port&lt;/a&gt; of &lt;a href=&quot;http://www.sagemath.org/&quot;&gt;Sage&lt;/a&gt; in the making. While the current version doesn&amp;#8217;t look like  Sage proper, it already ships quite a few building blocks. Since, incidently the &lt;a href=&quot;http://isg.rhul.ac.uk&quot;&gt;Information Security Group&lt;/a&gt; is now part of the &amp;#8220;Microsoft Developer Academic Alliance&amp;#8221; &amp;#8212; which grants students free access to their products &amp;#8212; I gave it a quick spin. See below.
&lt;/p&gt;
&lt;img src=&quot;http://www.informatik.uni-bremen.de/~malb/binary/windows-sage.png&quot; alt=&quot;screenshot of Windows Sage 3.0&quot;/&gt;&lt;br /&gt;
&lt;p&gt;
Installation was straight forward once you have Visual Studio 2008 installed, just call &lt;tt&gt;build.bat&lt;/tt&gt; and wait an hour or so.</description>
  </item>
  <item>
    <title>M4RI API Change and Big Matrices</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2009/03/20#big-matrices-vs-m4ri</link>
    <description>Finally, I found some time to work on M4RI again: I changed the internal representation of matrices to support more than one &lt;tt&gt;malloc()&lt;/tt&gt; call per matrix, i.e. each matrix is split into blocks of some maximal size. This allows to deal with much bigger matrices under Linux because the kernel often won&amp;#8217;t just give you 8GB mapped to consecutive addresses but it will give you 1GB eight times. This limitation bugged me quite some time now, since this also limited the kind of systems I could solve using &lt;a href=&quot;http://polybori.sourceforge.net&quot;&gt;PolyBoRi&lt;/a&gt; with M4RI enabled. The result is available at &lt;a href=&quot;http://bitbucket.org/malb/m4ri/&quot;&gt;http://bitbucket.org/malb/m4ri/&lt;/a&gt; but bear in mind that the API changed quite a bit for this (e.g., I renamed the &lt;tt&gt;packedmatrix&lt;/tt&gt; to &lt;tt&gt;mzd_t&lt;/tt&gt;) on the way).
&lt;/p&gt;
&lt;table&gt;
&lt;caption&gt;64-bit Ubuntu, Xeon X7400 @2.66GHz&lt;/caption&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Matrix&lt;br /&gt;Dimension&lt;/th&gt;
&lt;th&gt;Memory&lt;br /&gt;(expected)&lt;/th&gt;
&lt;th&gt;M4RI/M4RI &lt;br /&gt;(64-bit, 1 core)&lt;/th&gt;
&lt;th&gt;M4RI/PLUQ &lt;br /&gt;(64-bit, 1 core)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;100,000 x 100,000&lt;/td&gt; &lt;td&gt;&amp;gt; 1.16 GB&lt;/td&gt; &lt;td&gt;1078.72 s&lt;/td&gt; &lt;td&gt; 429.32 s&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;200,000 x 200,000&lt;/td&gt; &lt;td&gt;&amp;gt; 4.65 GB&lt;/td&gt; &lt;td&gt;      &amp;#8212; &lt;/td&gt; &lt;td&gt;2298.30 s&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;256,000 x 256,000&lt;/td&gt; &lt;td&gt;&amp;gt; 7.63 GB&lt;/td&gt; &lt;td&gt;8979.33 s&lt;/td&gt; &lt;td&gt;3709.25 s&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
The above table gives the time to compute the rank of random matrices of the given dimension using the given algorithms on &lt;a href=&quot;http://geom.math.washington.edu&quot;&gt;http://geom.math.washington.edu&lt;/a&gt;.</description>
  </item>
  <item>
    <title>Sage hits Debian/unstable</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2009/02/02#sage-hits-debian-unstable</link>
    <description>As &lt;em&gt;jzmer&lt;/em&gt; just pointed out on #sage-devel, &lt;a href=&quot;http://www.sagemath.org/&quot;&gt;Sage&lt;/a&gt; hit &lt;a href=&quot;http://packages.debian.org/sid/sagemath&quot;&gt;Debian/unstable&lt;/a&gt; today-ish. Of course, this also means that the wealth of math software Sage ships (e.g., &lt;a href=&quot;http://www.singular.uni-kl.de/&quot;&gt;Singular&lt;/a&gt;) is now also &lt;a href=&quot;http://packages.debian.org/sid/singular&quot;&gt;available&lt;/a&gt; in Debian/unstable. Well done &lt;a href=&quot;http://web.mit.edu/tabbott/www/&quot;&gt;Tim&lt;/a&gt;!
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;Update:&lt;/b&gt;Carl &amp;#8212; also on IRC &amp;#8212; points out that there are issues with the binary shipped with Debian as of now. Hopefully, this will get resolved quickly.</description>
  </item>
  <item>
    <title>F4-Style F5</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2009/01/25#f4-style-f5</link>
    <description>When I asked Jean-Charles Faug&amp;egrave;re a while back why he doesn&amp;#8217;t publish his F4-style F5 he answered that there would be nothing to publish since it is straight forward. I don&amp;#8217;t know about that but I was actually quite surprised how quickly &lt;a href=&quot;http://www.math.usm.edu/perry/&quot;&gt;John Perry&lt;/a&gt; and I could come up with an F4-style F5 here at &lt;a href=&quot;http://wiki.sagemath.org/days12&quot;&gt;Sage Days 12&lt;/a&gt; (&lt;a href=&quot;http://www.flickr.com/photos/martinralbrecht/tags/sagedays12/&quot;&gt;pictures&lt;/a&gt;). Btw. Till Stegers calls this F4.5 but I don&amp;#8217;t know how Jean-Charles Faug&amp;egrave;re refers it.
&lt;/p&gt;
&lt;p&gt;
I&amp;#8217;ve uploaded the toy implementation to &lt;a href=&quot;http://bitbucket.org/malb/algebraic_attacks/src/tip/f5.py&quot;&gt;bitbucket&lt;/a&gt;. It seems to behave like the polynomial F5 implementation in the same file, so at least it is bug by bug compatible with that. Speaking of behaviour: When computing Cyclic-6 over $\mathbb{F}_{32003}$ w.r.t. &lt;em&gt;degrevlex&lt;/em&gt; I noticed that my F4 implementation only goes up to degree 16 while my F5 implementations need to consider degree 18. Although no matrix is constructed for degree 18, the F4-style F5 does construct and eliminate a matrix for degree 17 &amp;#8230; puzzling.</description>
  </item>
  <item>
    <title>Bitslicing and the Method of the Four Russians over Larger Finite Fields</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2009/01/16#m4ri-larger-fields</link>
    <description>Tom Boothby&amp;#8217;s and Robert Bradshaw&amp;#8217;s paper on the &amp;#8220;Method of the Four Russian&amp;#8221; multiplication algorithm over $\mathbb{F}_3$, $\mathbb{F}_5$, $\mathbb{F}_7$, $\mathbb{F}_{2^2}$ and $\mathbb{F}_{2^3}$ is &lt;a href=&quot;http://arxiv.org/abs/0901.1413&quot;&gt;available&lt;/a&gt; as pre-print on the arXiv. If you&amp;#8217;re into fast exact linear algebra I highly recommend reading it since it has some really nice ideas in it and is well written.
&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Abstract&lt;/b&gt;. &amp;#8220;We present a method of computing with matrices over very small finite fields of size larger than 2. Specifically, we show how the Method of Four Russians can be efficiently adapted to these larger fields, and introduce a row-wise matrix compression scheme that both reduces memory requirements and allows one to vectorize element operations. We also present timings which confirm the efficiency of these methods and exceed the speed of the fastest implementations the authors are aware of.&amp;#8221;</description>
  </item>
  <item>
    <title>M4RI-20090105 Released</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2009/01/05#m4ri-20090105-released</link>
    <description>Sources are available for &lt;a href=&quot;http://m4ri.sagemath.org/downloads/&quot;&gt;download&lt;/a&gt;. See &lt;a href=&quot;http://www.bitbucket.org/malb/m4ri/wiki/M4RI-20090105&quot;&gt;release notes&lt;/a&gt; for details about what changed since the last version and some timings (&lt;a href=&quot;http://m4ri.sagemath.org/performance.html&quot;&gt;1&lt;/a&gt;, 
&lt;a href=&quot;http://www.bitbucket.org/malb/m4ri/wiki/Timings&quot;&gt;2&lt;/a&gt;, 
&lt;a href=&quot;http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2008/12/23#m4ri-density&quot;&gt;3&lt;/a&gt;, 
&lt;a href=&quot;http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2009/01/03#m4ri-200901&quot;&gt;4&lt;/a&gt;) to get an idea of the performance.</description>
  </item>
  <item>
    <title>M4RI&amp;#8217;s and MMPF&amp;#8217;s Sensitivity to Density</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2008/12/23#m4ri-density</link>
    <description>The last couple of days I&amp;#8217;ve been working on improving libM4RI for sparse-ish matrices. The matrices I am talking about here are still represented as dense matrices but have non-uniformly distributed entries. While PLUQ factorisation is still very very (very very) slow for e.g. half rank matrices, things are getting better for M4RI matrix elimination.
&lt;/p&gt;
&lt;img src=&quot;http://www.informatik.uni-bremen.de/~malb/binary/m4ri-r219-vs-r221.png&quot; alt=&quot;r219 vs. r221&quot; /&gt;
&lt;p&gt;
The &lt;a href=&quot;http://www.bitbucket.org/malb/m4ri/src/221/src/brilliantrussian.c&quot;&gt;updated&lt;/a&gt; sources are available on bitbucket. I will probably cut a new release very early next year.</description>
  </item>
  <item>
    <title>&amp;#8220;Efficient Multiplication of Dense Matrices over GF(2)&amp;#8221;</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2008/11/12#m4ri-matmul-paper</link>
    <description>&amp;#8220;&lt;a href=&quot;http://arxiv.org/abs/0811.1714&quot;&gt;We describe&lt;/a&gt; an efficient implementation of a hierarchy of algorithms for multiplication of dense matrices over the field with two elements (GF(2)). In particular we present our implementation - in the M4RI library - of Strassen-Winograd matrix multiplication and the &amp;#8220;Method of the Four Russians&amp;#8221; multiplication (M4RM) and compare it against other available implementations. Good performance is demonstrated on on AMD&amp;#8217;s Opteron and particulary good performance on Intel&amp;#8217;s Core 2 Duo. The open-source M4RI library is available stand-alone as well as part of the Sage mathematics software.
&lt;/p&gt;
&lt;p&gt;
In machine terms, addition in GF(2) is logical-XOR, and multiplication is logical-AND, thus a machine word of 64-bits allows one to operate on 64 elements of GF(2) in parallel: at most one CPU cycle for 64 parallel additions or multiplications. As such, element-wise operations over GF(2) are relatively cheap. In fact, in this paper, we conclude that the actual bottlenecks are memory reads and writes and issues of data locality. We present our empirical findings in relation to minimizing these and give an analysis thereof.&amp;#8221;
&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Related News:&lt;/b&gt; My shiny new version of Magma 2.14-17 seems to perform better than Magma 2.14-14 for matrix multiplication over $\mathbf{F}_2$ on the Core 2 Duo. So I updated the &lt;a href=&quot;http://m4ri.sagemath.org/performance.html&quot;&gt;performance data&lt;/a&gt; on the M4RI website. However, the &lt;a href=&quot;https://magma.maths.usyd.edu.au/magma/export/changelog.shtml&quot;&gt;changelog&lt;/a&gt; doesn&amp;#8217;t mention any improvements in this area. Btw. &lt;a href=&quot;http://www.google.com/search?q=Magma+2.14&quot;&gt;searching for &amp;#8220;Magma 2.14&amp;#8221;&lt;/a&gt; returns the M4RI website first for me, which feels wrong on so many levels. Finally, M4RI is &lt;a href=&quot;https://bugzilla.redhat.com/show_bug.cgi?id=470173&quot;&gt;being packaged&lt;/a&gt; for Fedora Core.</description>
  </item>
  <item>
    <title>Yet Another Talk on Sage</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2008/11/06#sage-talk-200811-egham</link>
    <description>Today, I gave a talk on Sage to the ISG PhD seminar at Royal Holloway. I think it went alright, although people around here just don&amp;#8217;t get excited about computation that much. Anyway, I&amp;#8217;ve uploaded the &lt;a href=&quot;http://www.informatik.uni-bremen.de/~malb/talks/20081106%20-%20Sage%20-%20Egham.pdf&quot;&gt;slides&lt;/a&gt; and the demo (&lt;a href=&quot;http://www.informatik.uni-bremen.de/~malb/talks/20081106%20-%20Sage%20-%20Egham%20-%20Demo.pdf&quot;&gt;pdf&lt;/a&gt;, &lt;a href=&quot;http://www.informatik.uni-bremen.de/~malb/talks/20081106%20-%20Sage%20-%20Egham%20-%20Demo.sws&quot;&gt;worksheet&lt;/a&gt;).</description>
  </item>
  <item>
    <title>Matrix F5</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2008/10/26#matrix-f5-fixed</link>
    <description>I finally fixed my &lt;a href=&quot;http://www.informatik.uni-bremen.de/~malb/binary/f5matrix.py&quot;&gt;Matrix $F_5$ implementation&lt;/a&gt;. I&amp;#8217;ll also give a talk about Matrix $F_5$ to the PhD seminar at &lt;a href=&quot;http://www.isg.rhul.ac.uk/&quot;&gt;ISG&lt;/a&gt; on November 27th. I&amp;#8217;ll the post the slides around then for those interested. </description>
  </item>
  <item>
    <title>Bits and Pieces</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2008/10/20#sage-days-10</link>
    <description>I spent last week at &lt;a href=&quot;http://wiki.sagemath.org/days10&quot;&gt;Sage Days 10&lt;/a&gt; (&lt;a href=&quot;http://picasaweb.google.com/wstein/10&quot;&gt;pictures&lt;/a&gt; and &lt;a href=&quot;http://picasaweb.google.co.uk/j.spies88/SageDays10AtNancy?authkey=S6KBCzf-v34#&quot;&gt;more pictures&lt;/a&gt;) in Nancy, France which turned out to be a very nice event. I (together with &lt;a href=&quot;http://users.minet.uni-jena.de/~king/eindex.html&quot;&gt;Simon King&lt;/a&gt;, &lt;a href=&quot;http://www.mfo.de/organisation/institute/brickenstein/&quot;&gt;Michael Brickenstein&lt;/a&gt; and &lt;a href=&quot;http://www-spiral.lip6.fr/~perret/&quot;&gt;Ludovic Perret&lt;/a&gt;) spent most of my time working on various toy implementations of &lt;a href=&quot;http://fgbrs.lip6.fr/%40papers/F02a.pdf&quot;&gt;F5&lt;/a&gt; in order to understand the algorithm (better). We also conversed with &lt;a href=&quot;http://www.math.usm.edu/perry/&quot;&gt;John Perry&lt;/a&gt; who&amp;#8217;s &lt;a href=&quot;http://www.math.usm.edu/perry/Research/F5Pseudocode.pdf&quot;&gt;pseudcode&lt;/a&gt;, &lt;a href=&quot;http://www.math.usm.edu/perry/Research/f5_library.lib&quot;&gt;Singular&lt;/a&gt; code and description of F5 was incredibly helpful (and motivated me to work on this project in the first place, btw). My &lt;a href=&quot;http://www.informatik.uni-bremen.de/~malb/binary/f5.py&quot;&gt;toy implementation&lt;/a&gt; of the polynomial version of F5 is available online and so is Simon King&amp;#8217;s &lt;a href=&quot;http://wiki.sagemath.org/days10/CodingSprint&quot;&gt;Cython implementation&lt;/a&gt; for Sage. John Perry now also provides a &lt;a href=&quot;http://www.math.usm.edu/perry/Research/f5_sugar.py&quot;&gt;non-homogeneous version of F5&lt;/a&gt; based on my &lt;a href=&quot;http://www.sagemath.org&quot;&gt;Sage&lt;/a&gt; implementation.
&lt;/p&gt;
&lt;p&gt;I also implemented
a &lt;a href=&quot;http://www.informatik.uni-bremen.de/~malb/binary/f5matrix.py&quot;&gt;toy
version&lt;/a&gt; of F5/Matrix which indeed avoids a fair number of zero
reductions and returns a Groebner basis if $d_{max}$ is big enough. I
don&amp;#8217;t think it does avoid as many reductions as the polynomial version
which indicates a problem in my code. Note, that F5/Matrix is
not described in detail in English literature (if you speak French and
want to translate some short notes on this algorithms to English,
please let me know).
&lt;/p&gt;

&lt;p&gt;
I didn&amp;#8217;t work on &lt;a href=&quot;http://m4ri.sagemath.org&quot;&gt;M4RI&lt;/a&gt; during Sage Days 10 but &lt;a href=&quot;http://www.math.washington.edu/~pernet/&quot;&gt;Clement Pernet&lt;/a&gt; and &lt;a href=&quot;http://ljk.imag.fr/membres/Jean-Guillaume.Dumas/&quot;&gt;Jean-Guillaume Dumas&lt;/a&gt; did. We will probably release a new version with tried and tested TRSM code soon. Btw. I also gave a &lt;a href=&quot;http://www.informatik.uni-bremen.de/~malb/talks/20081010 - M4RI - Nancy.pdf&quot;&gt;contributed talk about M4RI&lt;/a&gt; at Sage Days 10. My project for a train ride right after Sage Days 10 was to improve &lt;a href=&quot;http://trac.sagemath.org/sage_trac/ticket/4302&quot;&gt;univariate polynomials&lt;/a&gt; over $\mathbb{F}_2$ in Sage to improve modular composition of polynomials.
&lt;/p&gt;
&lt;p&gt;
I&amp;#8217;m off to Santander on Wednesday for the &lt;a href=&quot;http://grupos.unican.es/amac/wmc-2008/&quot;&gt;2nd Workshop on Mathematical Cryptology&lt;/a&gt; and once I&amp;#8217;m back I&amp;#8217;ll give a talk at the &lt;a href=&quot;https://www.srcf.ucam.org/cugms/node/726&quot;&gt;Graduate Studies Elsewhere Open Afternoon&lt;/a&gt; in Cambridge on &amp;#8220;Algebraic Attacks against Block Ciphers&amp;#8221;.
&lt;/p&gt;
&lt;p&gt;One last thing: The DES generator is broken due to a bug in Sage, a &lt;a href=&quot;http://trac.sagemath.org/sage_trac/ticket/4324&quot;&gt;fix&lt;/a&gt; is available on Trac.
&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Update:&lt;/b&gt;fixed a bug in the F5/Matrix code and removed a nonsense statement about the rank of the matrices.</description>
  </item>
  <item>
    <title>Gr&amp;ouml;bner Bases over $ZZ$</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2008/08/22#gb-over-zz</link>
    <description>Vanilla Sage does not compute Gr&amp;ouml;bner bases over $ZZ$ by any definition. However, this feature has been requested several times. The earliest account I could find quickly is &lt;a href=&quot;http://osdir.com/ml/mathematics.sage.devel/2007/msg00626.html&quot;&gt;this post&lt;/a&gt; by Joe Wetherell. Below is a list of options for Gr&amp;ouml;bner bases over $ZZ$ in Sage.
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://www.singular.uni-kl.de/&quot;&gt;Singular&lt;/a&gt;&amp;#8217;s upcoming release will feature Gr&amp;ouml;bner bases over rings. In fact, the feature is present in the current Singular release but not enabled by default. An SPKG with that functionality enabled can be found &lt;a href=&quot;http://sage.math.washington.edu/home/malb/spkgs/singular-3-0-4-4-20080722.p0.spkg&quot;&gt;here&lt;/a&gt;. &lt;em&gt;ring r = integers,(x,y),lp;&lt;/em&gt; declares a ring over the integers where some things work and some things don&amp;#8217;t. Note that this ring declaration is not final, i.e. the name &lt;em&gt;integers&lt;/em&gt; may change. Also, this SPKG has issues and crashes on me for some operations. We&amp;#8217;re working on tracking that issue down.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.math.uiuc.edu/Macaulay2/&quot;&gt;Macaulay2&lt;/a&gt; has support for Gr&amp;ouml;bner bases over rings and a decent Sage interface supporting that functionality. Macaulay2 1.1 is available as an experimental SPKG. First, one needs to install &lt;em&gt;boehm_gc-7.1.p0&lt;/em&gt; and &lt;em&gt;gdbm-1.8.3&lt;/em&gt;. Then, since the version in experimental didn&amp;#8217;t compile for me, try my new &lt;a href=&quot;http://trac.sagemath.org/sage_trac/ticket/3926&quot;&gt;SPKG&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;If you are lucky enough to have &lt;a href=&quot;http://magma.maths.usyd.edu.au/magma/&quot;&gt;Magma&lt;/a&gt; installed, &lt;em&gt;I.groebner_basis(&amp;#8220;magma:GroebnerBasis&amp;#8221;)&lt;/em&gt; does the job. If you don&amp;#8217;t have Magma installed try &lt;em&gt;magma_free&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://invo.jinr.ru/ginv/index.html&quot;&gt;Ginv&lt;/a&gt; (also available as a optional package) also supports Gr&amp;ouml;bner bases over $ZZ$. However, for the example Joe gave in his e-mail it crashes on me and I&amp;#8217;ve contacted upstream about it.&lt;/li&gt;
&lt;li&gt;Last and least: I have a &lt;a href=&quot;http://sage.math.washington.edu/home/malb/py/gbzz.py&quot;&gt;toy implementation&lt;/a&gt; of the $d$-Gr&amp;ouml;bner basis algorithm from &lt;a href=&quot;http://www.amazon.co.uk/Grobner-Bases-Computational-Commutative-Mathematics/dp/3540979719/&quot;&gt;the Becker-Weispfenning&lt;/a&gt;. Don&amp;#8217;t hold your breath, it is dead slow.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Hopefully, due to the upcoming Singular release the situation will improve soon and we&amp;#8217;ll finally have Gr&amp;ouml;bner bases over $ZZ$ in Sage.</description>
  </item>
  <item>
    <title>Parallel Matrix Elimination</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2008/08/18#parallel-matrix-elimination</link>
    <description>I released a new version of &lt;a href=&quot;http://m4ri.sagemath.org&quot;&gt;M4RI&lt;/a&gt; today which contains a parallel implementation for matrix elimination. Below I reproduce some timings for this code to give a rough idea of the performance of this code.
&lt;/p&gt;
&lt;table&gt;
&lt;caption&gt;64-bit Debian/GNU Linux, 2.6Ghz Opteron (Virtualised)&lt;/caption&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Matrix&lt;br /&gt;Dimension&lt;/th&gt;
&lt;th&gt;Magma 2.14-13 &lt;br /&gt;(64-bit, 1 core)&lt;/th&gt;
&lt;th&gt;M4RI &lt;br /&gt;(64-bit, 1 core)&lt;/th&gt;
&lt;th&gt;M4RI &lt;br /&gt;(64-bit, 4 cores)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;10,000 x 10,000&lt;/td&gt;&lt;td&gt;  3.283&lt;/td&gt; &lt;td&gt;  2.509&lt;/td&gt; &lt;td&gt;  1.064&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;16,384 x 16,384&lt;/td&gt;&lt;td&gt; 11.204&lt;/td&gt; &lt;td&gt; 10.741&lt;/td&gt; &lt;td&gt;  3.918&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;20,000 x 20,000&lt;/td&gt;&lt;td&gt; 16.911&lt;/td&gt; &lt;td&gt; 19.776&lt;/td&gt; &lt;td&gt;  7.216&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;32,000 x 32,000&lt;/td&gt;&lt;td&gt; 57.761&lt;/td&gt; &lt;td&gt; 86.071&lt;/td&gt; &lt;td&gt; 32.420&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;64,000 x 64,000&lt;/td&gt;&lt;td&gt;355.477&lt;/td&gt; &lt;td&gt;640.742&lt;/td&gt; &lt;td&gt;307.213&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
The examples hfe25_5, hfe30_5 and hfe35_5 from the M4RI &lt;a href=&quot;http://m4ri.sagemath.org/performance.html&quot;&gt;website&lt;/a&gt; take 1.44, 9.29 and 51.56 seconds respectively.
&lt;/p&gt;
&lt;p&gt;
Note that this is work in progress and that the algorithm still has worse complexity than the one implemented in Magma. Also note that the speed-up is far from linear and that the speed-up decreases with the size. This is probably because each thread falls out of L2 more often and the threads clog each other.



</description>
  </item>
  <item>
    <title>GCC 4.3 and -O3</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2008/08/11#gcc-43-and-O3</link>
    <description>I recently upgraded an Opteron server to Debian/Lenny to get GCC 4.3 for &lt;a href=&quot;http://www.openmp.org&quot;&gt;OpenMP&lt;/a&gt; reasons. It turns out that my code, namely matrix multiplication as implemented in the &lt;a href=&quot;http://m4ri.sagemath.org&quot;&gt;M4RI&lt;/a&gt; library, ran much slower than when compiled with GCC 4.1. For instance, to multiply two $20,000 \times 20,000$ random matrices took 18.38 seconds with GCC 4.1 but 21.00 seconds with GCC 4.3.1 and to multiply two $32,000 \times 32,000$ random matrices took 70.24 seconds with GCC 4.1 but 80.00 second with GCC 4.3.1. Eventually, I checked the highlevel &lt;a href=&quot;http://gcc.gnu.org/gcc-4.3/changes.html&quot;&gt;changelog&lt;/a&gt; and found: &amp;#8220;The -ftree-vectorize option is now on by default under -O3. In order to  generate code for a SIMD extension, it has to be enabled as well: use -maltivec for PowerPC platforms and -msse/-msse2 for i?86 and x86_64.&amp;#8221; However, we don&amp;#8217;t use SSE2 on the Opteron since it is slower than the standard instruction set for this application. Passing -no-tree-vectorize to the compiler fixed the problem. However, to my surprise -O2 didn&amp;#8217;t come with a speed penalty either, so I settled for this. The final timings on my Opteron server are:
&lt;/p&gt;
&lt;table&gt;
&lt;caption&gt;64-bit Debian/GNU Linux, 2.6Ghz Opteron (Virtualised)&lt;/caption&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Matrix&lt;br /&gt;Dimension&lt;/th&gt;
&lt;th&gt;M4RI GCC 4.3&lt;br /&gt;(64-bit, 4 cores)&lt;/th&gt;
&lt;th&gt;M4RI GCC 4.3&lt;br /&gt;(64-bit, 1 core)&lt;/th&gt;
&lt;th&gt;M4RI GCC 4.1&lt;br /&gt;(64-bit, 1 core)&lt;/th&gt;
&lt;th&gt;Magma 2.14-13&lt;br /&gt;(64-bit, 1 core)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;20000x20000&lt;/td&gt;&lt;td&gt;6.36&lt;/td&gt;&lt;td&gt;17.81&lt;/td&gt;&lt;td&gt;18.38&lt;/td&gt;&lt;td&gt;18.35&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;32000x32000&lt;/td&gt;&lt;td&gt;26.65&lt;/td&gt;&lt;td&gt;68.01&lt;/td&gt;&lt;td&gt;70.24&lt;/td&gt;&lt;td&gt;68.01&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
I suppose the moral of the story is: -O3 isn&amp;#8217;t necessarily better than -O2 just because 3&gt;2.</description>
  </item>
  <item>
    <title>Scapy and Sage</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2008/07/08#scapy</link>
    <description>&amp;#8220;&lt;a href=&quot;http://www.secdev.org/projects/scapy/&quot;&gt;Scapy&lt;/a&gt; is a powerful interactive packet manipulation program. It is able to forge or decode packets of a wide number of protocols, send them on the wire, capture them, match requests and replies, and much more. It can easily handle most classical tasks like scanning, tracerouting, probing, unit tests, attacks or network discovery (it can replace hping, 85% of nmap, arpspoof, arp-sk, arping, tcpdump, tethereal, p0f, etc.). It also performs very well at a lot of other specific tasks that most other tools can&amp;#8217;t handle, like sending invalid frames, injecting your own 802.11 frames, combining technics (VLAN hopping+ARP cache poisoning, VOIP decoding on WEP encrypted channel, &amp;#8230;)&amp;#8221;
&lt;/p&gt;
&lt;p&gt;
At the end of the day Scapy is one (&lt;b&gt;one&lt;/b&gt;!) Python file so it couldn&amp;#8217;t be easier to use it from within Sage. As an example let&amp;#8217;s assume we have sniffed an SSH connection establishment including a Diffie-Hellmann Group Exchange as described in RFC &lt;a href=&quot;http://www.ietf.org/rfc/rfc4419.txt&quot;&gt;4419&lt;/a&gt;. Scapy can do live packet capture and injection but that would require root privileges, so I&amp;#8217;m working with a pcap file in this example:
&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;scapy&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rdpcap&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;TCP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;IP&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;SSH2_MSG_KEX_DH_GEX_GROUP&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;31&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# read packets&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;packets&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rdpcap&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;/home/malb/example.pcap&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; \
               &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TCP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TCP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;32&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# find correct package &amp;amp; payload&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;packet&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;packets&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;ord&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;packet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;TCP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;payload&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kp&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SSH2_MSG_KEX_DH_GEX_GROUP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;break&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;except&lt;/span&gt; &lt;span class=&quot;ne&quot;&gt;AttributeError&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;pass&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;get_uint&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;c&quot;&gt;# this is not as generic as it should be since it doesn&amp;#39;t work&lt;/span&gt;
    &lt;span class=&quot;c&quot;&gt;# with negative numbers&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ZZ&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:]&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;packet_length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get_uint&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;padlen&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get_uint&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;packet_type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get_uint&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;assert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;packet_type&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SSH2_MSG_KEX_DH_GEX_GROUP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# p&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;p_length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get_uint&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get_uint&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p_length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# g&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;g_length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get_uint&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get_uint&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;g_length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;assert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;padlen&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;assert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;is_prime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;Zp&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;GF&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;g&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Zp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;e&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ZZ&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;random_element&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kp&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;# yeah, right ;-)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;
Happy hacking.</description>
  </item>
  <item>
    <title>XOR for Fun and Profit</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2008/06/20#dev1-xor-for-fun-and-profit</link>
    <description>I just gave a talk on linear algebra over GF(2), optimisation techniques and applications to algebraic cryptanalysis. Slides are available &lt;a href=&quot;http://www.informatik.uni-bremen.de/~malb/talks/20080620%20-%20XOR%20-%20Seattle.pdf&quot;&gt;online&lt;/a&gt;.</description>
  </item>
  <item>
    <title>libM4RI in Debian Unstable</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2008/06/20#libm4ri-debian</link>
    <description>&lt;/p&gt;
&lt;pre&gt;
malb@XXX:~$ apt-cache search m4ri  
libm4ri-dev - Method of the Four Russians library, development files
libm4ri0 - Method of the Four Russians library, shared library
&lt;/pre&gt;
&lt;p&gt;
Big thanks to &lt;a href=&quot;http://web.mit.edu/tabbott/www/&quot;&gt;Tim&lt;/a&gt; for making that happen!</description>
  </item>
  <item>
    <title>Fraction Free Gauss-Jordan Errata</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2008/06/13#gauss-jordan-storjohann</link>
    <description>I&amp;#8217;m at Sage&amp;#8217;s &lt;a href=&quot;http://wiki.sagemath.org/dev1&quot;&gt;dev1&lt;/a&gt; right now and so I have the pleasure of meeting &lt;a href=&quot;http://www.cs.uwaterloo.ca/~astorjoh/&quot;&gt;Arne Storjohann&lt;/a&gt;. In his &lt;a href=&quot;http://www.cs.uwaterloo.ca/~astorjoh/dissA4.ps&quot;&gt;thesis&lt;/a&gt; he presented a fraction free asymptotically fast matrix elimination algorithm which unfortunately has some typos in it. Below I replicate the correct algorithm he explained/provided me yesterday:
&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;GaussJordan&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=-&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;d0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;d0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;d0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;base_ring&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;n&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nrows&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;m&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ncols&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;I&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;MatrixSpace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;base_ring&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(),&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nrows&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(),&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nrows&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;xrange&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;xrange&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)):&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;break&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;U&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;h&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;d&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;d0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;I&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;I&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;d0&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;U&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;h&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;m&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;xrange&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;P&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;copy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;I&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;swap_rows&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;h&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;d&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;U&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;I&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;U&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;U&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;d0&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
     &lt;span class=&quot;n&quot;&gt;m1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;m2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt;
     &lt;span class=&quot;n&quot;&gt;A1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;matrix_from_columns&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;m1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
     &lt;span class=&quot;n&quot;&gt;B&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;matrix_from_columns&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;m1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
     &lt;span class=&quot;n&quot;&gt;U1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;P1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;r1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;h1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;d1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;GaussJordan&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;A1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;d0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
     &lt;span class=&quot;n&quot;&gt;A2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;d0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;U1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;P1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;B&lt;/span&gt;
     &lt;span class=&quot;n&quot;&gt;U2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;P2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;r2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;h2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;d&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;GaussJordan&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;A2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;r1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;d1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
     &lt;span class=&quot;n&quot;&gt;U&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;d1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;U2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;P2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;U1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;d1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;I&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;d1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;I&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
     &lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;h&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;d&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;P2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;P1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;r1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;r2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;h1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;h2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;d&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;U&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;h&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;d&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Note that this is not how one would actually implement this algorithm in practice: it is pseudo-code that happens to run in Sage. For a practical implementation check the &lt;a href=&quot;http://www.scg.uwaterloo.ca/~z4chen/iml.html&quot;&gt;IML&lt;/a&gt; library.</description>
  </item>
  <item>
    <title>M4RI Website</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2008/05/13#m4ri-website</link>
    <description>I finally put together the &lt;a href=&quot;http://sage.math.washington.edu/home/malb/m4ri&quot;&gt;website for the M4RI library&lt;/a&gt;. For those who don&amp;#8217;t know M4RI:&lt;/p&gt;
&lt;p&gt;&amp;#8220;M4RI is a library for fast arithmetic with dense matrices over $\mathbb{F}_2$. It was started by Gregory Bard and is now maintained by Martin Albrecht and Gregory Bard. The name M4RI comes from the first implemented algorithm: The &amp;#8220;Method of the Four Russians&amp;#8221; inversion algorithm published by Gregory Bard. This algorithm in turn is named after the &amp;#8220;Method of the Four Russians&amp;#8221; multiplication algorithm which is probably better referred to as Kronrod&amp;#8217;s method. M4RI is used by the &lt;a href=&quot;http://www.sagemath.org&quot;&gt;Sage&lt;/a&gt; mathematics software and the &lt;a href=&quot;http://polybori.sourceforge.net&quot;&gt;PolyBoRi&lt;/a&gt; library. M4RI is available under the General Public License Version 2 or later (GPLv2+).&lt;/p&gt;
&lt;p&gt;Features of the M4RI library include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;basic arithmetic with dense matrices over $\mathbb{F}_2$ (addition, equality testing, stacking, augmenting, sub-matrices, randomisation)&lt;/li&gt;
&lt;li&gt;asymptotically fast $O(n^{log_27})$ matrix multiplication via the &amp;#8220;Method of the Four Russians&amp;#8221; (M4RM) &amp;amp; Strassen-Winograd algorithm, &lt;/li&gt;
&lt;li&gt;asymptotically fast $O(n^{3}/log_2(n))$ row echelon form computation and matrix inversion via the &amp;#8220;Method of the Four Russians&amp;#8221; (M4RI), and&lt;/li&gt;
&lt;li&gt;support for the x86/x86_64 SSE2 instruction set where available.&lt;/li&gt;
&lt;li&gt;support for Linux and OS X (&lt;a href=&quot;http://gcc.gnu.org&quot;&gt;GCC&lt;/a&gt;), support for Solaris (&lt;a href=&quot;http://developers.sun.com/sunstudio/downloads/express/&quot;&gt;Sun Studio Express&lt;/a&gt;) and support for Windows (&lt;a href=&quot;http://www.microsoft.com/express/&quot;&gt;Visual Studio 2008 Express&lt;/a&gt;).&amp;#8221;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Performance-wise it is doing okay but not great. On Intel&amp;#8217;s Core2Duo it seems to compare favourably to Magma 2.13. Though, I don&amp;#8217;t have access to Magma 2.14 yet which improves dense linear algebra over $\mathbb{F}_2$. However, on AMD&amp;#8217;s Opteron it is way behind Magma 2.13. This is possibly due to the 1MB L2 cache of the Opteron vs. 4MB L2 cache of the Core2Duo.</description>
  </item>
  <item>
    <title>A Cryptographic Tour and Todo List of Sage</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2008/03/21#sage-crypto-todo</link>
    <description>Yesterday someone showed up on &lt;a href=&quot;http://groups.google.com/group/sage-devel/&quot;&gt;[sage-devel]&lt;/a&gt; and &lt;a href=&quot;http://groups.google.com/group/sage-devel/browse_thread/thread/9557f299b1ec2fab&quot;&gt;wrote&lt;/a&gt;:
&amp;#8220;I have been developing software and doing research in the areas of: 
mathematics, cryptography algorithms, encryption, and would like to 
contribute my time and effort to the Sage project. I would like any 
of you to get me started in the right direction, any info would be 
appreciated.&amp;#8221;
&lt;/p&gt;
&lt;p&gt;
This is the edited/polished version of my reply. I am posting it here in case anyone else wonders how to contribute to Sage
for cryptographic research.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt; &lt;a href=&quot;http://echidna.maths.usyd.edu.au/~kohel&quot;&gt;David Kohel&lt;/a&gt; wrote an introductionary &lt;a href=&quot;http://echidna.maths.usyd.edu.au/~kohel/tch/Crypto/crypto.pdf&quot;&gt;book&lt;/a&gt; to cryptography. He uses Sage in the book and wrote a fair amount of code to make that happen. The relevant module is &lt;b&gt;sage.crypto&lt;/b&gt;. For example, it implements a &lt;a href=&quot;http://en.wikipedia.org/wiki/LFSR&quot;&gt;linear feedback shift register&lt;/a&gt;:
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FF&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FiniteField&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;PolynomialRing&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;FF&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;E&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LFSRCryptosystem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;FF&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;E&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;LFSR&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cryptosystem&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;over&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Finite&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Field&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;size&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;IS&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FF&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;g&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;^&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;E&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IS&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;B&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;BinaryStrings&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;m&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;B&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;encoding&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;THECATINTHEHAT&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;mf&quot;&gt;0010001101111010111010101010001100000000110100010101011100001011110010010000011111100100100011001101101000001111&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
It seems the code needs more documentation and also some areas are not implemented yet, e.g. block ciphers.
&lt;/li&gt;
&lt;li&gt; Sage ships &lt;a href=&quot;http://www.amk.ca/python/code/crypto&quot;&gt;PyCrypto&lt;/a&gt; which implements many standard cryptographic algorithms. The docstring level documentation is horrible: 

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;Crypto.Cipher.IDEA&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Crypto&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Cipher&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IDEA&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;?&lt;/span&gt;
     &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;initializes&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;see&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;__class__&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;__doc__&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;signature&lt;/span&gt;

&lt;/pre&gt;&lt;/div&gt;

It is not really meant for research/education/playing around but for production code but maybe something could be done to have easier access to it from within Sage. Here is an example how to use it:

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;Crypto.Hash&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;MD5&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;m&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;MD5&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;abc&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;digest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;s&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\x90\x01&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\x98&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\xd2&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;O&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\xb0\xd6\x96&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;?}(&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\xe1\x7f&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;r&amp;#39;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;hexdigest&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;s&quot;&gt;&amp;#39;900150983cd24fb0d6963f7d28e17f72&amp;#39;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;

&lt;li&gt;Finite fields are basic building blocks in cryptography. Sage uses several finite field implementations for prime fields and extension fields of various sizes. The &lt;b&gt;FiniteField_ext_pari&lt;/b&gt; implementation for finite extension fields of order $\ge 2^{16}$ should be replaced by two implementations using NTL&amp;#8217;s &lt;b&gt;ZZ_pE&lt;/b&gt; and &lt;b&gt;lzz_pE&lt;/b&gt; depending on the size of the characteristic. This should be relatively straight-forward because there is an implementation for characteristic 2 using NTL&amp;#8217;s &lt;b&gt;GF2E&lt;/b&gt; already. To get a feeling about the possible speed improvements:

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;GF&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;next_prime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;^&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;65&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;^&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;27&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;^&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;30&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;^&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;40&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeit&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;
&lt;span class=&quot;mf&quot;&gt;1000&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;loops&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;best&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;557&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&amp;mu;s&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;per&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;loop&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ntl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ZZ_pEContext&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ntl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ZZ_pX&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;polynomial&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()),&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;characteristic&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()))&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ZZ_pE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;polynomial&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()))&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ZZ_pE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;polynomial&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()))&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeit&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;
&lt;span class=&quot;mf&quot;&gt;10000&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;loops&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;best&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;154&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&amp;mu;s&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;per&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;loop&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;

&lt;li&gt;Sage isn&amp;#8217;t exactly kicking ass when it comes to  elliptic and hyperelliptic curves over finite fields. As these are quite 
important in asymmetric cryptography it might be worth looking into this. John Cremona &lt;a href=&quot;http://groups.google.com/group/sage-devel/msg/4bf9997218328c52&quot;&gt;added&lt;/a&gt; to this: &amp;#8220;That is fair. Apart from an SEA point-counting implementation &amp;#8212; only over prime fields &amp;#8212; the rest (for elliptic curves) is definitely only designed to work at sub-crypto field sizes.&amp;#8221;&lt;/li&gt;
 
&lt;li&gt;algebraic techniques received some attention for the cryptanalysis of symmetric cryptographic primitives recently. In these attacks the cryptanalyst expresses the cipher as a large set of multivariate polynomial equations and attempts to solve the  system. The most common case over $\mathbb{F}_2$ is handled by &lt;a href=&quot;http://polybori.sourceforge.net/&quot;&gt;PolyBoRi&lt;/a&gt;. This library is the backbone of &lt;b&gt;BooleanPolynomialRing&lt;/b&gt; and friends. This class needs testing, documentation, extension and bugfixes. Basically someone should sit down and add all the methods of &lt;b&gt;MPolynomial[Ring]_libsingular&lt;/b&gt; to &lt;b&gt;BooleanPolynomial[Ring]&lt;/b&gt; which make sense, add a ton of doctests and test the hell out of the library to make sure no SIGSEGVs surprise the user.
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;F&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;s&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sr&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;polynomial_system&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;R&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;F&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ring&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;B&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;BooleanPolynomialRing&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ngens&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(),&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;variable_names&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(),&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;term_order&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;F&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;B&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;F&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;B&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;F&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mq&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;MPolynomialSystem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;B&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;F&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;F&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;Polynomial&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;System&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;with&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;68&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Polynomials&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;36&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Variables&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;gb&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;F&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;groebner_basis&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;gb&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;k003&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;k003&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)]&lt;/span&gt;
&lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
 
&lt;li&gt;The module &lt;b&gt;sage.crypto.mq&lt;/b&gt; is also relevant for algebraic cryptanalysis in symmetric cryptography. It implements
&lt;ul&gt;
&lt;li&gt;small scale AES equation system generators over $\mathbb{F}_2$ and $\mathbb{F}_{2^n}$&lt;/li&gt;
&lt;li&gt;a class to represent multivariate polynomial systems&lt;/li&gt;
&lt;li&gt;an &lt;b&gt;S-box&lt;/b&gt; class to analyse &amp;#8230; well &amp;#8230; S-boxes.&lt;/li&gt;
&lt;/ul&gt; 
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;S&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mq&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;SBox&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;S&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;S&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;polynomials&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;x0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;x0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;x0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;x1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;x0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;x0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;x1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;x0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;x2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;x2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;y0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;y0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;y1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;S&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;difference_distribution_matrix&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;8&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt; 

&lt;li&gt;Univariate polynomials over $\mathbb{F}_2$ are still implemented via NTL&amp;#8217;s &lt;b&gt;ZZ_pX&lt;/b&gt; rather than &lt;b&gt;GF2X&lt;/b&gt;.
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;k&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;GF&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;PolynomialRing&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;P&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;random_element&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;10000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)])&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeit&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt;
&lt;span class=&quot;mf&quot;&gt;100&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;loops&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;best&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;11.1&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ms&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;per&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;loop&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ntl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;GF2X&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timeit&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt;
&lt;span class=&quot;mf&quot;&gt;100000&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;loops&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;best&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2.02&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;&amp;mu;s&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;per&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;loop&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

Furthermore there is &lt;a href=&quot;http://wwwmaths.anu.edu.au/~brent/gf2x.html&quot;&gt;gf2x&lt;/a&gt; a drop-in replacement library for NTL&amp;#8217;s GF2X
which is expected to be five times faster than NTL. Though, a formal vote is needed to get it into Sage.&lt;/li&gt;

&lt;li&gt; At the end of the day everything boils down to linear algebra. So if one improves that, everybody wins. Sparse linear algebra over $\mathbb{F}_p$ is still too slow  (Ralf-Phillip Weinmann did some work here wrapping code from eclib), there is 
no special implementation for sparse linear algebra over $\mathbb{F}_2$ (both blackbox  and reduced echelon forms), dense linear algebra over $\mathbb{F}_2$ lacks Strassen multiplication/reduction and dense linear algebra over $\mathbb{F}_{2^n}$ should probably get a specialised implementation. Note that up until a few thousand rows/columns that Sage&amp;#8217;s dense linear algebra over $\mathbb{F}_2$ is actually pretty fast.
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;A&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;random_matrix&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;GF&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;7000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;7000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;B&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;echelon_form&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;CPU&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;times&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;user&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2.91&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.04&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;total&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2.96&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;s&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;Wall&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;3.01&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;AM&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_magma_&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;magma&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cputime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;BM&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;AM&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;EchelonForm&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;magma&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cputime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;mf&quot;&gt;2.6800000000000002&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I hope this list isn&amp;#8217;t totally useless.</description>
  </item>
  <item>
    <title>Yet Another Talk on Sage</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2008/03/16#okcon-sage-talk</link>
    <description>I gave a brief talk yesterday at the &lt;a href=&quot;http://www.okfn.org/okcon/&quot;&gt;Open Knowledge Conference (OKCon)&lt;/a&gt; here in London. The &lt;a href=&quot;http://www.informatik.uni-bremen.de/~malb/talks/20080315%20-%20Sage%20-%20OKCon%20-%20London.pdf&quot;&gt;slides&lt;/a&gt; were also &lt;a href=&quot;http://groups.google.com/group/sage-devel/browse_thread/thread/c70334e728e52188/534d9877fdf7c4fd&quot;&gt;discussed&lt;/a&gt; on [sage-devel] last week. I have to admit that I underappreciated David Joyner&amp;#8217;s &lt;a href=&quot;http://groups.google.com/group/sage-devel/msg/c52348ff3f9d93ea&quot;&gt;comments&lt;/a&gt; about the expected audience. My impression is that the majority of the audience couldn&amp;#8217;t care less about the actual mathematics implemented in Sage. I suppose we still made a good impression but I had to skip most of the examples I care about due to time constraints and preceived lack of interest. After the talks I had some neat discussions with other participants, e.g. &lt;a href=&quot;http://gael-varoquaux.info/&quot;&gt;Ga&amp;euml;l Varoquaux&lt;/a&gt; from the &lt;a href=&quot;https://svn.enthought.com/enthought/wiki/MayaVi&quot;&gt;MayaVi2&lt;/a&gt; project.</description>
  </item>
  <item>
    <title>Plotting Timing Experiments</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2008/02/28#proper-plotting</link>
    <description>Like any other person I regulary need to run experiments to check how fast or slow a particular algorithm/implementation is for a given problem. The natural choice is to plot the data. This way you at least get some more or less pretty picture out of the tendious experience of having to wait for the experiment to finish. I used to write crappy code to generate these &lt;a href=&quot;http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2007/11/07#gf2e-timings&quot;&gt;pictures&lt;/a&gt; myself and I could not convince myself to remember the appropriate commands for &lt;a href=&quot;http://matplotlib.sourceforge.net/&quot;&gt;matplotlib&lt;/a&gt; and &lt;a href=&quot;http://www.r-project.org/&quot;&gt;R&lt;/a&gt;. Today I sat down and learned the five lines of code necessary to have decent plots for my experiments. I&amp;#8217;m putting examples here for no good reason except maybe to show off Sage&amp;#8217;s &lt;a href=&quot;http://wiki.sagemath.org/days7/sprints/linalg&quot;&gt;new HNF code&lt;/a&gt; which I use as a showcase.
&lt;/p&gt;
&lt;p&gt;
First lets compare how long it takes to compute the Hermite Normal Form for a given random $n \times n$ matrix with (possibly negative) integer entries of size bounded absolute by $2^{16}$.
&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;n&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;10&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;b&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;16&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;st&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;mt&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)]&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;A&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;random_matrix&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ZZ&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=-&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cputime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;E&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;echelon_form&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;st&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cputime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;AM&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_magma_&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;magma&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cputime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;EM&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;AM&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;EchelonForm&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;mt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;magma&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cputime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;pylab&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;pylab&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;clf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;# clear the figure first&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;pylab&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;figure&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# plot some data and add a legend&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;pylab&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;st&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;Sage&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; 
&lt;span class=&quot;n&quot;&gt;pylab&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;Magma&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; 
&lt;span class=&quot;n&quot;&gt;pylab&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;legend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;# print the legend&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;pylab&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;HNF for Random Matrices with $&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;$-bit Integer Entries: Sage vs. Magma&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;pylab&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ylabel&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;execution time $t$&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;# label the axes&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;pylab&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;xlabel&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;n for n x n matrix&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;pylab&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;savefig&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;foo.png&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dpi&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;72&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;# fire!&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;img src=&quot;http://www.informatik.uni-bremen.de/~malb/binary/sage_magma_hnf.png&quot; alt=&quot;sage and magma hnf&quot; /&gt;

&lt;p&gt;
Now lets use &lt;b&gt;R&lt;/b&gt; to see how the runtimes vary for random $160 \times 160$ matrices with (possible negative) integer entries bounded absolute by $2^{10}$.
&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;b&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;10&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;st&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;500&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;A&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;random_matrix&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ZZ&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;160&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;160&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=-&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cputime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;E&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;echelon_form&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;st&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cputime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;rpy&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;png&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;histogram.png&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;640&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;480&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;hist&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;st&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;seq&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1.2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;3.7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0.02&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;SAGE HNF Histogram&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;col&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;lightblue&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;prob&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;True&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;xlab&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;seconds&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lines&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;density&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;st&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bw&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;0.05&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;col&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;black&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rug&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;st&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dev_off&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;img src=&quot;http://www.informatik.uni-bremen.de/~malb/binary/hnf_histogram.png&quot; alt=&quot;hnf histogram&quot;/&gt;
&lt;p&gt;
Neat, isn&amp;#8217;t it? Btw. &lt;a href=&quot;http://pygments.org/&quot;&gt;Pygments&lt;/a&gt; is also neat, thanks rpw.</description>
  </item>
  <item>
    <title>Impressions from FSE 2008</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2008/02/20#fse2008</link>
    <description>&lt;a href=&quot;http://fse2008.epfl.ch/&quot;&gt;&lt;img src=&quot;http://www.informatik.uni-bremen.de/~malb/binary/iacr-sage.jpg&quot; alt=&quot;impression&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
If you don&amp;#8217;t get it, don&amp;#8217;t worry, it is not really funny.</description>
  </item>
  <item>
    <title>Les Troph&amp;eacute;es du Libre 2007</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2007/11/29#trophees-du-libre-2007</link>
    <description>Sage is among the finalists of this year&amp;#8217;s &amp;#8220;&lt;a href=&quot;http://tropheesdulibre.org/&quot;&gt;free software awards&lt;/a&gt;&amp;#8221; competition in the science category. The other two finalists in that category are &lt;a href=&quot;http://www-fourier.ujf-grenoble.fr/~parisse/giac.html&quot;&gt;Giac/XCas&lt;/a&gt; (&lt;a href=&quot;http://www-fourier.ujf-grenoble.fr/~parisse/giac/trophen.pdf&quot;&gt;slides&lt;/a&gt;, &lt;a href=&quot;http://www-fourier.ujf-grenoble.fr/~parisse/giac/trophee.xws&quot;&gt;session&lt;/a&gt;) and &lt;a href=&quot;http://home.gna.org/getfem/&quot;&gt;Getfem++&lt;/a&gt;. I am representing Sage in 25 minutes and I uploaded my &lt;a href=&quot;http://www.informatik.uni-bremen.de/~malb/talks/20071129 - Sage - Soissons.pdf&quot;&gt;slides&lt;/a&gt; and the demo &lt;a href=&quot;http://www.informatik.uni-bremen.de/~malb/talks/20071129 - Sage - Soissons - Demo.sws&quot;&gt;worksheet&lt;/a&gt; (&lt;a href=&quot;http://www.informatik.uni-bremen.de/~malb/talks/20071129 - Sage - Soissons - Demo.pdf&quot;&gt;PDF&lt;/a&gt;).</description>
  </item>
  <item>
    <title>$GF(2^n)$ arithmetic speed</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2007/11/07#gf2e-timings</link>
    <description>Since version &lt;a href=&quot;http://sagetrac.org/sage_trac/query?status=closed&amp;amp;milestone=sage-2.8.10&amp;amp;order=priority&quot;&gt;2.8.10&lt;/a&gt; Sage&amp;#8217;s finite extension fields of characteristic 2 and degree $\ge 16$ are implemented via NTL&amp;#8217;s GF2E rather than Pari. For some more or less random reason I timed how fast multiplying two random elements is now.
&lt;/p&gt;
&lt;p&gt;
&lt;img src=&quot;http://www.informatik.uni-bremen.de/~malb/binary/gf2n-timings.png&quot; alt=&quot;timings plot for GF(2^n)&quot;/&gt;
&lt;/p&gt;
&lt;p&gt;
The red line show the time it takes Magma 2.13-5 to multiply two random elements a million times for a given degree $n$. The green line shows the same calculation using Sage 2.8.12 with the default modulus and a Python loop. The blue line uses a Cython loop (== C loop) and the function &lt;span class=&quot;command&quot;&gt;good_modulus&lt;/span&gt; (see below) to generate a &amp;#8220;good&amp;#8221; modulus. The default modulus used by Sage is either the conway polynomial or - if we don&amp;#8217;t know the conway polynomial - a random irreducible polynomial. I took the idea of using a &amp;#8220;good&amp;#8221; modulus from Michael Scott&amp;#8217;s &lt;a href=&quot;http://hyperelliptic.org/SPEED/slides/Scott_optimal_polynomials.pdf&quot;&gt;slides&lt;/a&gt; for his talk at the &lt;a href=&quot;http://hyperelliptic.org/SPEED/index.html&quot;&gt;SPEED workshop&lt;/a&gt;. My attempt is not as sophisticated as his but naively searches for trinomials and pentanomials with low degree terms.
&lt;/p&gt;
&lt;pre&gt;
def good_modulus(n):
  P = GF(2)['x']
  x = P.gen()
  for a in xrange(1,n):
    f = x**n + x**a + 1
    if f.is_irreducible():
      return f
  for N in range(0,n,10):
    for a in xrange(1,N+1):
      for b in xrange(a+1,N+1):
        for c in xrange(b+1,N+1):
          f = x**n + x**c + x**b + x**a + 1
          if f.is_irreducible():
            return f
  # fall back to default if nothing was found
  return GF(2**n,'a').polynomial()
&lt;/pre&gt;
&lt;p&gt;
Some comments:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Up until $2^{15}$ we use &lt;a href=&quot;http://en.wikipedia.org/wiki/Zech's_logarithms&quot;&gt;Zech logarithms&lt;/a&gt; as they are implemented in &lt;a href=&quot;http://ljk.imag.fr/CASYS/LOGICIELS/givaro/&quot;&gt;Givaro&lt;/a&gt;. Magma uses Zech logarithms up to $2^{20}$ and  we should do the same. If we use a Cython loop (i.e. remove the overhead of the loop) Sage&amp;#8217;s arithmetic is as fast as Magma&amp;#8217;s.&lt;/li&gt;
&lt;li&gt;I don&amp;#8217;t know why there is that peak around $n=2$ for Magma. Bug? My bad?&lt;/li&gt;
&lt;li&gt;Magma scales quite nicely wordwise, as you would expect.&lt;/li&gt;
&lt;li&gt;Surprisingly enough we beat Magma starting at $2^{100}$ up until at least $2^{128}$ using the &amp;#8220;good&amp;#8221; moduli.&lt;/li&gt;
&lt;li&gt;What is going on with NTL between $2^{16}$ and $2^{64}$?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
It seems we should internally - at least for large degrees - represent elements w.r.t. to a &amp;#8220;good&amp;#8221; modulus even if we know the conway polynomial.</description>
  </item>
  <item>
    <title>Yet Another Talk on Sage</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2007/11/01#sage-talk-200711-egham</link>
    <description>May I point the reader&amp;#8217;s attention to &lt;a href=&quot;http://www.informatik.uni-bremen.de/~malb/talks/20071101 - SAGE - Egham.pdf&quot;&gt;the slides&lt;/a&gt; of my most recent talk about &lt;a href=&quot;http://www.sagemath.org&quot;&gt;Sage&lt;/a&gt; for the ISG &lt;a href=&quot;http://www.isg.rhul.ac.uk/~prai175/ISGStudentSem07/index.html&quot;&gt;Student Seminar&lt;/a&gt;.</description>
  </item>
  <item>
    <title>More Pictures/SAGE Days 5</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2007/10/05#sage-days-5</link>
    <description>I&amp;#8217;ve uploaded my pictures from the &lt;a href=&quot;http://www.flickr.com/photos/martinralbrecht/tags/toolsforcryptanalysis2007/&quot;&gt;&amp;#8220;Tools for Cryptanalysis 2007&amp;#8221;&lt;/a&gt; and &lt;a href=&quot;http://www.flickr.com/photos/martinralbrecht/tags/sagedays5/&quot;&gt;&amp;#8220;SAGE Days 5&amp;#8221;&lt;/a&gt; workshops to &lt;a href=&quot;http://www.flickr.com/photos/martinralbrecht/&quot;&gt;flickr&lt;/a&gt;. At SD5 I
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;worked on LLL (see &lt;a href=&quot;http://wiki.sagemath.org/days5/proj/lll&quot;&gt;wiki&lt;/a&gt;, &lt;a href=&quot;http://trac.sagemath.org/sage_trac/ticket/723&quot;&gt;trac&lt;/a&gt;, and &lt;a href=&quot;http://groups.google.com/group/sage-devel/browse_thread/thread/d2ea949f0061ad40&quot;&gt;update&lt;/a&gt;),&lt;/li&gt;
&lt;li&gt;found out that SAGE&amp;#8217;s &lt;a href=&quot;http://www.sagemath.org/hg/sage-main/file/b6678e280557/sage/matrix/strassen.pyx&quot;&gt;Strassen Echelonizer&lt;/a&gt; doesn&amp;#8217;t require submatrices to be non-singular,&lt;/li&gt;
&lt;li&gt;generated kinda &lt;a href=&quot;http://sage.math.washington.edu/home/malb/graphics/class_hierarchy/&quot;&gt;handy graphs&lt;/a&gt; of SAGE&amp;#8217;s inheritance tree,&lt;/li&gt;
&lt;li&gt;and gave a talk about the &lt;a href=&quot;http://www.informatik.uni-bremen.de/~malb/talks/20070930 - Commutative Algebra - Cambridge.pdf&quot;&gt;status of commutative algebra&lt;/a&gt; in SAGE.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The SAGE inheritance tree in 3D:&lt;br /&gt;
&lt;img src=&quot;http://www.informatik.uni-bremen.de/~malb/binary/class_hierarchy_3d_cropped.png&quot; alt=&quot;class hierarchy 3d&quot;/&gt;</description>
  </item>
  <item>
    <title>The Sorry State of Sparse Linear Algebra over Finite Fields</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2007/09/16#the-sorry-state-of-sparse-la-over-gfq</link>
    <description>By sparse linear algebra I actually only mean computing the (reduced) row echelon form. Surprisingly, there aren&amp;#8217;t much implementations out there, not much I am aware of at least.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Apparently, MAGMA cannot compute the reduced row echelon form. Well, you can compute the nullspace, but: &amp;#8220;&lt;em&gt;Since the result will be given in the dense representation, both the nullity of A and the number of rows of A must both be reasonably small.&lt;/em&gt;&amp;#8221; (&lt;a href=&quot;http://www.msri.org/about/computing/docs/magma/html/text633.htm&quot;&gt;MAGMA Documentation&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;LinBox actually does Gaussian elimination for you if you compute the rank using the &lt;span class=&quot;command&quot;&gt;NoReordering&lt;/span&gt; method. However, it kills the rows it doesn&amp;#8217;t need anymore to be more memory friendly. Also, in my experiments the Gaussian elimination wasn&amp;#8217;t much faster than SAGE&amp;#8217;s for random sparse matrices over $GF(127)$. However, it can compute the rank more quickly by using &amp;#8220;Symbolic Reordering&amp;#8221; (&lt;a href=&quot;http://perso.ens-lyon.fr/gilles.villard/BIBLIOGRAPHIE/POSTSCRIPT/rankjgd.ps&quot;&gt;paper&lt;/a&gt;). Added bonus: LinBox also does $GF(p^n)$.&lt;/li&gt;
&lt;li&gt;SAGE offers a &lt;a href=&quot;http://www.sagemath.org/doc/html/ref/module-sage.matrix.matrix-modn-sparse.html&quot;&gt;sparse Gaussian elimination&lt;/a&gt;: &amp;#8220;&lt;em&gt;We use Gauss elimination, in a slightly intelligent way, in that we clear each column using a row with the minimum number of nonzero entries.&lt;/em&gt;&amp;#8221;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The other day I kinda liked the idea to apply &lt;a href=&quot;http://www.williamstein.org&quot;&gt;William Stein&lt;/a&gt;&amp;#8217;s integer matrix &lt;a href=&quot;http://www.sagemath.org/doc/html/ref/module-sage.matrix.matrix-integer-dense.html&quot;&gt;rational-echelonize-via-solve&lt;/a&gt; algorithm to this case.
The (adapted) algorithm is as follows (most of it is due to William Stein):
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Compute $r = rank(A)$. This is cheaper than Gaussian elimination because we can use &amp;#8220;Symbolic Reordering&amp;#8221;.&lt;/li&gt;
&lt;li&gt;Compute the pivot columns of the transpose $A^t$ of $A$. We can convince &amp;#8220;Symbolic Reordering&amp;#8221; to give us these as well.
&lt;/li&gt;
&lt;li&gt;Let $B$ be the submatrix of $A$ consisting of the rows corresponding to the pivot columns found in the previous step. Note that, aside from zero rows at the bottom, $B$ and $A$ have the same reduced row echelon form.&lt;/li&gt;
&lt;li&gt;Compute the pivot columns of $B$. Again, we may do this using &amp;#8220;Symbolic Reordering&amp;#8221;.&lt;/li&gt;
&lt;li&gt;Let $C$ be the submatrix of $B$ of pivot columns. Let $D$ be the complementary submatrix of $B$ of all all non-pivot columns. Use a solver (such as Wiedemann) to find the matrix $X$ such that  $C X=D$ . I.e., solve a bunch of linear systems of the form $ Cx = v$ , where the columns of $ X$ are the solutions.&lt;/li&gt;
&lt;li&gt;Return the matrix $I || X$ where $I$ is the identity matrix of rank $r$.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
This algorithm has complexity of two &amp;#8220;Symbolic Reordering&amp;#8221; applications, and $ncols - r$ applications of a matrix-vector solver. If &amp;#8220;Symbolic Reordering&amp;#8221; significantly outperforms Gaussian elimination (speed and memory-wise) and if $ncols - r$ is small and the solver fast, this might outperform straight-forward Gaussian elimination. The algorithm in SAGE notation is:
&lt;/p&gt;
&lt;pre&gt;
def echelon_form_via_solve(A):
    r = A.rank() # Step 1: Compute the rank

    if r == self.nrows():
        B = A
    else:
        # Steps 2 and 3: Extract out a submatrix of full rank.
        P = A.transpose().pivots()
        B = A.matrix_from_rows(P)

    # Step 4: Now we instead worry about computing the reduced row echelon form of B.
    pivots = B.pivots()

    # Step 5: Apply solver
    C = B.matrix_from_columns(pivots)
    pivots_ = set(pivots)
    non_pivots = [i for i in range(B.ncols()) if not i in pivots_]
    D = B.matrix_from_columns(non_pivots)
    X = C.solve_right(D, algorithm=&quot;LinBox:Blackbox&quot;)

    R = self.parent()()
    for i in range(len(pivots)): R[i,pivots[i]] = 1
    for i in range(X.nrows()):
        for j in range(X.ncols()):
            R[i,non_pivots[j]] = X[i,j]
    return R
&lt;/pre&gt;
&lt;p&gt;
However, as we have to call the solver repeatetly (or find a good matrix-matrix solver) I lost interest in implementing this thing. What is missing, is to hack LinBox to return the pivot columns when performing &lt;span class=&quot;command&quot;&gt;&lt;a href=&quot;http://linalg.org/projects/linalg/browser/trunk/linbox/linbox/algorithms/gauss.h&quot;&gt;InPlaceLinearPivoting&lt;/a&gt;&lt;/span&gt; which is &amp;#8220;Symbolic Reordering&amp;#8221;. As a side product of my attempts some operations on sparse matrices over GF(p) are way faster now in SAGE (See &lt;a href=&quot;http://trac.sagemath.org/sage_trac/ticket/655&quot;&gt;#655&lt;/a&gt;). Also, if you - my dear reader - know about any fast implementation for that problem, please let me know.</description>
  </item>
  <item>
    <title>Pretty Pictures</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2007/05/06#pretty-pictures</link>
    <description>A nifty feature which is going to be in SAGE 2.5 is matrix &amp;#8220;visualization&amp;#8221;. That means SAGE produces an image for your matrix indicating which parts are sparse and which are dense. Though, this is a trival 20 liner it is a pretty useful tool to discover structure.
&lt;/p&gt;
&lt;p&gt;
As an example look at some matrices occuring during F4 if applied on Cyclic6 over $GF(127)$ or $CTC_{3,3,3}$ as shown below.&lt;br /&gt;
&lt;img src=&quot;http://www.informatik.uni-bremen.de/~malb/binary/matrix-visualization-example.png&quot; alt=&quot;F4 matrices&quot; title=&quot;F4 matrices&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;
I have uploaded a set of images for all matrices occuring during the F4 computations against that CTC instance to &lt;a href=&quot;http://www.flickr.com/photos/martinralbrecht/&quot;&gt;flickr&lt;/a&gt;. Also, I have uploaded &lt;a href=&quot;http://www.flickr.com/photos/martinralbrecht/tags/ecryptphdsummerschool2007/&quot;&gt;some photos&lt;/a&gt; from the &lt;a href=&quot;http://ecrypt-ss07.rhul.ac.uk/&quot;&gt;ECRYPT PhD Summerschool 2007&lt;/a&gt; from which I am returning when writing this. Finally, I have uploaded the &lt;a href=&quot;http://www.informatik.uni-bremen.de/~malb/talks/20070504 - SAGE - Samos.pdf&quot;&gt;slides&lt;/a&gt; of a short talk about SAGE I gave at that Summerschool.
</description>
  </item>
  <item>
    <title>Westcoast Wrap-Up</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2007/03/14#westcoast-wrapup</link>
    <description>In case anybody wonders, this is what I have done during my stay at the US westcoast.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I gave four talks in total on &lt;a href=&quot;http://www.informatik.uni-bremen.de/~malb/talks/20070219 - Pyrex - LA.pdf&quot;&gt;Pyrex/SageX&lt;/a&gt;, &lt;a href=&quot;http://www.informatik.uni-bremen.de/~malb/talks/20070212 - Commutative Algebra - Seattle.pdf&quot;&gt;commutative algebra implementations&lt;/a&gt;, and &lt;a href=&quot;http://www.informatik.uni-bremen.de/~malb/talks/20070301 - Algebraic Attacks - Seattle.pdf&quot;&gt;algebraic attacks against block ciphers&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;I got started on linking against &lt;a href=&quot;http://www.singular.uni-kl.de/&quot;&gt;Singular&lt;/a&gt; from SAGE. I am far from being finished but I am planning to put out a pre-alpha-poke-an-eye-out release soon.&lt;/li&gt;
&lt;li&gt;I got started on incorporating Gregory Bard&amp;#8217;s &lt;a href=&quot;http://eprint.iacr.org/2006/251&quot;&gt;M4RI&lt;/a&gt; implementation in SAGE and optimized it a little. Going to be released soon.&lt;/li&gt;
&lt;li&gt;I wrote a thread manager which might under some highly unlikely circumstances end up in &lt;a href=&quot;http://sage.math.washington.edu:9001/msri07/schedule?action=AttachFile&amp;amp;do=get&amp;amp;target=FLINT-msri-talk.pdf&quot;&gt;FLINT&lt;/a&gt;. The point of a thread manager is to make sure the overhead of creating a new thread is minimized.&lt;/li&gt;
&lt;li&gt;co-worked on &amp;#8220;fast integer&amp;#8221; creation in SAGE. That means diving into Python and GMP internals to make the creation of new Integer objects fast.&lt;/li&gt;
&lt;li&gt;I helped a little on the &lt;a href=&quot;http://www.cs.uwaterloo.ca/~z4chen/iml.html&quot;&gt;IML&lt;/a&gt; and &lt;a href=&quot;http://www.linalg.org/&quot;&gt;LinBox&lt;/a&gt; integration in SAGE.&lt;/li&gt;
&lt;li&gt;I wrote a &lt;a href=&quot;http://www.symbolicdata.org/&quot;&gt;SymbolicData&lt;/a&gt; wrapper for SAGE.&lt;/li&gt;
&lt;li&gt;I was a &lt;a href=&quot;http://sage.math.washington.edu:9001/days3&quot;&gt;conference&lt;/a&gt; co-organizer for the first time.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;</description>
  </item>
  <item>
    <title>Talks, Talks, Talks</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2007/02/14#pre-sage-days-3-talks</link>
    <description>&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I gave a very brief talk on the state of affairs when it comes to commutative algebra in SAGE. &lt;a href=&quot;http://www.informatik.uni-bremen.de/~malb/binary/20070212-commutative_algebra-UW.pdf&quot;&gt;The slides&lt;/a&gt; also include some preliminary examples and timing of the SAGE Singular bindings. Apparently, the Singular interpreter is pretty slow, such that one could underappreachiate Singuar&amp;#8217;s performance from benchmarks with the Singular interpreter. But Singular is very fast and Python seems to be a good interpreter frontend for it.&lt;/li&gt;
&lt;li&gt;I also gave a brief talk on SageX/Pyrex again (&lt;a href=&quot;http://www.informatik.uni-bremen.de/~malb/binary/20070214-pyrex-uw.pdf&quot;&gt;slides&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;I finally put the &lt;a href=&quot;http://sage.math.washington.edu/home/malb/thesis-code.tar.bz2&quot;&gt;source code&lt;/a&gt; of my thesis online (i.e. no strange ps2txt twiddling anymore).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;</description>
  </item>
  <item>
    <title>Random Bits and Pieces</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2007/02/08#bitsandpieces</link>
    <description>&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.math.jmu.edu/~martin/&quot;&gt;Jason Martin&lt;/a&gt; took the time to sit down with me and compare the &lt;a href=&quot;http://www.swox.com/gmp/gmpbench.html&quot;&gt;GMPbench&lt;/a&gt; results with and without his patches. The results on my 2.33 Ghz Macbook Pro (Debian Etch, AMD64, GMP 4.2.1) are: I get a GMPbench of &lt;b&gt;5825&lt;/b&gt; without his patches and &lt;b&gt;7235&lt;/b&gt; with his patches. So you definitely want &lt;a href=&quot;http://www.math.jmu.edu/~martin/gmp-4.2.1-core2-port.tar.gz&quot;&gt;his patches&lt;/a&gt; if you got a Core 2 Duo processor idling in your machine (my last report on his patches was wrong).&lt;/li&gt;
&lt;li&gt;SAGE 2.1 is going to include the &lt;a href=&quot;http://www.linalg.org&quot;&gt;LinBox&lt;/a&gt; library for fast matrix operations over finite fields and ZZ. Using the &lt;a href=&quot;http://math-atlas.sourceforge.net/&quot;&gt;ATLAS3&lt;/a&gt; (from Debian Etch, so not fine tuned for my machine, which is the whole point of ATLAS) library LinBox achieves impressive results. Computing the reduced row echelon echelon form of a dense random 2000x2000 matrix over GF(127) takes 4-5 seconds on my notebook.&lt;/li&gt;
&lt;li&gt;I managed to link against Singular today. I.e. I compiled Singular as a shared library. This means that eventually Singular&amp;#8217;s superior polynomial arithmetic et al. can be used by SAGE directly. Though, it&amp;#8217;s a long road.&lt;/li&gt;
&lt;li&gt;Gregory Bard is going to be at &lt;a href=&quot;http://sage.math.washington.edu/sage/days3/index.html&quot;&gt;SAGE Days 3&lt;/a&gt; in LA. Hopefully, we will manage then to include his &lt;a href=&quot;http://eprint.iacr.org/2006/251&quot;&gt;M4RI&lt;/a&gt; algorithm in SAGE.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;</description>
  </item>
  <item>
    <title>SAGE 1.5.0.2 releases</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2006/12/14#sage-1-5</link>
    <description>This blog would be even more boring if every SAGE release was properly announced. But this release is a really big one. SAGE 1.5 features a total rewrite of much of the basic arithmetic to make it both faster and better to understand. All matrix classes are now written in SageX/Pyrex/C such that they are much faster now. Givaro&amp;#8217;s finite extension fields were included as the default implemention which also means a significant speed improvement. Also, SAGE now has some graph theory support.
&lt;/p&gt;
&lt;p&gt;
SAGE may be downloaded &lt;a href=&quot;http://sage.math.washington.edu/sage/download.html&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://sage.math.washington.edu:8100/&quot;&gt;tried&lt;/a&gt; online here.</description>
  </item>
  <item>
    <title>SAGE Days 2.2-2.4</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2006/10/11#sage-days-2-2</link>
    <description>SAGE Days 2 are over and it was &lt;a href=&quot;http://sage.math.washington.edu/home/burhanud/sd2-pics/&quot;&gt;great&lt;/a&gt; &lt;a href=&quot;http://www.flickr.com/photos/40721822@N00/&quot;&gt;fun&lt;/a&gt;. Also we have made quite a bit of progress: Addition of integers was used to test-bed performance/architecture improvements and as a result for large integers (i.e., greater than word size) SAGE now seems only 50% slower than MAGMA and for small integer SAGE integers are twice or more as slow (but there is room for improvements). Python integers (up to word size) however are way faster than MAGMA integer if we didn&amp;#8217;t get all the benchmarks wrong. An alpha interface to &lt;a href=&quot;http://www.axiom-developer.org&quot;&gt;Axiom&lt;/a&gt; was also written and some solution for an implementation problem with p-adic numbers has been found which I know nothing about, the SAGE notebook will not be a spammers/cross-site-scripters heaven anymore in the near future, and tons of other stuff got wrapped/implemented/discussed. Slides/mp3s should be/appear at &lt;a href=&quot;http://sage.math.washington.edu:9001/days2sched&quot;&gt;sage.math&lt;/a&gt;.</description>
  </item>
  <item>
    <title>SAGE Days 2.1</title>
    <link>http://www.informatik.uni-bremen.de/cgi-bin/cgiwrap/malb/blosxom.pl/2006/10/08#sage-days-2-1</link>
    <description>There have been &lt;a href=&quot;http://sage.math.washington.edu:9001/days2sched&quot;&gt;lots of talks&lt;/a&gt; including both of mine. J. Voight btw. told me (and the audience) that he sat down with &lt;a href=&quot;http://magma.maths.usyd.edu.au/users/allan/&quot;&gt;Allan Steel&lt;/a&gt; and asked him about all his secrets about making his &lt;a href=&quot;http://en.wikipedia.org/wiki/Faugère_F4_algorithm&quot;&gt;F4&lt;/a&gt; &lt;a href=&quot;http://magma.maths.usyd.edu.au/users/allan/&quot;&gt;implementation&lt;/a&gt; such fricking fast. Allan Steel responded that his implementation was very slow at first and that all his speed-ups where due to implementation tricks and not mathematical ideas. So there might be hope for my &lt;a href=&quot;http://sage.math.washington.edu/home/malb/sage_days_2/Groebner Bases/groebner bases in SAGE.pdf&quot;&gt;implementation&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Elsewhere: We are putting together a comprehensive Wiki page on making &lt;a href=&quot;http://sage.math.washington.edu:9001/WritingFastPyrexCode&quot;&gt;Pyrex code fast&lt;/a&gt; which might be interesting to the general Pyrex audience and not only SAGE developers. We are focusing on SAGE, though.</description>
  </item>
  </channel>
</rss>