P
P
PiterBishop2014-08-21 07:14:52
Cryptography
PiterBishop, 2014-08-21 07:14:52

What should be understood when implementing a cryptoalgorithm?

Good day!
I will try to formulate my question as precisely as possible.
I have implemented one of the encryption algorithms. I did this for a deeper understanding of the mechanisms that underlie this algorithm. While I was collecting information about the algorithm, about the features of its implementation, etc., I often came across the opinion that such experiments are only suitable for educational purposes, nothing more. Could you explain what is the basis of this opinion? Why, for example, is my implementation worse than the one presented in some cryptographic provider (I'm not talking about speed, but about security)? In general, what is worth remembering/knowing/understanding in order to make your implementation as reliable as industrial counterparts?
PS By education, I am an information security specialist (please do not confuse with information security).

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Denis, 2014-08-21
@cjbars

At least read this article .

T
throughtheether, 2014-08-21
@throughtheether

I have no relevant education, I will express my opinion of an amateur.

Why, for example, is my implementation worse than the one presented in some cryptographic provider (I'm not talking about speed, but about security)?
The fact that existing implementations have some history of exploitation or even applied cryptanalysis. Therefore, the authors of these implementations have an external evaluation of their solutions. You do not have such an assessment, I believe. It will be very sad when you learn about the vulnerability after the exploitation of this vulnerability has caused damage.
In general, what is worth remembering/knowing/understanding in order to make your implementation as reliable as industrial counterparts?
It should be borne in mind that mathematically correct implementation alone does not guarantee reliability/safety. Consideration should be given to the behavior of the system as a whole. If your solution is some kind of public server, then keep in mind that a third party can measure your system's responses to incoming requests with some accuracy and draw conclusions from this. If your solution is a smart card, then be prepared for the fact that a third party can measure electricity consumption at different points in time and draw conclusions from this, purposefully change the supply voltage and clock frequency of the processor, expose the system to ionizing radiation in order to disrupt the operation of the algorithm and analysis of data obtained during the observation. Even if you are just writing a simple program in a high-level language, be prepared toconsequences .
In short, a naive mathematically correct solution will not protect you, in general, from timing attacks and other third-party channels.
The above does not mean that someone in the general case has the right to forbid you to independently implement cryptographic algorithms, but it would be reasonable for you to assess the possible consequences.

A
Andrew, 2014-08-21
@OLS

It is worth
1) to have a higher mathematical education (please do not confuse with technical),
2) to know all currently published methods of cryptanalysis (for example, at least all published on eprint.iacr.org/complete ),
3) to have the time, knowledge and opportunity check them all for inapplicability to your cipher,
4) publish the cipher to the general public (perhaps in the form of a competition with a prize).
In about 5-7 years, if there are enough publications from independent cryptanalysts, your cipher will be treated with confidence. And then it will be evaluated not by the primary order of magnitude (stable / unstable), but by the secondary one:
- speed on powerful computers
- speed on extremely weak computers
- parallelizability
- realizability in hardware

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question