Comments (9)
Hi @Smattr, we're moving in this direction, such as commits like 70ada72 (which might simplify your downstream patch as well). Still a few details to work out, though.
from scrypt.
Two reasons:
-
Password hashing is exactly the same thing as key derivation, so the name isn't really wrong. ;-)
-
There's a whole bunch of libscrypt libraries and scrypt() functions out there, so we figured it would be helpful to avoid using the same name.
from scrypt.
Yeah, maybe. I was avoiding this because (a) there isn't really any cross-platform way to do "libraries", and (b) the scrypt code is small enough that I figured people could just import it into their codebase.
from scrypt.
Doesn't autotools take care of (a)?
from scrypt.
Theoretically, yes. I've heard complaints about it not working very well but I don't know if those were due to autotools being inherently broken or merely difficult to use.
from scrypt.
From offline communication: libscrypt should not include scryptenc_*
; it should only include crypto_scrypt()
.
from scrypt.
This would be great! I had assumed the omission of a librarised scrypt was deliberate and patched the build system to add this (inline below for posterity), but if I could stop doing this and lean on an official upstream libscrypt I (and presumably others) certainly would.
Scrypt's build system does not expose a reusable version of crypto_scrypt(). To
work around this, the following patch adds a library that achieves this.
diff --git Makefile.am Makefile.am
index f037aa6..616c01d 100644
--- Makefile.am
+++ Makefile.am
@@ -69,6 +69,22 @@ noinst_LIBRARIES+= libscrypt_sse2.a
libscrypt_sse2_a_SOURCES= lib/crypto/crypto_scrypt_smix_sse2.c
libscrypt_sse2_a_CFLAGS=`. ./cpusupport-config.h; echo $${CFLAGS_X86_SSE2}`
+noinst_LIBRARIES+= libcrypto_scrypt.a
+libcrypto_scrypt_a_SOURCES= \
+ libcperciva/alg/sha256.c \
+ libcperciva/alg/sha256.h \
+ libcperciva/cpusupport/cpusupport_x86_sse2.c \
+ libcperciva/util/insecure_memzero.c \
+ libcperciva/util/insecure_memzero.h \
+ libcperciva/util/warnp.c \
+ libcperciva/util/warnp.h \
+ lib/crypto/crypto_scrypt.c \
+ lib/crypto/crypto_scrypt.h \
+ lib/crypto/crypto_scrypt_smix.c \
+ lib/crypto/crypto_scrypt_smix.h \
+ lib/crypto/crypto_scrypt_smix_sse2.c \
+ lib/crypto/crypto_scrypt_smix_sse2.h
+
EXTRA_DIST = \
COPYRIGHT \
FORMAT \
from scrypt.
libscrypt-kdf
is now in scrypt master.
from scrypt.
Nice work. Naive question but why is it suffixed with "kdf"? Surely I can use (misuse?) scrypt for purposes other than as a key derivation function?
from scrypt.
Related Issues (20)
- FeatureRequest: Enable scrypt to get password from file or environment variable HOT 10
- configure failure on linux HOT 3
- Feature request: Specify N, r, p in the command line HOT 3
- How to specify passphrase with an automated script HOT 1
- Password from stdin alternatives. HOT 5
- Using scrypt in a c++ project HOT 2
- Undefined reference to crypto_scrypt HOT 2
- Scrypt producing some weird hash. HOT 11
- memory detection fails on OpenBSD HOT 2
- POSIX issue 7 (2017) now required HOT 1
- Misleading documentation on the scrypt website regarding libscrypt-kdf HOT 4
- Deprecated <sys/sysctl.h> on Linux; harmless
- [question] Is the scrypt algorithm quantum-resistant? HOT 1
- Make encrypted file indistinguishable from random data? HOT 4
- Verbose output is suppressed by warning HOT 5
- FTBFS on systems without getconf HOT 9
- [question] What is the impact of leaking the memory contents to swap? HOT 4
- Potential UB in cpuperf: passing NULL to memcpy() HOT 4
- Promote `scrypt_kdf` to a true symbol HOT 2
- Make libscrypt-kdf available to C++ applications HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scrypt.