Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3098512ybi; Tue, 2 Jul 2019 02:08:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+ZZqT6cKwQ2/hnUbAlbw+DxskWpL7v8IK1NTr10w9OazgrDp/2g7ZCqMv7ZIvtsJqbw/Z X-Received: by 2002:a17:90a:be08:: with SMTP id a8mr4173379pjs.69.1562058489330; Tue, 02 Jul 2019 02:08:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562058489; cv=none; d=google.com; s=arc-20160816; b=fTnOfIH3ZDquVDpC/2bCYqX3SmRAcZfplctUfVmKRj/4uQP4kmJcdDcMyi9/kro5ih N/41y0PqrNLHoYLX1yDOu4atzhpsARK7kaWZPzyhkSEya6mC6cfHTn7Pu7v3JKCcfhCy UkJPaw/PWiUELGfoKjq/BxYdaZmbqfRcr3Pe8Un9JAAqzE6Njcpz6Q7APHHok76TGY36 t6kxuhZ31SbqjHstpRa2xuxoxQzRX/9VO+IwbVlQeOH0VGRS7iHjuExqtlKS5TJ6hPud aH4epSz7RzxFVJN4o8JM4y3rM/fX6tsKUHJuMmH1B4HfF6q9Q/fNys6NUbaKf5rKHWyW zTxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=mp3ZY1Zbmk6NFA2H80XeWFYbrVsJdT8lY/Wlq0J2yjo=; b=qZFVmDDuHtCiyo5IjnCOgEke6gutgtLP8BfywcYM48TcLddTxHRGFfK1MPVbvf3+k7 DbaMhY1GLr3NE8Kw2Mi8haktM2PepUDT7T1doPVI8Gwp7r47oH0GS+tg0f/SMK6lg6hS /1loQCdZtIplwzYNyoxj+esvff4jYYQKAJnastDDdyNGv2E3mjy7dc7s7zr/4Cfg+YbE co/0760z2Z1Cw3M719WPwMlQVGf4rX8LdkzbUWLJB+v1kaJcVvL/yyVV6cg+rAoiKTZn 0mBZzySxHg75lvvFUi/TVXIunUqLwDsfI12+0Nf10ahAM8FO+jYbyLtKeXmJHMUO5wBu Y1Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=M1rBaS4Q; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a14si1823906pjo.40.2019.07.02.02.07.41; Tue, 02 Jul 2019 02:08:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=M1rBaS4Q; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726283AbfGBJHi (ORCPT + 99 others); Tue, 2 Jul 2019 05:07:38 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:35851 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726213AbfGBJHi (ORCPT ); Tue, 2 Jul 2019 05:07:38 -0400 Received: by mail-lf1-f66.google.com with SMTP id q26so10849627lfc.3 for ; Tue, 02 Jul 2019 02:07:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silvair-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=mp3ZY1Zbmk6NFA2H80XeWFYbrVsJdT8lY/Wlq0J2yjo=; b=M1rBaS4QLPGqStqsLt2DUr4LAd1jg0Y9ps3I4e1tH+XmZDS+XGsvMfnw4CUY3asmOC A2rD1MteTRN/gEXSH6DM/RASS9r7SbJuf9H0rUD1B4Zeby9QT2NM5ztmcRls7s2+6eiB PadkBjONSEwGvGmX+pEQaE0orKlTsx0oaVQPK4nKinbp7/0ko1lgaRAmGSUCnMWMTgLO hw3b7YmVHiyt/6jUQtJRKLhc+qUAqNmTsllPq5ot+TA5LmuI+BwTCsHRIYoJqLSyc1AK KEKPbSnrsI+6pTdazyGdatT4YekV4FnSE64W/k7M74VpQsDwp+cTbHALUX+/110h7y+i ttAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=mp3ZY1Zbmk6NFA2H80XeWFYbrVsJdT8lY/Wlq0J2yjo=; b=TWjxBY6oRrxwWRmXvFwwnAIcggnF5jkLjp3E9/BGofRyXY+zHgqIolS3XgfpNWqSnx YjZhHDmko+oxXdHWC5s2/v3eQfgBqVTSc9YgUloJav92LiPwSWnXMiiNY0qvieGuHdyz ZqzAkrzERA7RZhQkMoFZxygwTW+cvOAe1e5UwAXQk4oYqlX2zTZFXSKv1Io9ESWEPeps vGGTJn4GXL9iaf4Imk0mk0HRfqcFYAkcPBx17mrUL6AlfXjYq/AuRpRwXiNj521SsiFS Gq8T1uh77kpPH7J3KuGZ4OCWHiLUAbbcmJ+7OebHf97QhouK1NEt1M+6ZG7TD/FZyBRF Kg+g== X-Gm-Message-State: APjAAAVT6Lp0gQ7QBHj1hUG/bVHnjTSbjpILyMT0eRzQthMYpKBn1tLr sCn/IK0WfBxrj1kH4T+nWFB7SoizWh4= X-Received: by 2002:ac2:5189:: with SMTP id u9mr14405268lfi.189.1562058455700; Tue, 02 Jul 2019 02:07:35 -0700 (PDT) Received: from mlowasrzechonek2133.silvair.lan ([217.153.94.18]) by smtp.gmail.com with ESMTPSA id 2sm3684904lji.94.2019.07.02.02.07.34 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 02 Jul 2019 02:07:35 -0700 (PDT) From: =?UTF-8?q?Micha=C5=82=20Lowas-Rzechonek?= To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v2 0/3] Add possibility to use remote device keys Date: Tue, 2 Jul 2019 11:07:28 +0200 Message-Id: <20190702090731.30852-1-michal.lowas-rzechonek@silvair.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This patchset adds support for sending and receiving messages encrypted with remote device keys. This plugs a 'leak' in the API where it was possible to exchange such messages using Send()/MessageReceived() API by using 0x7fff app key index. In order to allow the application to receive responses from a local Config Server model, messages originating from a local node and encrypted using local device key are also forwarded to the application via D-Bus (assuming they were not handled by one of internal models). MichaƂ Lowas-Rzechonek (3): mesh: Split APP_IDX_DEV into APP_IDX_DEV_LOCAL and APP_IDX_DEV_REMOTE mesh: Implement DevKeySend() method on Node interface mesh: Handle messages encrypted with a remote device key mesh/cfgmod-server.c | 15 +++---- mesh/model.c | 93 +++++++++++++++++++++++++++++++++++++------- mesh/net.h | 10 +++-- mesh/node.c | 59 +++++++++++++++++++++++++++- 4 files changed, 150 insertions(+), 27 deletions(-) -- 2.19.1