Google Online Security Blog: Announcing the first SHA1 collision

Google Online Security Blog: Announcing the first SHA1 collision

Today, 10 years after of SHA-1 was first introduced, we are announcing the first practical technique for generating a collision.


How I started using LaTeX and what have I done with it, so far

(For those coming to read something about the kinky sexy latex stuff, this is about different LaTeX.)

Recently, I took interest in LaTeX. How did that happen?

Wizardry 7 FAQ

I have used it previously only as a by-product of Doxygen‘s process to produce source code documentation PDF. I have never edited the source. Also, as you may have noticed, I am interested in authoring texts using Markdown because in combination with Pandoc, it is an excellent primary source format that can be converted into other formats as needed. This has combined in my effort to create a nicer and printable version of “A random CRUSADERS of the DARK SAVANT FAQ” by Ravashack, a Wizardry 7 game FAQ.

I have started the process by converting the document using a Perl script to Markdown and continued by doing a lot of hand editing. Then I converted the FAQ’s Markdown source into HTML and PDF using Pandoc. The HTML result was mostly OK but PDF did not look pretty at all. So I have started editing the FAQ’s LaTeX source and slowly learned a lot about LaTeX in the process. Both TeX.SE and TeX, LaTeX and Friends chat room were a great help during the process.

After I have done quite a lot of edits to the LaTeX source of the FAQ, I have abandoned the HTML version and fully concentrated on the PDF. I think it turned out quite well.

Creating LaTeX packages

After some time, still using Pandoc and Markdown to create PDFs, I had a need to automate some Czech typography rules for which Emacs’ tildify-buffer did not help. I have searched and did not find a reasonably easy way to do this in pure LaTeX and even XeLaTeX. I have settled for LuaLaTeX and creating a bit of Lua code that handles this. This became a package named cstypo which is now available on CTAN and through tlmgr in TeX Live distribution.

Later, I had used zero width white space Unicode character to fix issue with unwanted ligature being produced by LaTeX. I have noticed that various Unicode white space characters are not handled at all by any LaTeX processor and I have created a simple package named uspace to remedy that.

So this were my adventures with LaTeX so far.

Using Pandoc to author posts for Wordpress

As I have described in earlier post, it is possible to use Markdown with Pandoc to author structured posts for Facebook. It is in fact also possible and convenient to use Markdown with Pandoc to author posts for WordPress. Given my previous experience, it was not that hard to find out what parameters to use with Pandoc to produce Markdown that WordPress would recognize. After some small research, it turned out that WordPress uses PHP Markdown Extra. Fortunately, PHP Markdown Extra is explicitly supported by Pandoc using the markdown_phpextra format, both as input and output format.

In fact, this and all the previous posts were authored in Pandoc’s Markdown and converted into WordPress compatible Markdown by the following command:

pandoc \
    --bibliography citace.yaml \
    --csl "$CSL_STYLE" \
    --smart \
    --self-contained \
    --wrap=none \
    -f markdown \
    -t markdown_phpextra+hard_line_breaks-citations-markdown_in_html_blocks \
    -o ${NAME} \

Using Pandoc to author posts for Facebook

The Problem

About a year ago I started arguing in comments on Facebook. I did find it hard to author my replies. The standard Facebook input box is too hard to use for structured replies. I remembered Pandoc and Markdown, which I have been then using for other things for some time already.

There are several aspects I wanted to have consistently solved. One of the issues I was facing was how to include quotes from the posts I was responding to. Another was to express links in a way that does not clutter the meat of my replies too much. Third was to be able to express at least some form emphasis.

I iterated through few formats and Pandoc settings. I tried the plain text format that Pandoc can produce but I deemed it too plain. It stripped too much of my original text’s decoration. Other formats like reStructuredText and Textile look too technical for general public consumption.

Using Pandoc’s Markdown directly was not an option either. While the format is very expressive, it clutters text and is harder to read for non-technical people who are not familiar with it. E.g., using classical links format [text]( clutters the text too much, especially if the used URL is some hundreds of characters long. Using other link format, like Pandoc’s reference links, manually would require me to jump between the text and another part of my document to put the links in, having to copy the linked text once.

Another thing is that I like to keep my lines under 80 columns wide but if such text pasted into Facebook input box, each line gets wrapped separately and the whole text just falls apart. So I had to find a way to have my multi-line paragraphs turned into a single long line.

The Solution

By trial and error I have found a set of Pandoc settings that produce usable text that can be copied and pasted into the Facebook input box and that still allows me to express emphasis and links in reasonable manner.

This is the result:

pandoc \
    --bibliography "${BIBLIOGRAPHY}" \
    --csl "${CSL_STYLE}" \
    --smart \
    --self-contained \
    --reference-links \
    --wrap=none \
    -f markdown \
    -t markdown+hard_line_breaks+shortcut_reference_links-citations-header_attributes-markdown_in_html_blocks \
    -o "${NAME}" \

This produces quite a reasonable output. See for yourself. It turns this heavily decorated Markdown:

# Example

The above is a "ATX--style header". It gets turned into "Setex--style
header". Also the straight quotes will be transformed into nicer ones.

This is a text, _of which some parts are emphasised_, **other are bolded**,
with a [link]( and a footnote.^[Foot note here.]

- Also lists are nicely formatted.
- Second item.
- And a third.

#. Numbered, too!
#. Second.

## Subsection

There is a multi-line quote:

> You can't blame gravity for falling in love.
> -- Albert Einstein

Into this rather readable text:


The above is a “ATX–style header”. It gets turned into “Setex–style header”. Also the straight quotes will be transformed into nicer ones.

This is a text, *of which some parts are emphasised*, **other are bolded**, with a [link] and a footnote.[^1]

-   Also lists are nicely formatted.
-   Second item.
-   And a third.

1.  Numbered, too!
2.  Second.


There is a multi-line quote:

> You can’t blame gravity for falling in love. – Albert Einstein

[^1]: Foot note here.


The above can be copied and pasted and it will be reasonably readable to most people, unlike the original. Also, as the suggested invocation of Pandoc suggests, it is possible to embed citations in the reply and have Pandoc generate a list of references for your.

The Global Gender Gap Report methodology

So I have seen a link to The Global Gender Gap Report 2014 in my FaceBook feed. I followed it and took a look at the report. I read a bit about their methodology. It baffles me how blatantly unfair it is. See for yourself.

Note: All emphasis is mine.

The Global Gender Gap Report 2014

As usual, women doing better is not considered a gap of any kind, Klaus et al. (2014, p. 4) Gender equality vs. women’s empowerment:

Our aim is to focus on whether the gap between women and men in the chosen variables has declined, rather than whether women are “winning” the “battle of the sexes”. Hence, the Index rewards countries that reach the point where outcomes for women equal those for men, but it neither rewards nor penalizes cases in which women are outperforming men on particular variables in some countries. Thus a country, which has higher enrolment for girls rather than boys in secondary school, will score equal to a country where boys’ and girls’ enrolment is the same.

This seems reasonable, Klaus et al. (2014, p. 5) Convert to ratios:

Initially, all data are converted to female/male ratios. For example, a country with 20% of women in ministerial positions is assigned a ratio of 20 women /80 men, thus a value of 0.25. This is to ensure that the Index is capturing gaps between women and men’s attainment levels, rather than the levels themselves.

But then again this, Klaus et al. (2014, p. 5) Truncate data at equality benchmark:

As a second step, these ratios are truncated at the “equality benchmark”. For all variables, except the two health variables, this equality benchmark is considered to be 1, meaning equal numbers of women and men. In the case of the sex ratio at birth variable, the equality benchmark is set to be 0.944, and the healthy life expectancy benchmark is set to be 1.06. Truncating the data at the equality benchmarks for each variable assigns the same score to a country that has reached parity between women and men and one where women have surpassed men.

The next paragraph discusses this choice:

The type of scale chosen determines whether the Index is rewarding women’s empowerment or gender equality. To capture gender equality, two possible scales were considered. One was a negative-positive scale capturing the size and direction of the gender gap. This scale penalizes either men’s advantage over women or women’s advantage over men, and gives the highest points to absolute equality.

This sounds sounds a lot more “equal” than what they have actually chosen to use:

The second choice was a one-sided scale that measures how close women are to reaching parity with men but does not reward or penalize countries for having a gender gap in the other direction.

But what totally gives it a way is this bit:

We find the one-sided scale more appropriate for our purposes, as it does not reward countries for having exceeded the parity benchmark.

In other words, our purpose is pure propaganda, not equality.

The same wording is used by Klaus et al. (2015) in their 2015 report.


Klaus, S., Eide, E.B., Zahidi, S., Bekhouche, Y., Padilla Ugarte, P., Camus, J., … Tyson, L.D. (2014). The Global Gender Gap Report 2014. World Economic Forum. Retrieved from

Klaus, S., Samans, R., Zahidi, S., Bekhouche, Y., Padilla Ugarte, P., Ratcheva, V., … Tyson, L.D. (2015). The Global Gender Gap Report 2015. World Economic Forum. Retrieved from