220 12518 <53FB9F25.8010207@gmx.net> article
Path: news.gmane.org!not-for-mail
From: Jens Maurer <Jens.Maurer@gmx.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Cryptographic hash functions reloaded [was
 Interest in cryptographic functions within the standard library]
Date: Mon, 25 Aug 2014 22:40:05 +0200
Lines: 32
Approved: news@gmane.org
Message-ID: <53FB9F25.8010207@gmx.net>
References: <53F8F620.3090701@gmx.de> <B33BCE97-51A4-4880-9C26-5347D6C8A02A@gmail.com> <53F989E9.5090701@gmx.net> <56088911-e6b9-4b1c-91cc-3aed83d87bd7@isocpp.org> <53FA5945.4070800@gmx.net> <CAA7U3HOv-2oB-WwU6eOaCtrTvyeG_3+bDFzP-Zzy6jefEaNyuQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: ger.gmane.org 1408999220 3878 80.91.229.3 (25 Aug 2014 20:40:20 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 25 Aug 2014 20:40:20 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDPMTYGK64JRBJ5652PQKGQE6IK6QCY@isocpp.org Mon Aug 25 22:40:13 2014
Return-path: <std-proposals+bncBDPMTYGK64JRBJ5652PQKGQE6IK6QCY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-we0-f198.google.com ([74.125.82.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDPMTYGK64JRBJ5652PQKGQE6IK6QCY@isocpp.org>)
	id 1XM13h-0003Ij-48
	for gclcip-std-proposals@m.gmane.org; Mon, 25 Aug 2014 22:40:09 +0200
Original-Received: by mail-we0-f198.google.com with SMTP id x48sf8451883wes.5
        for <gclcip-std-proposals@m.gmane.org>; Mon, 25 Aug 2014 13:40:08 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to
         :subject:references:in-reply-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:content-type;
        bh=5UUJ5NBi2g59xLFSfR243Gt0xPatxTgsFe5h2dU/Fbw=;
        b=WJWiPHzboInkgHkL9HfH6EII/qMpSDET1ei5ZcQC/PKbTiXl8s9sl1xJMhLNa4X3Ep
         8oEy2g0VA7pcxO4AezaixvMl9PEfU8ByanH/JTyVOd1i6kdgVd4gYMNL5PznEl6JMNXP
         DtlKEJ3wIA83nQFyvH05X4fCxNgNkq+D0m19vlT5icD6tdE2mLwW7sJgMOB+BO695tjs
         Su0iKb71Mp1RQkifhyFy0mN1Dpz/IRkj31vu/Qqo6cvIzA5LiuPVdTZPiQrM6BWPukdO
         tiF3AIv6Tpm31Xg6o/HDqhdE/1BgmEwoiACXJoIdnRTJbabGxuuSaYnR4jz4Bia266+P
         K6Uw==
X-Gm-Message-State: ALoCoQn6C6xTBtNuf1UXZIpzUwL0YL7oqPnV7Us5ZPOq+EEKa92NdbiTYDppj+JPUZfbALVrlXqs
X-Received: by 10.112.168.230 with SMTP id zz6mr450359lbb.10.1408999208754;
        Mon, 25 Aug 2014 13:40:08 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.10.38 with SMTP id f6ls390820lab.78.gmail; Mon, 25 Aug
 2014 13:40:07 -0700 (PDT)
X-Received: by 10.152.163.199 with SMTP id yk7mr5225446lab.85.1408999207545;
        Mon, 25 Aug 2014 13:40:07 -0700 (PDT)
Original-Received: from mout.gmx.net (mout.gmx.net. [212.227.17.21])
        by mx.google.com with ESMTPS id m9si996839lbk.83.2014.08.25.13.40.07
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 25 Aug 2014 13:40:07 -0700 (PDT)
Received-SPF: pass (google.com: domain of Jens.Maurer@gmx.net designates 212.227.17.21 as permitted sender) client-ip=212.227.17.21;
Original-Received: from [192.168.2.100] ([178.7.39.200]) by mail.gmx.com (mrgmx102)
 with ESMTPSA (Nemesis) id 0MaV3V-1X20AZ3MKn-00KAVl for
 <std-proposals@isocpp.org>; Mon, 25 Aug 2014 22:40:06 +0200
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:6.0.1) Gecko/20110830 Thunderbird/6.0.1
In-Reply-To: <CAA7U3HOv-2oB-WwU6eOaCtrTvyeG_3+bDFzP-Zzy6jefEaNyuQ@mail.gmail.com>
X-Provags-ID: V03:K0:58KUADWoVoy+pLMEn8p8Wkem69MeEHXz141lrqTrETgKa5QEg8F
 6jbIHTQ4NacWN1qo3S5bM58itJMk6/WarOB5ZDIBN4U8IeB5oBdRKYhpTTRjpa+rbm+4J5k
 t5Yd2l09IfyKzT9LMTXr83B/956yjJkiGbXhgGMOCQBXtznlgNoP796/gyOHxB+aHyX/rze
 vb48zNFBrVqnFMDLkrPLA==
X-UI-Out-Filterresults: notjunk:1;
X-Original-Sender: Jens.Maurer@gmx.net
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of Jens.Maurer@gmx.net designates 212.227.17.21 as permitted sender) smtp.mail=Jens.Maurer@gmx.net
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://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>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:12518
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/12518>

On 08/25/2014 05:21 PM, Olaf van der Spek wrote:
> On Sun, Aug 24, 2014 at 11:29 PM, Jens Maurer <Jens.Maurer@gmx.net> wrote:
>> Also, simply hashing
>>    int x[] = { 0, 1, 2, 3 };
>>    my_hash(x, sizeof(x));
>>
>> doesn't give you a consistent hash value across different machines,
>> because the hash operates on bytes, but the endianess of the "int"
>> (i.e. the mapping to bytes) differs.
>>
>>> Perhaps we should have (array_view<>) instead?
>>
>> Well, array_view<unsigned char> is probably equivalent to the
>> "unsigned char" proposal.
> 
> Kinda. Shouldn't both array_view<> and string_view<> be supported?

The mapping of application-level data (structs, strings etc.)
should be left to an adaptation layer, independent of the actual
hash algorithm.  Howard's proposal has this part right.

Jens


-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.
