Skip to content

Commit 3bd67e4

Browse files
committed
yescrypt: Sync with upstream
1 parent 769af18 commit 3bd67e4

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

src/yescrypt/CHANGES

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
Changes made since 1.1.0 (2019/06/30).
22

3+
Use AVX512VL XOP-like bit rotates for faster Salsa20 on supporting CPUs.
4+
35
Implemented a little-known SHA-2 Maj() optimization proposed by Wei Dai.
46

57
Minor code cleanups and documentation updates.

src/yescrypt/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ LD = $(CC)
2121
RM = rm -f
2222
OMPFLAGS = -fopenmp
2323
OMPFLAGS_MAYBE = $(OMPFLAGS)
24-
CFLAGS = -Wall -O2 -fomit-frame-pointer $(OMPFLAGS_MAYBE) -DSKIP_MEMZERO
25-
#CFLAGS = -Wall -O2 -march=native -fomit-frame-pointer $(OMPFLAGS_MAYBE) -DSKIP_MEMZERO
24+
#CFLAGS = -Wall -O2 -fomit-frame-pointer $(OMPFLAGS_MAYBE) -DSKIP_MEMZERO
25+
CFLAGS = -Wall -O2 -march=native -fomit-frame-pointer $(OMPFLAGS_MAYBE) -DSKIP_MEMZERO
2626
#CFLAGS = -Wall -O2 -funroll-loops -fomit-frame-pointer $(OMPFLAGS_MAYBE) -DSKIP_MEMZERO
2727
#CFLAGS = -Wall -O2 -march=native -funroll-loops -fomit-frame-pointer $(OMPFLAGS_MAYBE) -DSKIP_MEMZERO
2828
# -lrt is for userom's use of clock_gettime()

src/yescrypt/README

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ implementation is able to compute native yescrypt hashes as well as
66
classic scrypt.
77

88
As of this writing, yescrypt is the default password hashing scheme on
9-
recent ALT Linux, Debian 11, Fedora 35+, Kali Linux 2021.1+, and Ubuntu
10-
22.04+. It is also supported in Fedora 29+, RHEL 9+, and Ubuntu 20.04+,
11-
and is recommended for new passwords in Fedora CoreOS.
9+
recent ALT Linux, Arch Linux, Debian 11+, Fedora 35+, Kali Linux 2021.1+,
10+
and Ubuntu 22.04+. It is also supported in Fedora 29+, RHEL 9+, and
11+
Ubuntu 20.04+, and is recommended for new passwords in Fedora CoreOS.
1212

1313

1414
Why yescrypt?

src/yescrypt/yescrypt-opt.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*-
22
* Copyright 2009 Colin Percival
3-
* Copyright 2012-2018 Alexander Peslyak
3+
* Copyright 2012-2025 Alexander Peslyak
44
* All rights reserved.
55
*
66
* Redistribution and use in source and binary forms, with or without
@@ -37,6 +37,7 @@
3737
* sub-block), and much less so for YESCRYPT_RW (which uses 2 rounds of Salsa20
3838
* per block except during pwxform S-box initialization).
3939
*/
40+
#ifdef __GNUC__
4041
#if 0 /* JtR hack */
4142
#ifdef __XOP__
4243
#warning "Note: XOP is enabled. That's great."
@@ -52,6 +53,7 @@
5253
#warning "Note: building generic code for non-x86. That's OK."
5354
#endif
5455
#endif
56+
#endif
5557

5658
/*
5759
* The SSE4 code version has fewer instructions than the generic SSE2 version,

src/yescrypt/yescrypt-ref.c

+2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
* yescrypt-opt.c.
3535
*/
3636

37+
#ifdef __GNUC__
3738
#warning "This reference implementation is deliberately mostly not optimized, nor does it make any attempt not to leave sensitive data in memory. Use yescrypt-opt.c instead unless you're testing (against) the reference implementation on purpose."
39+
#endif
3840

3941
#include <errno.h>
4042
#include <stdint.h>

0 commit comments

Comments
 (0)