Does salt and pepper add any security if the key is already perfectly uniformly random?

Reply to this note

Please Login to reply.

Discussion

You need salt, otherwise dictionary attacks are easy.

How can you compute s dictionary for all possible nsecs? Salting is needed for human memorizable passwords which have much lower entropy than nsecs

In 99% of the apps it will be a valid nsec when the decoded string is matched to begin with text "nsec". That is the confirmation you need to know that the decoding without salt went OK.

The vector of attack is to use a large dictionary of known user-typed password against an encrypted nsec without salt nor using the hex version.