0
$\begingroup$

I make a website with authentication. I have studied a lot of answers to these questions, but I still don't understand what is better and safer to use for a website: Argon2i or Argon2id?

I know which attacks they protect against, but unfortunately I don't know which ones are dangerous for the website.

The only thing I realized is that Argon2d is not suitable for me, since It is used mainly for cryptosystems.

Also, although this is not entirely relevant to this question, when I chose the hashing algorithm from bcrypt, scrypt, pbkdf2 and Argon2, I chose it. Did I make the right choice?

Thank you all in advance for your answers!

$\endgroup$
3
  • 1
    $\begingroup$ This is likely off-topic here. Of the two, Argon2id defends against more possible attacks. Scrypt or Bcrypt might actually end up better in practice, depending on tuning parameters. There's not enough info to answer correctly (which is why such recommendation requests are off-topic). But in general, Argon2id is fine. $\endgroup$ Commented Aug 24, 2020 at 23:26
  • 1
    $\begingroup$ Does this answer your question? When to use Argon2i vs Argon2d vs Argon2id? If you are unsure, then always choose Argon2id $\endgroup$
    – kelalaka
    Commented Aug 25, 2020 at 5:17
  • $\begingroup$ Hi, Yes, I know that the question is a little off topic, but I just pointed out the web environment, I did not find any suitable answers on other resources. About the node.js-it doesn't matter, I think I didn't have to write about it. As for the answer: if I'm not sure, I should choose Argon2id, it doesn't really suit me, because I wanted to know why they choose It? Thank you for your answers! $\endgroup$
    – mkdir
    Commented Aug 25, 2020 at 8:59

1 Answer 1

0
$\begingroup$

It depends. If you use weak parameters, then no matter what algorithm you choose the brute-forcing can be done relatively easy.

Think against what risks do you want to protect passwords. Argon2d gives some possibility of side-channel attacks. This is relatively complex and expensive approach. I'd suggest you to estimate the risk that somebody will pay a lot of money to implement side-channel attack. If you are implementing an application where passwords protect banking transactions of millions of USD, then the risk may be higher. If you are implementing an application focused on cooking receipts or traveling recommendations, then may be nobody will be willing to pay a lot of money for a side-channel attack. Then Argon2d may be a perfect choice for you.

I would suggest following (it is a matter of taste): Take Argon2id, it combines advantages and disadvantages of both Argon2d and Argon2i. It combines advantages of both. Pay better more attention to the proper selection of tuning parameters.

$\endgroup$
2
  • $\begingroup$ Thank you for your answer! I'm making a financial app, and when I searched for information about side-channel attacks and other types of attacks, I didn't find a word about websites. Everywhere we talk about cryptosystems or operating systems (for example, Windows). If you have in mind articles or guides about this, I will be grateful to you! $\endgroup$
    – mkdir
    Commented Aug 25, 2020 at 9:09
  • $\begingroup$ @mkdir: It is hard to suggest particular article. Side channels depend mainly on the hardware the target software is running on, on the firmware in this hardware, on the operating system, on the particular patches installed or not installed. To execute a side-channel attack, usually a direct access to the hardware is required. I'd suggest you to implement hashing as a configurable function. Take any of algorithms you named, no matter if it is one of Argon kinds or scrypt or others. Go ahead. When you really see reasons to prefer some other algorithm, just replace it. $\endgroup$
    – mentallurg
    Commented Aug 26, 2020 at 0:48

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