forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpo-33164: update blake2 implementation (pythonGH-6286)
- Loading branch information
Showing
27 changed files
with
18,379 additions
and
685 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
Misc/NEWS.d/next/Security/2018-03-30-12-26-47.bpo-33164.aO29Cx.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Updated blake2 implementation which uses secure memset implementation provided by platform. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
/* | ||
BLAKE2 reference source code package - optimized C implementations | ||
Copyright 2012, Samuel Neves <[email protected]>. You may use this under the | ||
terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at | ||
your option. The terms of these licenses can be found at: | ||
Written in 2012 by Samuel Neves <[email protected]> | ||
- CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 | ||
- OpenSSL license : https://www.openssl.org/source/license.html | ||
- Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 | ||
To the extent possible under law, the author(s) have dedicated all copyright | ||
and related and neighboring rights to this software to the public domain | ||
worldwide. This software is distributed without any warranty. | ||
More information about the BLAKE2 hash function can be found at | ||
https://blake2.net. | ||
You should have received a copy of the CC0 Public Domain Dedication along with | ||
this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. | ||
*/ | ||
#pragma once | ||
#ifndef __BLAKE2_CONFIG_H__ | ||
#define __BLAKE2_CONFIG_H__ | ||
|
||
/* These don't work everywhere */ | ||
#if defined(__SSE2__) || defined(__x86_64__) || defined(__amd64__) | ||
#if defined(__SSE2__) | ||
#define HAVE_SSE2 | ||
#endif | ||
|
||
|
@@ -26,7 +23,7 @@ | |
#endif | ||
|
||
#if defined(__SSE4_1__) | ||
#define HAVE_SSE41 | ||
#define HAVE_SSE4_1 | ||
#endif | ||
|
||
#if defined(__AVX__) | ||
|
@@ -51,8 +48,8 @@ | |
#endif | ||
|
||
#ifdef HAVE_AVX | ||
#ifndef HAVE_SSE41 | ||
#define HAVE_SSE41 | ||
#ifndef HAVE_SSE4_1 | ||
#define HAVE_SSE4_1 | ||
#endif | ||
#endif | ||
|
||
|
Oops, something went wrong.