From b9b35aa596ed588440559c6f3f7fc7b921aad44f Mon Sep 17 00:00:00 2001 From: akwizgran <michael@briarproject.org> Date: Wed, 10 Apr 2019 11:21:18 +0000 Subject: [PATCH] Update BTP.md --- protocols/BTP.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/protocols/BTP.md b/protocols/BTP.md index f46f83c..02fa42a 100644 --- a/protocols/BTP.md +++ b/protocols/BTP.md @@ -160,23 +160,23 @@ In dynamic mode, BTP achieves forward secrecy by periodically rotating and delet Each peer derives four initial keys from the root key. Alice derives her initial keys as follows: -- outgoing\_tag\_key := KDF(root\_key, "ALICE\_TAG\_KEY") +- outgoing\_tag\_key := KDF(root\_key, "org.briarproject.bramble.transport/ALICE\_TAG\_KEY") -- outgoing\_header\_key := KDF(root\_key, "ALICE\_HEADER\_KEY") +- outgoing\_header\_key := KDF(root\_key, "org.briarproject.bramble.transports/ALICE\_HEADER\_KEY") -- incoming\_tag\_key := KDF(root\_key, "BOB\_TAG\_KEY") +- incoming\_tag\_key := KDF(root\_key, "org.briarproject.bramble.transport/BOB\_TAG\_KEY") -- incoming\_header\_key := KDF(root\_key, "BOB\_HEADER\_KEY") +- incoming\_header\_key := KDF(root\_key, "org.briarproject.bramble.transport/BOB\_HEADER\_KEY") Bob derives his initial keys as follows: -- outgoing\_tag\_key := KDF(root\_key, "BOB\_TAG\_KEY") +- outgoing\_tag\_key := KDF(root\_key, "org.briarproject.bramble.transport/BOB\_TAG\_KEY") -- outgoing\_header\_key := KDF(root\_key, "BOB\_HEADER\_KEY") +- outgoing\_header\_key := KDF(root\_key, "org.briarproject.bramble.transport/BOB\_HEADER\_KEY") -- incoming\_tag\_key := KDF(root\_key, "ALICE\_TAG\_KEY") +- incoming\_tag\_key := KDF(root\_key, "org.briarproject.bramble.transport/ALICE\_TAG\_KEY") -- incoming\_header\_key := KDF(root\_key, "ALICE\_HEADER\_KEY") +- incoming\_header\_key := KDF(root\_key, "org.briarproject.bramble.transport/ALICE\_HEADER\_KEY") Thus Alice's outgoing keys are Bob's incoming keys and vice versa. @@ -190,13 +190,13 @@ The purpose of the timestamp is to save the cost of rotating keys from period ze The temporary keys for each time period P are derived from the previous period's keys as follows: -- outgoing\_tag\_key := KDF(outgoing\_tag\_key, "ROTATE", int\_64(P)) +- outgoing\_tag\_key := KDF(outgoing\_tag\_key, "org.briarproject.bramble.transport/ROTATE", int\_64(P)) -- outgoing\_header\_key := KDF(outgoing\_header\_key, "ROTATE", int\_64(P)) +- outgoing\_header\_key := KDF(outgoing\_header\_key, "org.briarproject.bramble.transport/ROTATE", int\_64(P)) -- incoming\_tag\_key := KDF(incoming\_tag\_key, "ROTATE", int\_64(P)) +- incoming\_tag\_key := KDF(incoming\_tag\_key, "org.briarproject.bramble.transport/ROTATE", int\_64(P)) -- incoming\_header\_key := KDF(incoming\_header\_key, "ROTATE", int\_64(P)) +- incoming\_header\_key := KDF(incoming\_header\_key, "org.briarproject.bramble.transport/ROTATE", int\_64(P)) To ensure forward secrecy, keys must be deleted when they are no longer needed. The outgoing keys for period P must be deleted at the end of period P, while the incoming keys for period P must be deleted at the end of period P + 1. @@ -206,23 +206,23 @@ In static mode, BTP does not provide forward secrecy. The temporary keys for any Alice derives her temporary keys for each time period P as follows: -- outgoing\_tag\_key := KDF(root\_key, "ALICE\_STATIC\_TAG\_KEY", int\_64(P)) +- outgoing\_tag\_key := KDF(root\_key, "org.briarproject.bramble.transport/ALICE\_STATIC\_TAG\_KEY", int\_64(P)) -- outgoing\_header\_key := KDF(root\_key, "ALICE\_STATIC\_HEADER\_KEY", int\_64(P)) +- outgoing\_header\_key := KDF(root\_key, "org.briarproject.bramble.transport/ALICE\_STATIC\_HEADER\_KEY", int\_64(P)) -- incoming\_tag\_key := KDF(root\_key, "BOB\_STATIC\_TAG\_KEY", int\_64(P)) +- incoming\_tag\_key := KDF(root\_key, "org.briarproject.bramble.transport/BOB\_STATIC\_TAG\_KEY", int\_64(P)) -- incoming\_header\_key := KDF(root\_key, "BOB\_STATIC\_HEADER\_KEY", int\_64(P)) +- incoming\_header\_key := KDF(root\_key, "org.briarproject.bramble.transport/BOB\_STATIC\_HEADER\_KEY", int\_64(P)) Bob derives his temporary keys as follows: -- outgoing\_tag\_key := KDF(root\_key, "BOB\_STATIC\_TAG\_KEY", int\_64(P)) +- outgoing\_tag\_key := KDF(root\_key, "org.briarproject.bramble.transport/BOB\_STATIC\_TAG\_KEY", int\_64(P)) -- outgoing\_header\_key := KDF(root\_key, "BOB\_STATIC\_HEADER\_KEY", int\_64(P)) +- outgoing\_header\_key := KDF(root\_key, "org.briarproject.bramble.transport/BOB\_STATIC\_HEADER\_KEY", int\_64(P)) -- incoming\_tag\_key := KDF(root\_key, "ALICE\_STATIC\_TAG\_KEY", int\_64(P)) +- incoming\_tag\_key := KDF(root\_key, "org.briarproject.bramble.transport/ALICE\_STATIC\_TAG\_KEY", int\_64(P)) -- incoming\_header\_key := KDF(root\_key, "ALICE\_STATIC\_HEADER\_KEY", int\_64(P)) +- incoming\_header\_key := KDF(root\_key, "org.briarproject.bramble.transport/ALICE\_STATIC\_HEADER\_KEY", int\_64(P)) Thus Alice's outgoing keys are Bob's incoming keys and vice versa. -- GitLab