All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Gix <brian.gix@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: brian.gix@intel.com
Subject: [PATCH BlueZ v3 04/11] mesh: Rename parameter list per crypto usage
Date: Mon, 23 Jan 2023 11:48:17 -0800	[thread overview]
Message-ID: <20230123194824.257351-5-brian.gix@gmail.com> (raw)
In-Reply-To: <20230123194824.257351-1-brian.gix@gmail.com>

From: Brian Gix <brian.gix@intel.com>

The derived key generated by the "nkpk" salt and network master key is
used to create Private Beacons as of Mesh Profile Specification v1.1
---
 mesh/crypto.c | 4 ++--
 mesh/crypto.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/mesh/crypto.c b/mesh/crypto.c
index 668d16877..3754cb012 100644
--- a/mesh/crypto.c
+++ b/mesh/crypto.c
@@ -251,9 +251,9 @@ bool mesh_crypto_nkbk(const uint8_t n[16], uint8_t beacon_key[16])
 	return crypto_128(n, "nkbk", beacon_key);
 }
 
-bool mesh_crypto_nkpk(const uint8_t n[16], uint8_t proxy_key[16])
+bool mesh_crypto_nkpk(const uint8_t n[16], uint8_t private_key[16])
 {
-	return crypto_128(n, "nkpk", proxy_key);
+	return crypto_128(n, "nkpk", private_key);
 }
 
 bool mesh_crypto_k3(const uint8_t n[16], uint8_t out64[8])
diff --git a/mesh/crypto.h b/mesh/crypto.h
index c31abbbbd..55789886e 100644
--- a/mesh/crypto.h
+++ b/mesh/crypto.h
@@ -26,7 +26,7 @@ bool mesh_aes_ecb_one(const uint8_t key[16],
 			const uint8_t plaintext[16], uint8_t encrypted[16]);
 bool mesh_crypto_nkik(const uint8_t network_key[16], uint8_t identity_key[16]);
 bool mesh_crypto_nkbk(const uint8_t network_key[16], uint8_t beacon_key[16]);
-bool mesh_crypto_nkpk(const uint8_t network_key[16], uint8_t proxy_key[16]);
+bool mesh_crypto_nkpk(const uint8_t network_key[16], uint8_t private_key[16]);
 bool mesh_crypto_identity(const uint8_t net_key[16], uint16_t addr,
 							uint8_t id[16]);
 bool mesh_crypto_beacon_cmac(const uint8_t encryption_key[16],
-- 
2.39.1


  parent reply	other threads:[~2023-01-23 19:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23 19:48 [PATCH BlueZ v3 00/11] Mesh v1.1 additions Brian Gix
2023-01-23 19:48 ` [PATCH BlueZ v3 01/11] doc/mesh: Add Remote Provisioning DBus APIs Brian Gix
2023-01-23 22:57   ` Mesh v1.1 additions bluez.test.bot
2023-01-23 19:48 ` [PATCH BlueZ v3 02/11] mesh: Add Remote Provisioning Brian Gix
2023-01-23 19:48 ` [PATCH BlueZ v3 03/11] tools/mesh: Optimize for multiple RPR servers and NPPI Brian Gix
2023-01-23 19:48 ` Brian Gix [this message]
2023-01-23 19:48 ` [PATCH BlueZ v3 05/11] unit/mesh: Add unit testing of Mesh Private Beaconing Brian Gix
2023-01-23 19:48 ` [PATCH BlueZ v3 06/11] mesh: Add storage of Mesh Private Beacon settings Brian Gix
2023-01-23 19:48 ` [PATCH BlueZ v3 07/11] mesh: Add Mesh Private Beacon server Brian Gix
2023-01-23 19:48 ` [PATCH BlueZ v3 08/11] mesh: Add Tx/Rx support of Mesh Private Beacons Brian Gix
2023-01-23 19:48 ` [PATCH BlueZ v3 09/11] mesh: Add internal Mesh Private Beacon model Brian Gix
2023-01-23 19:48 ` [PATCH BlueZ v3 10/11] tools/mesh: Add support for Mesh Private Beacons Brian Gix
2023-01-23 19:48 ` [PATCH BlueZ v3 11/11] mesh: Switch beaconing net key Brian Gix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230123194824.257351-5-brian.gix@gmail.com \
    --to=brian.gix@gmail.com \
    --cc=brian.gix@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.