View Issue Details

IDProjectCategoryView StatusLast Update
0009298GNUnetutil librarypublic2024-10-29 19:56
Reporterfefe Assigned Toschanzen Due Date
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Target Version0.22.2Fixed in Version0.22.2 
Summary0009298: derive_h: salt is not random
DescriptionIn crypto_ecc_gnsrecord.c function derive_h:

 54 static const char *const salt = "key-derivation";

A salt is by definition random, not static.
At least add a comment here explaining what you are trying to do.

Similar situation in crypto_edx25519.c function derive_h:

223 static const char *const salt = "edx25519-derivation";
TagsNo tags attached.

Activities

schanzen

2024-10-25 11:57

administrator   ~0023599

Last edited: 2024-10-25 12:03

This is a key derivation salt. As common in KDF salts (https://www.rfc-editor.org/rfc/rfc8446#section-7.1) the value primarily servers as a domain-separation for the underlying PRF of HKDF (which is HKDF-Extract/HMAC).
This has nothing to do with password hashing.
It is kind of unfortunate that HKDF calls this input value a salt, but it is what it is.

schanzen

2024-10-25 11:59

administrator   ~0023600

More context: https://crypto.stackexchange.com/questions/64150/hkdf-ikm-salt-and-info-values

schanzen

2024-10-29 12:22

administrator   ~0023617

Fix committed to master branch.

schanzen

2024-10-29 19:56

administrator   ~0023622

Released

Issue History

Date ModifiedUsernameFieldChange
2024-10-25 08:17fefeNew Issue
2024-10-25 11:57schanzenNote Added: 0023599
2024-10-25 11:59schanzenNote Added: 0023600
2024-10-25 12:03schanzenNote Edited: 0023599
2024-10-29 12:22schanzen
2024-10-29 12:22schanzenNote Added: 0023617
2024-10-29 12:22schanzenAssigned To => schanzen
2024-10-29 12:22schanzenStatusnew => resolved
2024-10-29 12:22schanzenResolutionopen => fixed
2024-10-29 12:22schanzenFixed in Version => 0.22.2
2024-10-29 12:22schanzenTarget Version => 0.22.2
2024-10-29 19:56schanzenNote Added: 0023622
2024-10-29 19:56schanzenStatusresolved => closed