Rusty Russell [ARCHIVE] on Nostr: 📅 Original date posted:2016-06-27 📝 Original message:To quote: > ...
📅 Original date posted:2016-06-27
📝 Original message:To quote:
> HMAC_SHA512(key=ecdh_secret|cipher-type,msg="encryption key").
>
> K_1 must be the left 32bytes of the HMAC_SHA512 hash.
> K_2 must be the right 32bytes of the HMAC_SHA512 hash.
This seems a weak reason to introduce SHA512 to the mix. Can we just
make:
K_1 = HMAC_SHA256(key=ecdh_secret|cipher-type,msg="header encryption key")
K_2 = HMAC_SHA256(key=ecdh_secret|cipher-type,msg="body encryption key")
Thanks,
Rusty.
Published at
2023-06-07 17:51:32Event JSON
{
"id": "afca2128fa22b234ba080710dbfcb08774c52c79b0417a1f48edcba61fa463dd",
"pubkey": "13bd8c1c5e3b3508a07c92598647160b11ab0deef4c452098e223e443c1ca425",
"created_at": 1686160292,
"kind": 1,
"tags": [
[
"e",
"865ae9660ffa796d019b6409907548cf0d8cccc89b3d009b0f6e17232981afa9",
"",
"reply"
],
[
"p",
"a23dbf6c6cc83e14cc3df4e56cc71845f611908084cfe620e83e40c06ccdd3d0"
]
],
"content": "📅 Original date posted:2016-06-27\n📝 Original message:To quote:\n\n\u003e HMAC_SHA512(key=ecdh_secret|cipher-type,msg=\"encryption key\").\n\u003e \n\u003e K_1 must be the left 32bytes of the HMAC_SHA512 hash.\n\u003e K_2 must be the right 32bytes of the HMAC_SHA512 hash.\n\nThis seems a weak reason to introduce SHA512 to the mix. Can we just\nmake:\n\nK_1 = HMAC_SHA256(key=ecdh_secret|cipher-type,msg=\"header encryption key\")\nK_2 = HMAC_SHA256(key=ecdh_secret|cipher-type,msg=\"body encryption key\")\n\nThanks,\nRusty.",
"sig": "071f7146c52b63cb996919272522e8d2981c8b76f4e965252768079b3fda80997ac139ee19608de46bac0fd32d95727b394bf1d0a8c201a17389ccdb63e7afc5"
}