canmove, Confirmed users
725
edits
| Line 79: | Line 79: | ||
== Key derivation == | == Key derivation == | ||
The encryption key T(1) and the HMAC key T(2) will be derived from J-PAKE's strong secret K as follows: | The AES encryption key T(1) and the HMAC key T(2) will be derived from J-PAKE's strong secret K as follows: | ||
extraction_key = "\x00" * 32 | extraction_key = "\x00" * 32 | ||
key_string = HMAC-SHA256(K, extraction_key) | key_string = HMAC-SHA256(K, extraction_key) | ||
T(1) = HMAC-SHA256(key_string, "" + "Sync-AES_256_CBC-HMAC256" + 0x01) | T(1) = HMAC-SHA256(key_string, "" + "Sync-AES_256_CBC-HMAC256" + 0x01) | ||
| Line 90: | Line 88: | ||
(See http://tools.ietf.org/html/rfc5869) | (See http://tools.ietf.org/html/rfc5869) | ||
To verify the key on both ends, the value | |||
"Sync-AES_256_CBC-HMAC256" | |||
is encrypted with the AES key, then hashed with the HMAC key. | |||
== Data format == | == Data format == | ||