Skip to content

Commit 51aa35e

Browse files
David Carliermethane
authored andcommitted
bpo-33164: update blake2 implementation (GH-6286)
1 parent 20e1e25 commit 51aa35e

27 files changed

+18379
-685
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Updated blake2 implementation which uses secure memset implementation provided by platform.

Modules/_blake2/impl/blake2-config.h

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
11
/*
22
BLAKE2 reference source code package - optimized C implementations
33
4-
Copyright 2012, Samuel Neves <[email protected]>. You may use this under the
5-
terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at
6-
your option. The terms of these licenses can be found at:
4+
Written in 2012 by Samuel Neves <[email protected]>
75
8-
- CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
9-
- OpenSSL license : https://www.openssl.org/source/license.html
10-
- Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
6+
To the extent possible under law, the author(s) have dedicated all copyright
7+
and related and neighboring rights to this software to the public domain
8+
worldwide. This software is distributed without any warranty.
119
12-
More information about the BLAKE2 hash function can be found at
13-
https://blake2.net.
10+
You should have received a copy of the CC0 Public Domain Dedication along with
11+
this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
1412
*/
1513
#pragma once
1614
#ifndef __BLAKE2_CONFIG_H__
1715
#define __BLAKE2_CONFIG_H__
1816

19-
/* These don't work everywhere */
20-
#if defined(__SSE2__) || defined(__x86_64__) || defined(__amd64__)
17+
#if defined(__SSE2__)
2118
#define HAVE_SSE2
2219
#endif
2320

@@ -26,7 +23,7 @@
2623
#endif
2724

2825
#if defined(__SSE4_1__)
29-
#define HAVE_SSE41
26+
#define HAVE_SSE4_1
3027
#endif
3128

3229
#if defined(__AVX__)
@@ -51,8 +48,8 @@
5148
#endif
5249

5350
#ifdef HAVE_AVX
54-
#ifndef HAVE_SSE41
55-
#define HAVE_SSE41
51+
#ifndef HAVE_SSE4_1
52+
#define HAVE_SSE4_1
5653
#endif
5754
#endif
5855

0 commit comments

Comments
 (0)