Re:Detailed audit of Voatz' voting app confirms security flaws
by jerf on Friday March 20, 2020 @03:56PM
(#22641018)
"I’m not a security engineer, so what’s the benefit of using a nonstandard cryptographic protocol?"
Broadly speaking, the benefit is that if you have a keyhole view of the crypto world, you can google this and stackoverflow that online and get something that to your eyes appears simpler than using correct crypto, because correct crypto worries about keys, and revocation, and the keys are in a weird mix of formats, and certificates are complicated and have all these features you don't seem to need, and support for them is more mixed and less widely available than you'd like. Your simpler crypto seems to work, and it might be "faster", and it was easier to bash together one function that "uses" AES directly and puts out a stream that "looks encrypted" than it is to worry about all the things it takes to use crypto correctly.
None of that is sarcastic; especially if you don't stumble upon libnacl or some other library designed to be easy to use while still being correct, using crypto correctly is actually a good deal harder than misusing a couple of primitives to get something that superficially works. I mean, again no sarcasm, you can figure out how to bash something together with AES256 primitives faster than you can even figure out how to run a too-simple-for-your-needs Certificate Authority, which even if you do Google up the right scripts is still annoyingly difficult in my experience. And that's only a single element of what you may need to do for your app to be secure.
In terms of any other sort of advantage, there basically isn't one. It's the above advantage that is why we keep seeing home-grown crypto all the time.
Now, getting your use of the crypto primitives correct is much harder than getting your use of existing solid libraries correct. Unfortunately, misused crypto doesn't usually crash or segfault or fail visibly; it still produces binary gibberish visually indistinguishably from the binary gibberish solid libraries will produce. It just turns out to be low-quality gibberish that won't secure you or your users. But no segfaults, crashes, errors, warnings, etc.
Broadly speaking, the benefit is that if you have a keyhole view of the crypto world, you can google this and stackoverflow that online and get something that to your eyes appears simpler than using correct crypto, because correct crypto worries about keys, and revocation, and the keys are in a weird mix of formats, and certificates are complicated and have all these features you don't seem to need, and support for them is more mixed and less widely available than you'd like. Your simpler crypto seems to work, and it might be "faster", and it was easier to bash together one function that "uses" AES directly and puts out a stream that "looks encrypted" than it is to worry about all the things it takes to use crypto correctly.
None of that is sarcastic; especially if you don't stumble upon libnacl or some other library designed to be easy to use while still being correct, using crypto correctly is actually a good deal harder than misusing a couple of primitives to get something that superficially works. I mean, again no sarcasm, you can figure out how to bash something together with AES256 primitives faster than you can even figure out how to run a too-simple-for-your-needs Certificate Authority, which even if you do Google up the right scripts is still annoyingly difficult in my experience. And that's only a single element of what you may need to do for your app to be secure.
In terms of any other sort of advantage, there basically isn't one. It's the above advantage that is why we keep seeing home-grown crypto all the time.
Now, getting your use of the crypto primitives correct is much harder than getting your use of existing solid libraries correct. Unfortunately, misused crypto doesn't usually crash or segfault or fail visibly; it still produces binary gibberish visually indistinguishably from the binary gibberish solid libraries will produce. It just turns out to be low-quality gibberish that won't secure you or your users. But no segfaults, crashes, errors, warnings, etc.