0
$\begingroup$

I've been slinging code for a while now, but relatively new to encryption/security. What should I look for when evaluating an encryption method in the wild?

For example, the Standard File protocol supports E2E encryption. It's implemented here: https://github.com/standardnotes/web/blob/6fd5719/app/assets/javascripts/app/services/encryption/crypto.js

To my untrained eyes, that looks reasonably secure. How could I spot red flags? For example, is splitting a key in thirds a good idea?

I'm not asking about evaluating this specific library, rather, patterns or resources I can use to determine security. One idea that comes to mind is placing a public bounty as a challenge to break the encryption. Telegram did this with a $300k bounty.

$\endgroup$

closed as primarily opinion-based by e-sushi Nov 10 '17 at 4:12

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

3
$\begingroup$

How could I spot red flags?

The red flag is actually the entire red zone (like trees in the forrest...). If there is code for encryption at all, you better throw it away unless it's some proper library from a source with good reputation for exactly this kind of thing.

It is something different, if they use a cryptographic library properly, that can be achieved by non-experts. But implementation of actual encryption ... the chances of a crucial error are immense.

For example, the Standard File protocol supports E2E ...

If you look at the homepage, the section developers is only listed in the menu, there is no matching content. However, on the positive site they don't actually implement encryption, they use CryptoJS as library.

For example, is splitting a key in thirds a good idea?

In general: Actually it doesn't make any sense, because you should create keys fitting to their task and why would someoen want to split a key in a meaningless way? If the goal was to split it securely in the sense of a secret sharing scheme (e.g. that you can only reassemble any information with both halves), that's something totally different.

Telegram did this with a $300k bounty.

The Telegram "challenge" is bogus anyway. It is basically "I think of a number, give you no information, and if you can guess it, you win".

That is not how cryptanalysis works, that is not how security works. By doing that, they already proved that they don't understand much about these fields.

Here are a few articles about that:

$\endgroup$
  • $\begingroup$ Regarding the splitting of keys: Triple DES keys are usually the concatenation of three DES keys, and they have to split apart because ultimately, they are used in different parts of the encryption/decryption process... So if it's triple DES, then yes, that's normal. $\endgroup$ – Maybe_Factor Nov 9 '17 at 2:45
  • $\begingroup$ @Maybe_Factor Or you just consider the three keys of 3DES as three keys, or a tuple, or a list, or .... But since a dedicated crypto library is used anyway, it does not make sense to access the partial keys there at all, because that handles the actual encryption/decryption anyway. $\endgroup$ – tylo Nov 9 '17 at 14:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.