diff mbox series

[BlueZ,v2,04/11] mesh: Rename parameter list per crypto usage

Message ID 20230120194731.90065-5-brian.gix@gmail.com (mailing list archive)
State Superseded
Headers show
Series Mesh v1.1 additions | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/IncrementalBuild success Incremental Build PASS

Commit Message

Brian Gix Jan. 20, 2023, 7:47 p.m. UTC
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 mbox series

Patch

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],