luks2: "struct crypt_pbkdf_type" has no default values when creating a luks2 volume.
In zuluCrypt,the code that creates a luks2 volume is here[1].
All these options(except data_alignment which is ignored) must be manually set to successfully create a luks2 volume.
The options that i care about are "type" and "hash" and i would like for the rest of them to be auto filled with whatever default values libcryptsetup is using.
Manually setting them with current libcryptsetup defaults will cause a faulty created volume when they change or when a user build libcryptsetup with different options.
Proposals:
-
Add an additional API that will take a pointer to the structure and fill it with the library defaults. Or add an API that returns the current library defaults. "crypt_get_pbkdf_type" API does not work because it returns values of an existing volume and not library defaults.
-
Use default values when the pointer to the structure is found to be NULL. This will not be ideal since it removes the ability to set values a user cares about and leave others a user does not care about to their defaults.