Hey! I'm David, the author of the Real-World Cryptography book. I'm a crypto engineer at O(1) Labs on the Mina cryptocurrency, previously I was the security lead for Diem (formerly Libra) at Novi (Facebook), and a security consultant for the Cryptography Services of NCC Group. This is my blog about cryptography and security and other related topics that I find interesting.

more on the next page...

It's old but I just discovered it! And since it's not always fun to learn a new text editor, especially one like vim, here's a fun way to do just that!

comment on this story

Erasmus & Korean posted October 2014

A new year starting means new erasmus coming. And this year I've done things a bit differently, instead of just meeting the newcomers I've joined the Erasmus association of Bordeaux "Inter'action Bordeaux" and I've helped them organized many events. Parties of course but also some really cool stuff like:

• A welcome erasmus week-end in a camping next to the Sanguinet lake (and for the first time of my life I slept on the beach! Not really comfy).

• The Feria of Bordeaux, and no worries, no animals were injured, it was more like a silly cow running around people :)

Aside from participating in this new adventure, I've also started taking Korean classes at the same place where I was taking russian classes last year. And I already learned how to write/read korean. It's actually not that hard at all and if you have a few hours to spare you could learn it too :)

I forgot that I also spent quite some time learning Romanian on Memrise this summer and I fell in love with Memrise again. I was actually the first of many romanian classes rankings for many weeks.

comment on this story

Here we go again posted September 2014

So here's to a new school year in Bordeaux. My initial plan was to do my first year in Bordeaux and do my second year in Rennes. I liked Bordeaux so much that I decided to stay here instead, for better or worse.

First, I found a new place. It's way better than my last place (which was really, really bad). And I couldn't have asked for a better location. I'm right in the middle of everything. Bordeaux is small enough that I basically have to walk less than 5 minutes to go to restaurants, shops, supermarkets, the laundry, my friends, etc... Life is easy :)

A few weeks ago an article has been written about my website 3pages in Telerama (a nationwide paper). It's small but that's something :)

Also I started classes last week. But I'll make another post about that!

comment on this story

Slim posted August 2014

I talked about Slim the other day. I wanted to do a similar project not so long ago that I would have called weblang.

I first thought about an indented language with no symbols to declare html elements. Something like that:

p
ul
li
hey !

But then I thought, how will I distinguish markups from text. If I want to write ul without it being translated to <ul></ul>, how do I do that?
And if I want to write several lines of text, will I have to indent them all the time ?

That's why I quickly thought the language would need brackets and a symbol to distinguish markup from plain text (I used \$).

Slim is somehow what I had imagined at the beginning and it's working!

The above example in Slim would be written as such:

p
ul
li
| hey !

Not so far from what I had in mind :)

If you're not convinced yet, try this html to Slim conversion app on a heavy html page of yours that you can't really understand anymore and you'll see how amazing it is!

comment on this story

Rails 4 Tutorial posted August 2014

I'm still deep in Rails. The official documentation is okay but kind of bloated. Fortunately I stumbled on Kevin Skoglund's Ruby on Rails 4 Essential Training Course on Lynda and it is fabulous. Plenty of small videos I can watch when I want to get educated on a specific topic. And it's way easier to digest than the official's guide. I recommend it!

comment on this story

Unit Tests in Rails posted August 2014

I've heard about unit test. They seems to be extremely important for a crypto application, but for a web app? Do I really need them?

mimoo: Hey I'm beginning with Rails, should I worry about unit test yet?
eladmeidar: tests are always important, in fact, it's more important than anything else
mimoo: it seems so boring though
fowlduck: don't bother with tests if you don't want to
fowlduck: remember to be conscious of frustration in pain while you develop, though, and try to figure out ways to avoid it later
fowlduck: you will almost certainly eventually feel frustration due to lack of tests
fowlduck: but wait until you feel it, if you want to
fowlduck: it's a good pain to feel. you don't quickly forget it
fowlduck: I like grapes

(extracts from #RubyOnRails on freenode)

comment on this story

Some Rails' magic. posted August 2014

If you use Rails you know that Rails also has some pretty weird routes for default.

And if you're like me you're wondering how is the browser understanding those requests. The requests are correct, and should be used but nowadays browsers only understand GET and POST queries. That's why they are often not used correctly and have lost a lot of meaning in web development.

So first, here's how Rails is doing it, by including jQuery_ujs, a jQuery plugin specially made for Rails that permits the use of those other verbs (DELETE, PUT, PATCH...).

What you write in Rails looks like that by the way.

<%= link_to 'Destroy', controller, data: {:confirm => 'Are you sure?'}, :method => :delete %>

And what it does is that it creates a link that will actually send a hidden form using POST with an input telling Rails it's actually a DELETE.

It's a hack. But it feels nice.

PS: And that's not all, jQuery_ujs does other useful things.

Rails is not a Ruby framework. It's a ruby+javascript+css framework.

comment on this story