Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1802271rwb; Thu, 19 Jan 2023 15:58:44 -0800 (PST) X-Google-Smtp-Source: AMrXdXtAD5rGWpDl47x39cGUQFNXy6ZRsB1mi79M129RdAf1rYUzQ8tsuArcB23nKnflm7G/kqW4 X-Received: by 2002:a17:902:6b06:b0:194:a602:13c8 with SMTP id o6-20020a1709026b0600b00194a60213c8mr11534594plk.52.1674172724614; Thu, 19 Jan 2023 15:58:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674172724; cv=none; d=google.com; s=arc-20160816; b=QFpbNQT4wGnWs4DMhwozKb3qFN4tKoxrAsS8rvIVsV7C6vElydYXgM1Kj1kBtw8rK9 8UuWUiaOQzLz8smHXVsDEDVjvS+RdUm73h/SwtCJO3XQxLtlS4u7mBnQT4m/HkVMzYza pgXzGmobyKcR1apOyeM9XHedLJlsxdDL1xkREiq4u0bN5rZic4UOKSr0WogDhosnV0wI TheYFecWrZi4WjAKsdPYK1KOk4T7O7ECx4jYcfruXCZDwVxVhjdi5ByAbsGLmEw2PW9D Dkd9upQXhb6VuJsdp0oLLUFFFddi9Cv/0sWM4Gz3L3YYntoQ/CyLGo5VLRtGPtARt8MF F8fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6IbjGmvpVt2am6W6/Kww6kXKnPQ6CQRTRqXyvFQ8XB0=; b=cAMJqaUrDRpK23+JMGrD7p981JB9EVPBYLcnyJHvmHNbPh7YDVQTSaQqZ212nF+aJ+ WFieJEqlzFeqVAkZt+SruPB6ZehleaaOw7SHU64icDCHrXSCwGzMyqYBlY6mlN0gIl04 ZDPTOpow4P8a8mKBYjk54OCRottzg88RzODn6tdARHjWBudvBivlr2lXck1YmzeASzHz U27sgRKg9SfqPyEkP7tyEd1Rp0dIkcGg/cnOlUDas6+MdCBtuZx5Lf+QDtkxW+qG6aig iI+YAYmt4mdp2I+nthdmOO2qo3oZNcwCBw7uOXfhI5PdwPjHGvpywb/b4Z+OBXkqygt7 xWJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Up5qblDm; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u18-20020a170902e81200b00188712fdf88si21199464plg.46.2023.01.19.15.58.26; Thu, 19 Jan 2023 15:58:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Up5qblDm; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229788AbjASX6Q (ORCPT + 99 others); Thu, 19 Jan 2023 18:58:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230117AbjASX6P (ORCPT ); Thu, 19 Jan 2023 18:58:15 -0500 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A0959FDCD for ; Thu, 19 Jan 2023 15:58:08 -0800 (PST) Received: by mail-pj1-x1034.google.com with SMTP id n20-20020a17090aab9400b00229ca6a4636so6621048pjq.0 for ; Thu, 19 Jan 2023 15:58:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6IbjGmvpVt2am6W6/Kww6kXKnPQ6CQRTRqXyvFQ8XB0=; b=Up5qblDm6JUfyQiZ15D0Ib7HkzGG2fYMxmKZeiTHvjtqtW5ZWRLEuWiXkdggOVoc5a jKLzUP0qULDv+SWHDc2U1b6e5nDRgKaC47YbhoaLuoTGn4rR5O9pPPUftUyiOxOAH1RS fV7y+JQD+5fQ1JRFeb3u4fzCAuhZfSACwVJXfBQOx4DCXELzd/qZdxj/jJeOm1L8jQ9I fqLLSKB/RV7pabQmXwiYQUtj37uv9CVqEBEbp9plJOSjTY374LRyHVhQ11WsMf9i3kth rK2jHHA5SzUrGXoMPFxIk0I7blbuLXtOH4hQfP+r7GHu/6LVvBYwQkRssVnSjSYlWEmw gbCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6IbjGmvpVt2am6W6/Kww6kXKnPQ6CQRTRqXyvFQ8XB0=; b=8M4I9FziVGZOjuaYiMOutHE+bq+WGXPDlfeUlSFGtuX4ZzXGM5cQZjwUdLGCt7K65q WWCP4qitjezFSOMb124iY2eeOWQ2o83x/dzeqo9cN01UsKYmTiPLNwHd6yCx+nbEQbZu KKumQGb6O8vdFb24dNGAsvcBLFAQY2kpgFTsXuFommds8y1sr+OOkR2hNfXKXs0PHCGP nn3j0KMvi9agvQCqfluhNHi7D4CNVmY6fCfjr4hNETjegUtXDai+C9kVsV3p3l4J/ZTa LKEmJ6MD1QXt/gw7wDR9KtYEAZcRx2bGF/3h/sWkO3pAVuxupt2HCM1ByhkKz4xrw4+0 gHLA== X-Gm-Message-State: AFqh2kqxz9+O7yV2Ww9Pe8jaCyeMWLzDB8MvuE9GRpLYjJ9dewz/r09w KjqeZyV+q/PefputfLCS7jVSroBGzg4BfQ== X-Received: by 2002:a17:902:d651:b0:194:bdcf:1ab8 with SMTP id y17-20020a170902d65100b00194bdcf1ab8mr7259468plh.37.1674172687137; Thu, 19 Jan 2023 15:58:07 -0800 (PST) Received: from fedora.. (97-113-173-242.tukw.qwest.net. [97.113.173.242]) by smtp.gmail.com with ESMTPSA id n10-20020a170902d2ca00b0019460c34839sm14826373plc.185.2023.01.19.15.58.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 15:58:06 -0800 (PST) From: Brian Gix To: linux-bluetooth@vger.kernel.org Cc: Brian Gix Subject: [PATCH BlueZ 04/12] mesh: Rename parameter list per crypto usage Date: Thu, 19 Jan 2023 15:57:47 -0800 Message-Id: <20230119235755.46002-5-brian.gix@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230119235755.46002-1-brian.gix@gmail.com> References: <20230119235755.46002-1-brian.gix@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Brian Gix 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.0