Live data from Hacker News

LaTeX TikZ for Cryptographers

iacr.org

11–20 of 24 posts

Re: LaTeX TikZ for Cryptographers

#11
post #9
post #7

TikZ is a microcosm of LaTeX itself: powerful, expressive, able to automate repetitive tasks, beautiful output -- but sometimes, it takes forever to do something that would take a few mouse clicks in a GUI tool.

I completely hear you. Despite my extremely limited skills with TikZ, My brain "somehow" stubbornly insists to keep chugging along with TikZ, spending unreasonable amounts of time. But I love the end result; the way text and diagrams meld so cleanly. Nothing comes close. On the unreasonable amount of time spent: Last December, "merely" to get the arrows right neatly arranged, I spent more than 2 hours :-(. See the tr…

... but the text in the boxes still has a weird baseline. Sorry to spoil the fun, but if you just invested a few hours to learn how to work with Inkscape, you would become much more efficient sooner.

At some point during my PhD I accepted that LaTeX is not the right tool for graphical work. Stubbornly I was still texing my slides with Beamer, but half their content was figures prepared in Inkscape.

Re: LaTeX TikZ for Cryptographers

#13
post #12

Is the code that powers this open source? It would be useful to collect snippets for other fields

Yes, and it has a documentation counting > 1000 pages: https://ctan.org/pkg/pgf https://sourceforge.net/projects/pgf/

I meant the code for the site, not TikZ/PGF

Re: LaTeX TikZ for Cryptographers

#14
I never liked the syntax of TikZ and that things like computing points on a parametrized curve correctly are difficult due to the limitations of TeX...

Asymptote [0] is a great alternative to prepare precise illustrations programmatically, which also integrates neatly with LaTeX. Making figures like [1] for a thesis (all lines and intersection points computed exactly) was actually fun.

But for diagrams with lines and boxes I would really just use Inkscape.

[0] http://asymptote.sourceforge.net/

[1] https://imgur.com/a/7QzsbDP

Re: LaTeX TikZ for Cryptographers

#15
post #14

I never liked the syntax of TikZ and that things like computing points on a parametrized curve correctly are difficult due to the limitations of TeX... Asymptote [0] is a great alternative to prepare precise illustrations programmatically, which also integrates neatly with LaTeX. Making figures like [1] for a thesis (all lines and intersection points computed exactly) was actually fun. But for diagrams with lines and…

I always use keynote for diagrams with lines and boxes, I really like how simple it is to do something nice.

I agree with your sentiment on tikz though, it is not a pleasure to write.

Re: LaTeX TikZ for Cryptographers

#16
post #11
post #9

Earlier quoted context omitted.

I completely hear you. Despite my extremely limited skills with TikZ, My brain "somehow" stubbornly insists to keep chugging along with TikZ, spending unreasonable amounts of time. But I love the end result; the way text and diagrams meld so cleanly. Nothing comes close. On the unreasonable amount of time spent: Last December, "merely" to get the arrows right neatly arranged, I spent more than 2 hours :-(. See the tr…

... but the text in the boxes still has a weird baseline. Sorry to spoil the fun, but if you just invested a few hours to learn how to work with Inkscape, you would become much more efficient sooner. At some point during my PhD I accepted that LaTeX is not the right tool for graphical work. Stubbornly I was still texing my slides with Beamer, but half their content was figures prepared in Inkscape.

For this kind of thing, something like yEd [1], specialized for graphs should work nicely as well.

[1] https://www.yworks.com/yed-live/#file=https://gist.githubuse...

Re: LaTeX TikZ for Cryptographers

#17
I wish I had known about this when I was writing my dissertation.

This looks reasonably complete for a lot of the mathematical diagrams in cryptography. It would be nice if the supersingular isogeny support included more diagrams than just the Diffie Hellman key exchange protocol, but they’re a relatively recent are of study so it makes sense. But there are a lot of isogeny diagrams (such as endomorphisms, volcanoes and random walks) beyond SIDH.

For example, Luca De Feo’s 2017 article on isogeny mathematics in cryptography [1] (pages 10,11,13,18,21,27,28,32,35) and the 2011 Feo-Jao-Plut paper introducing isogeny key exchange [2] (pages 4,6,8,9,10) both have very beautiful, full-color diagrams to walk through very complex concepts. Luca De Feo has a tendency to put the TeX of his papers and slides on GitHub [3], so I’ve reused some of his diagrammatic code before :). I recall spending hours on some diagrams to make them look as nice as these.

Lattice-based constructions sometimes need good diagrammatic code as well, but thankfully you can mostly get by without it (even though lattice depictions can be pretty, as one of De Feo’s GitHub packages shows) - for instance, note the relative lack of diagrams in Peikert’s well-known survey on lattice cryptography [4].

____________________

1. https://arxiv.org/abs/1711.04062

2. https://eprint.iacr.org/2011/506.pdf

3. https://github.com/defeo

4. https://web.eecs.umich.edu/~cpeikert/pubs/lattice-survey.pdf

Re: LaTeX TikZ for Cryptographers

#19
post #11
post #9

Earlier quoted context omitted.

I completely hear you. Despite my extremely limited skills with TikZ, My brain "somehow" stubbornly insists to keep chugging along with TikZ, spending unreasonable amounts of time. But I love the end result; the way text and diagrams meld so cleanly. Nothing comes close. On the unreasonable amount of time spent: Last December, "merely" to get the arrows right neatly arranged, I spent more than 2 hours :-(. See the tr…

... but the text in the boxes still has a weird baseline. Sorry to spoil the fun, but if you just invested a few hours to learn how to work with Inkscape, you would become much more efficient sooner. At some point during my PhD I accepted that LaTeX is not the right tool for graphical work. Stubbornly I was still texing my slides with Beamer, but half their content was figures prepared in Inkscape.

...weird baseline.

Is that caused by the tails of the letters "y" and "p"? The one box that doesn't have a tailed letter, "base", looks fine. There should be a way to tell the system to use the normal font baseline instead of something it can figure out geometrically.

Re: LaTeX TikZ for Cryptographers

#20
post #11
post #9

Earlier quoted context omitted.

I completely hear you. Despite my extremely limited skills with TikZ, My brain "somehow" stubbornly insists to keep chugging along with TikZ, spending unreasonable amounts of time. But I love the end result; the way text and diagrams meld so cleanly. Nothing comes close. On the unreasonable amount of time spent: Last December, "merely" to get the arrows right neatly arranged, I spent more than 2 hours :-(. See the tr…

... but the text in the boxes still has a weird baseline. Sorry to spoil the fun, but if you just invested a few hours to learn how to work with Inkscape, you would become much more efficient sooner. At some point during my PhD I accepted that LaTeX is not the right tool for graphical work. Stubbornly I was still texing my slides with Beamer, but half their content was figures prepared in Inkscape.

Yeah, I use beamer for (text + math + plot)-only content but as soon as any video or animation is needed, gotta switch to ppt or keynote
Post reply on HN