220 40404 <CANiq72=4-NBXg28AVBbaY83jLgTNRowmKiMT8Sgk28jTUu2xfw@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: more security concerns
Date: Tue, 9 Oct 2018 09:02:29 +0200
Lines: 35
Approved: news@gmane.org
Message-ID: <CANiq72=4-NBXg28AVBbaY83jLgTNRowmKiMT8Sgk28jTUu2xfw@mail.gmail.com>
References: <CAFdMc-0NqfbqeOhhH1YiVGxDRVPv7COKNqge3mLu8UE8SgcXNw@mail.gmail.com>
 <CAO8_tC4kNZ6s-xMXo69n1D3dbOMkqt0fjLU44Uq5TfABp17hQQ@mail.gmail.com> <CAFdMc-1DpAUkYDVyNmP5H49XyNVDq5_T6UkEVaQGMGA0YEhNGw@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1539068436 3440 195.159.176.226 (9 Oct 2018 07:00:36 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 9 Oct 2018 07:00:36 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDRZHGH43YJRBENF6HOQKGQE4563LZY@isocpp.org Tue Oct 09 09:00:31 2018
Return-path: <std-proposals+bncBDRZHGH43YJRBENF6HOQKGQE4563LZY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lj1-f197.google.com ([209.85.208.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDRZHGH43YJRBENF6HOQKGQE4563LZY@isocpp.org>)
	id 1g9m0M-0000l6-W3
	for gclcip-std-proposals@m.gmane.org; Tue, 09 Oct 2018 09:00:31 +0200
Original-Received: by mail-lj1-f197.google.com with SMTP id p6-v6sf216448ljb.0
        for <gclcip-std-proposals@m.gmane.org>; Tue, 09 Oct 2018 00:02:41 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1539068561; cv=pass;
        d=google.com; s=arc-20160816;
        b=MwwlzuU/B57MjgHfDJQoyX/hqJ2+IFSb5ngyzmLtUpREhRgbDy0U+lpZAKu0ePvxcW
         yuR6ojNtl2nD4ZoFmwXN78EUiIN46XFIaQMGSqfZV8z+lCRAUthNqBg14cVzLg+JuVcK
         YhiguZsx087QnHg6wrZmLs/PL8HPAXVuGsk5A6PebTBQwzVNtXUEEloVqmtykHTMOucI
         y1JFNitmUDSL835s6GHVl1PGc24D8euwhiaS+LaOz5w1G4ahbAKJfuWj1jdIIhGvItFN
         +fUiG9lMA1Nh3aBZMLF8br4piqPI/VoEnqjnuSWb8y3kqBLXKAXozcRVYBl/BcL+ZYgv
         f9nQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:in-reply-to:references:mime-version:dkim-signature;
        bh=6NDGuj/yJyBtxC2+TRQxzI8tA7v4ZsfPuE/JtaZUg+E=;
        b=yUECtPM4EtwvIjibW1FzAUP8FdfgD4bpUJKqZ+gcyT2pEA6IVqtiuUD73k4gQwumXd
         YCImKyrTPAL4LWj31XTh9RZcJjehQZB9fnkvJVcu/TnRyM/Xiw9dTqg2zJhhTGFfhQr3
         DbfNCQFykZpUlp0s0Kw+xl3RuOXr/M2Se/UD/Vk5/tUpOjvMOlMp3fj4ywTnXkfxFAON
         uy0PdhIWbK/OPd8Lhvhgq5CNJ1urTh2hOQCyIihpESzqku5BntJpwTfEDk8Pa3Af19T5
         XTPba/N/aBsGJxzoqrGBd9Ys1gGN36ULApg+VxmuPkygXcNCA76KII0oLbW1Hps+aJpX
         b6pQ==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=C1dD8ZgW;
       spf=pass (google.com: domain of miguel.ojeda.sandonis@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=miguel.ojeda.sandonis@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:references:in-reply-to:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=6NDGuj/yJyBtxC2+TRQxzI8tA7v4ZsfPuE/JtaZUg+E=;
        b=pZMCIaaP7eFQY2Z4TB8OYLJNMTCxHYSrK51V8Se1QLItr4G+ViKZ6Ku92XN7/w9ejT
         gi+Ntsdqyz+ACM6feVXAzKd7UXF80A7D6lH5uou0vs5jPSugQWqt5zxIU2O6AJfJarST
         9f4HbjE+uRulrFqmMzy2GHbYM5O5c2QHz1jTIL/r4GWo1nzdoHEUate8sh1vrzFy7S/+
         +gn/pqG6QOGUsA2ZSk6UOezDwsw1+uK4dEoyCbXCj9r+4FFE4SjkYR35Bq2vJ6Q9yQeS
         HP+FsbJCIIocOJ62/Ac96CaXiguGuYbMApNz2kv7BxR0+Glf1ogM2UCoQlLqttaVmho0
         FaQg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:references:in-reply-to:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=6NDGuj/yJyBtxC2+TRQxzI8tA7v4ZsfPuE/JtaZUg+E=;
        b=ANk1PnIF3SNgCIRAMtwAqXQORNKnahNW1vbe18UkR/YISF2qLT5oGl93uqHnqas5E5
         kIrZ3W4XBhca5T0f80Xp5W+YodcOn5d3ljLMwUivCAdqioQh306vjgx7g1lClQA3I36H
         MfalHLETi86vj9NQssGSQkKjiWZut5JOn8/Z/cUPkghmCza0I/IhACoNMlwGiOjnauuz
         9eqt5fYdPBNYOAEblIQ6aHHB2q0h8bDw0SNzyj7rES7zJ+ou4GFsqXyAQllerED8lU+Q
         u5edCVTWChelSl8Ov+AOQ0ZWlZdB1kQXNKD97Ef2xOSpRF9O9J6CtcV5nZNsiVTSnPdO
         xIyw==
X-Gm-Message-State: ABuFfogslBem5iqqWmF1NjX7JJ9Iwogr03t1UKOn4lyk492TW/fh3VNy
	ELPCyyD8cDWDDwFMgOx//HJ/LA==
X-Google-Smtp-Source: ACcGV61yWaUKKakc3D3hTbteeqCA1VPMj5WbWBusKs/ZAzWNee75xablHcMvfCgKPaaKOsbSyN7zMg==
X-Received: by 2002:a19:d894:: with SMTP id r20-v6mr716377lfi.3.1539068561734;
        Tue, 09 Oct 2018 00:02:41 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a2e:2b94:: with SMTP id r20-v6ls140501ljr.18.gmail; Tue, 09
 Oct 2018 00:02:40 -0700 (PDT)
X-Received: by 2002:a2e:7608:: with SMTP id r8-v6mr7576707ljc.175.1539068560458;
        Tue, 09 Oct 2018 00:02:40 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1539068560; cv=none;
        d=google.com; s=arc-20160816;
        b=kmUMaipIMSqpobSvsPA4V9KMCH2xYt72K9ZfI0IxnLl/BsIBYOR6eaPPXU0k5nMT7n
         Uo+hSxlYC/BE/P0FafmsO/c/hqwZrHTjI4PNb66s645zwlhWaKDaTlH49IBB5Z3uZz7G
         ajEpYRVf/Dnq95yA04c8ygS9u/lkivqJ0Yq3FdfdxpTR7e7eWydLoMfhthV5YRy+pwTQ
         LQtPInQqCU67z3knn82rSTYjGOuT/1yTvTM9Lmj/7TyUcYXknOSzCGI11EMZYy1RyeZW
         E+vsBLJSo95TcDdABFcnm3iBpxyOPTiDzbChSGTejOS3b5r3yz3NBLqV+3wXH76hxITr
         DmOQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:in-reply-to:references:mime-version
         :dkim-signature;
        bh=Yyq4IDBwVap9Ovgw4HBxPxI4dj2ateVaVIICG5ipIYI=;
        b=a1U05LSPclUpD55Y6nyUU4jySbAPphL44HBhK2VZ9PPGljd3HWQBvXuNn6PV4+OS4s
         WDl7Z0OdEqWtAq0GnD9kS3fOMoniToTT7wgcPZHwreVXQIoHgHrYjRlQGYpPc25qxDCo
         tKzcILQl7ObHXSfN8H/sqC0Is19hDRoztYHyRfIYw+71YIgqRb7ZMaTIa6SGQmMbawew
         KfxH+IMBqw3xpEZ8PxeTYEfy5tFXL0yRg51gBV+FpC5+CTybuGMchjKSRSEuEpCqSzVi
         17Gz/WBXJCD24kVbfvyWBDRMWQH2p4nM1gnNhp+spYTVRKNcgJ6ucf2achAHqtzcMlcA
         xW1g==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=C1dD8ZgW;
       spf=pass (google.com: domain of miguel.ojeda.sandonis@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=miguel.ojeda.sandonis@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id k5-v6sor2966320ljh.7.2018.10.09.00.02.40
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Tue, 09 Oct 2018 00:02:40 -0700 (PDT)
Received-SPF: pass (google.com: domain of miguel.ojeda.sandonis@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 2002:a2e:240b:: with SMTP id k11-v6mr18184755ljk.139.1539068559942;
 Tue, 09 Oct 2018 00:02:39 -0700 (PDT)
In-Reply-To: <CAFdMc-1DpAUkYDVyNmP5H49XyNVDq5_T6UkEVaQGMGA0YEhNGw@mail.gmail.com>
X-Original-Sender: miguel.ojeda.sandonis@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=C1dD8ZgW;       spf=pass
 (google.com: domain of miguel.ojeda.sandonis@gmail.com designates
 209.85.220.41 as permitted sender) smtp.mailfrom=miguel.ojeda.sandonis@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:40404
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/40404>

Hi Daniel,

On Fri, Sep 28, 2018 at 3:36 PM Daniel Gutson <danielgutson@gmail.com> wrote:
>
> Yeah.  But please note that this is not only for function calls.
>
> void f()
> {
>    int secret;
>    ....
>    secret = 0;  //removed due to DSE
> }
>

For this specific case (data that must be kept as secret as reasonably
possible, like passwords, secrets, keying data...), I am proposing
`secure_clear` (a memset_s-like function and function template) and
`secure_val` (a new class template) in P1315 for the next mailing.
Meanwhile that is out, please take a look at:

  https://ojeda.io/cpp/secure_val

As long as your proposal allows to write functionality like
`secure_clear` and `secure_val` as portably and easily as possible, it
seems useful!

Cheers,
Miguel

-- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CANiq72%3D4-NBXg28AVBbaY83jLgTNRowmKiMT8Sgk28jTUu2xfw%40mail.gmail.com.

.
