View Issue Details

IDProjectCategoryView StatusLast Update
0005897GNUnetGNSpublic2020-06-01 20:00
Reporterschanzen Assigned Toschanzen Due Date
PrioritylowSeveritytweakReproducibilityhave not tried
Status closedResolutionfixed 
Target Version0.12.0Fixed in Version0.12.0 
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.

Relationships

child of 0005920 closedschanzen LSD0001 meta issue 
child of 0006324 closedschanzen LSD0001 meta issue 

Activities

schanzen

2019-12-01 11:59

administrator   ~0015109

Fixed in 8988b34f6d guarded by ifdefs for LSD001.

schanzen

2019-12-01 12:02

administrator   ~0015110

Reopen until we remove ifdefs

Christian Grothoff

2019-12-07 13:49

manager   ~0015134

Flipped in 3a13f497b..b365e4d52

schanzen

2019-12-15 14:18

administrator   ~0015178

0.12.0 released

Issue History

Date ModifiedUsernameFieldChange
2019-09-17 07:52schanzenNew Issue
2019-11-30 20:09schanzenRelationship addedchild of 0005920
2019-12-01 11:59schanzenAssigned To => schanzen
2019-12-01 11:59schanzenStatusnew => resolved
2019-12-01 11:59schanzenResolutionopen => fixed
2019-12-01 11:59schanzenFixed in Version => 0.12.0
2019-12-01 11:59schanzenNote Added: 0015109
2019-12-01 12:02schanzenStatusresolved => assigned
2019-12-01 12:02schanzenNote Added: 0015110
2019-12-07 13:49Christian GrothoffStatusassigned => resolved
2019-12-07 13:49Christian GrothoffNote Added: 0015134
2019-12-15 14:18schanzenNote Added: 0015178
2019-12-15 14:18schanzenStatusresolved => closed
2020-05-31 22:52AdminknoxRelationship addedchild of 0006324