
All Underhanded Crypto Entries - colinprince
https://underhandedcrypto.com/2015/03/21/all-underhanded-crypto-entries/
======
tlb
JohnMeacham's entry is some diabolical shit. I've been burned by that same
bug, along the lines of:

    
    
      bool foo = rx&0x0800; // set foo if 11th bit of rx is true
    

which works in C++ or if you have stdbool, but not if you have 'typedef char
bool' which occurs in header files of projects that should know better.

~~~
copsarebastards
This is one of those examples where I can see how it's confusing, but I just
don't think you should have been doing it that way in the first place.

    
    
       bool foo = (rx & 0x0800) == 0x0800;
    

Not only does this not have the bug, it communicates your intent better, and
modern compilers are quite capable of optimizing this.

------
sarciszewski
My entry is pretty lame in comparison to the rest of them. I think the judges
did a phenomenal job picking the finalists.

~~~
sarciszewski
Er, okay, anyone care to explain _why_ they downvoted this?

I participated in this contest and was blown away by a lot of the ingenuity
the other contestants demonstrated. The judges clearly did not have an easy
time picking the winners, but I think they did a very good job at being fair
about it.

------
pronoiac
It's a shame there's no commentary, and they're not easily readable - they're
offering tar.gz files. Maybe post them to Github?

~~~
xai3luGi
Try using this command on the files:

tar xf foo.tar.gz

~~~
pronoiac
It may have made more sense if I mentioned I'm on mobile. Maybe I'll make the
repo when I finish doing laundry.

~~~
simcop2387
I went and made a repo for them all

[https://github.com/simcop2387/underhanded-
crypto](https://github.com/simcop2387/underhanded-crypto)

~~~
pronoiac
I cleaned it up and added links, and sent a pull request.

~~~
simcop2387
Merged!

------
hurin
The second winner (Leurent) looks like a very weak entry to me.

~~~
ryan-c
I'm curious why you say that. I found it very impressive from a technical
standpoint.

