5 ms·
Crypto is hard because you don't get quick feedback on whether you are doing well. The feedback will only come if somebody hacks it. You need to know what you a
by lmilcin 6y ago
Crypto is hard because you don't get quick feedback on whether you are doing well. The feedback will only come if somebody hacks it. You need to know what you are doing and most developers are not at that level. Most development happens by constantly iterating (write couple lines of code, find if it does what you expect it to do).
If you want to understand crypto imagine getting requirements and having to write an app. You can't run it before it goes to production. You need to understand every detail of the app is correct and you are not going to get any validation.
I like to think that crypto is not development. Development only happens after you did crypto (ie. writing down the process) and it is completely different from development.
I have rolled my own cryptogrophic protocol for transferring keys between devices that was subsequently approved by PCI. We needed the protocol in order to work around peculiarities of the particular HSMs we had and it used "funky" operations like encrypting block of data using 3DES in reverse (ie. using decrypting operation on plaintext block of data) so that it can be then digested by the HSM.
Very simple protocol, took a lot of effort to prove why we need it and to prove we know what we are doing.
- AnonHP 6y ago> Crypto is hard because you don't get quick feedback on whether you are doing well. The feedback will only come if somebody hacks it. Not necessarily (for the part marked in italics). See all the grief that Telegram gets here in every post about it or related to it. Feedback on certain implementations does come from well known people in crypto.
- lmilcin 6y agoFor starters, for most applications there is no feedback because they are not popular enough for somebody to care to take a close look and publish results. Also, details regarding security are not usually made available for public which does not help. The protocol I worked on is used to bootstrap security for credit card terminals used for hundreds of millions of transactions and yet about 2 people ever looked at it really closely (my boss and another colleague mathematician). For some applications you might get an outside opinion (audit or certification) but these are not typically aimed at checking if you did your job well, rather they check if you meet some kind of requirements. For PCI, for example, there is a questionnaire. Also the feedback of this kind comes for really egregious mistakes, but the devil is usually in the details.
- inopinatus 6y ago> I like to think that crypto is not development. Since any program using a cryptographic library is inherently now part of a cryptosystem, this is an incredibly dangerous point of view, because a) programs change, and b) cryptanalysis advances. > took a lot of effort to prove why we need it and to prove we know what we are doing. I hope this started by hiring people to prove that you didn’t, because the only path to trust is rejecting the null hypothesis.
- lmilcin 6y agoWhat I meant is that cryptography is a separate activity that "works" in a different way. The result of "crypto" should be requirements for the software to meet. These requirements should not be limited to description of how the algorithm works but also to important details like "no logging of any cryptographic material" or "duration of operations should be independent of data being processed or success of the operation". The general problem with developer approach to crypto is that developers decide they have finished when their piece of code works. That just doesn't work with crypto (or security in general). As to your second comment I can say that I was the only developer at the company and there was no option for hiring other people. As a developer I try to do the best I can with the situation I am in but CEO level decisions on hiring were generally outside my influence. Whenever you work on something sensitive and potentially dangerous you generally get into a problem of "how I am going to convince them this is safe". In my case, having math background, the solution I decided to go with was to have a written rigorous proof of correctness of the solution and have two other mathematicians and PCI verify the proof (though I have no illusions PCI auditors went through entire document). As far as cryptography and security goes it isn't possible to prove anything is safe and secure beyond questioning. I am happy in that I did about as much as I could.
- cryptbe 6y ago>Crypto is hard because you don't get quick feedback on whether you are doing well. Well said. If you are to implement a sorting algorithm, you'll know immediately whether it works or is fast enough. Crypto doesn't provide this feedback. It's important to get help from others, if you can't tell yourself whether your code works.
- deleted 6y ago[deleted]