220 12453 <53F9E580.2050500@gmail.com> article
Path: news.gmane.org!not-for-mail
From: =?ISO-8859-1?Q?Ion_Gazta=F1aga?= <igaztanaga@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Cryptographic hash functions reloaded [was
 Interest in cryptographic functions within the standard library]
Date: Sun, 24 Aug 2014 15:15:44 +0200
Lines: 32
Approved: news@gmane.org
Message-ID: <53F9E580.2050500@gmail.com>
References: <53F8F620.3090701@gmx.de> <B33BCE97-51A4-4880-9C26-5347D6C8A02A@gmail.com> <53F95E1E.7070608@knejp.de> <53F9A368.5020204@gmx.de>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1408886186 30530 80.91.229.3 (24 Aug 2014 13:16:26 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sun, 24 Aug 2014 13:16:26 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCBPZTUF4YBRBH6L46PQKGQEZALU6DQ@isocpp.org Sun Aug 24 15:16:19 2014
Return-path: <std-proposals+bncBCBPZTUF4YBRBH6L46PQKGQEZALU6DQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wi0-f200.google.com ([209.85.212.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCBPZTUF4YBRBH6L46PQKGQEZALU6DQ@isocpp.org>)
	id 1XLXeb-0004Ie-6I
	for gclcip-std-proposals@m.gmane.org; Sun, 24 Aug 2014 15:16:17 +0200
Original-Received: by mail-wi0-f200.google.com with SMTP id d1sf725770wiv.3
        for <gclcip-std-proposals@m.gmane.org>; Sun, 24 Aug 2014 06:16:16 -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:content-transfer-encoding;
        bh=8VAkuaGywhaQoqgDvUrWIow6b17JuRwxoBQ8Ko4YOks=;
        b=Stx/3GwoTwlFFm4nFFZyLipQgWG2wALjEJrO+ikg8Md4uf80OYBb+xFsGchx9AIGJ4
         5+xDL6SPX6jes9LFUA2NLkQUzgEM/NKQe93RrinkZak3dDHcy3pmOCvnF/ejmLLgpWxG
         OPyDa5O99X8/W0dQ3agsEUsdjcVv8Ztu70xC/GyPz4y2mwTZPP/fcpRrrkRLgGt7KW2r
         Hel1KTUfvUwhQl7jVK57R/W9Uo/syqOYMIcJrQOURYMS3MnBl18sYIKXX1pnpzUhoiZp
         hiTqv64RaVvpVNDQ1dJj9e5986xNBBW5pwEAZSqHSBkPVVHdB4JopApJvIRIqQBQdz+M
         Zhh 
X-Gm-Message-State: ALoCoQn+9RIwD8yY7Z1KIQ0e6SnX5dYekGfnN9aHAWBh4zaKhexMZAGMrtKLCdoC3gPeTX/a52JI
X-Received: by 10.180.99.74 with SMTP id eo10mr737412wib.2.1408886176468;
        Sun, 24 Aug 2014 06:16:16 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.96.34 with SMTP id dp2ls162591wib.53.canary; Sun, 24 Aug
 2014 06:16:15 -0700 (PDT)
X-Received: by 10.194.179.73 with SMTP id de9mr2407257wjc.87.1408886175339;
        Sun, 24 Aug 2014 06:16:15 -0700 (PDT)
Original-Received: from mail-we0-x22c.google.com (mail-we0-x22c.google.com [2a00:1450:400c:c03::22c])
        by mx.google.com with ESMTPS id hy4si51434021wjb.169.2014.08.24.06.16.15
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sun, 24 Aug 2014 06:16:15 -0700 (PDT)
Received-SPF: pass (google.com: domain of igaztanaga@gmail.com designates 2a00:1450:400c:c03::22c as permitted sender) client-ip=2a00:1450:400c:c03::22c;
Original-Received: by mail-we0-f172.google.com with SMTP id x48so12395486wes.31
        for <std-proposals@isocpp.org>; Sun, 24 Aug 2014 06:16:15 -0700 (PDT)
X-Received: by 10.180.21.101 with SMTP id u5mr9020373wie.68.1408886175178;
        Sun, 24 Aug 2014 06:16:15 -0700 (PDT)
Original-Received: from [192.168.0.3] (69.85-85-134.dynamic.clientes.euskaltel.es. [85.85.134.69])
        by mx.google.com with ESMTPSA id ch5sm91599645wjb.18.2014.08.24.06.16.14
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sun, 24 Aug 2014 06:16:14 -0700 (PDT)
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
In-Reply-To: <53F9A368.5020204@gmx.de>
X-Original-Sender: igaztanaga@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of igaztanaga@gmail.com designates 2a00:1450:400c:c03::22c as
 permitted sender) smtp.mail=igaztanaga@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE 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-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:12453
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/12453>

El 24/08/2014 10:33, Markus Mayer escribi=F3:
> That's a really good point. I will use 'unsigned char' and let
> implementations of odd-sized architectures decide themselves if they
> implement it.

Although it's pretty similar, you can use uint_least8_t, to express that=20
the result will be put in an array storage of a type that will only use=20
8 bits and it's interpreted as an unsigned number.

That means that if SHA-256 is used, ALGORITHM_DEFINED will always be 32=20
in all platforms. Otherwise, in a platform with CHAR_BIT=3D=3D32 (say, a 32=
=20
bit DSP) one could store 32 bits in an unsigned char and=20
ALGORITHM_DEFINED would be 8 for SHA-256. This is important for the user=20
as she has to correctly interpret how the result is stored.

Best,

Ion


--=20

---=20
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 e=
mail 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-proposa=
ls/.

.
