View Issue Details

IDProjectCategoryView StatusLast Update
0005897GNUnetGNSpublic2019-09-17 09:52
ReporterschanzenAssigned To 
PrioritylowSeveritytweakReproducibilityhave not tried
Status newResolutionopen 
Product Version 
Target Version0.12.0Fixed in Version 
Summary0005897: Harmonize HKDF arguments for GNS block key derivations
DescriptionSo currently it looks like this in the code:

PRK_h := HKDF-Extract ("key-derivation", x*P)
h := HKDF-Expand (PRK_h, l | "gns", 512 / 8)
d := h*x mod p
PRK_kiv := HKDF-Extract (d*P, l)
K := HKDF-Expand (PRK_kiv, "gns-aes-ctx-key", 512 / 8)
IV := HKDF-Expand (PRK_kiv, "gns-aes-ctx-iv", 256 / 8)

In the case of PRK_kiv we use d*P as the "salt" value. For PRK_h we use a static public string.
I propose we modify the derivation of K and IV to:

PRK_h := HKDF-Extract ("key-derivation", x*P)
h := HKDF-Expand (PRK_h, l, 512 / 8) <== CHANGED: Removed "gns"
d := h*x mod p
PRK_k := HKDF-Extract ("gns-aes-ctx-key", d*P) <== CHANGED: Split into two PRKs and use string as salt and d*P as IKM
PRK_iv := HKDF-Extract ("gns-aes-ctx-iv", d*P) <== CHANGED: Split into two PRKs and use string as salt and d*P as IKM
K := HKDF-Expand (PRK_k, l, 512 / 8) <== CHANGED: Use only l as info
IV := HKDF-Expand (PRK_iv, l, 256 / 8) <== CHANGED: Use only l as info

we _may_ also change the "key-derivation" string to something else, suggestions welcome.

This change will break backwards compatibility for GNS.
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-09-17 09:52 schanzen New Issue