Skip to content

sodium encryption misuses crypto_pwhash API #12204

@dgl

Description

@dgl

Steps to reproduce

  1. Review: https://github.com/vim/vim/blob/master/src/crypt.c#L883-L884
  2. See https://github.com/jedisct1/libsodium/blob/master/src/libsodium/include/sodium/crypto_pwhash.h#L97-L102

Nothing stores the parameters used for the password hash function. Libsodium is currently using argon2id, but those constants could change per the libsodium API docs.

Expected behaviour

cryptmethod=xchacha20 should store the parameters to the pwhash function.

Given the docs say this format is currently experimental it should be possible to add the parameters somewhere to provide algorithm agility.

[cc: @chrisbra]

Version of Vim

9.0.1429

Environment

Anything with libsodium enabled.

Logs and stack traces

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions