On 2019年04月10日 14:37, Yu, Mingli wrote:
On 2019年04月10日 14:25, Niels Möller wrote:
"Yu, Mingli" mingli.yu@windriver.com writes:
It's 3.4.1 and I did use it as below: # echo -n passwd| nettle-pbkdf2 -i 1 -l 16 salt
That's the latest version.
Can you get a backtrace? (start "gdb nettle-pbkdf2", at the gdb prompt
I don't know how to use nettle-pbkdf2 actually and it didn't return when I run as below: # nettle-pbkdf2 -i 1 -l 16 salt
Sorry, it wants to read the input password on stdin. Try echo foo > /tmp/foo, and then start it in gdb as
run nettle-pbkdf2 -i 1 -l 16 salt < /tmp/foo
# echo -n passwd|nettle-pbkdf2 -i 1 -l 16 salt [77641.250170] nettle-pbkdf2[806]: segfault at ffffffffcb811260 ip 00007f4c115fd998 sp 00007ffc5a7f38d0 error 5 in libnettle.so.6.5[7f4c115eb] [77641.250574] Code: e8 6d db fe ff 44 01 6d 68 48 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f c3 66 2e 0f 1f 84 00 00 00 00 00 49 89 dc e9 68 ff f Segmentation fault
# echo -n passwd > /tmp/passwd # gdb nettle-pbkdf2 GNU gdb (GDB) 8.2.1 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-wrs-linux". Type "show configuration" for configuration details. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.
For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from nettle-pbkdf2...(no debugging symbols found)...done. (gdb) run nettle-pbkdf2 -i 1 -l 16 salt < /tmp/passwd Starting program: /usr/bin/nettle-pbkdf2 nettle-pbkdf2 -i 1 -l 16 salt < /tmp/passwd Usage: nettle-pbkdf2 [OPTIONS] SALT Options: --help Show this help. -V, --version Show version information. -i, --iterations=COUNT Desired iteration count (default 10000). -l, --length=LENGTH Desired output length (octets, default 16) --raw Raw binary output. --hex-salt Use hex encoding for the salt. [Inferior 1 (process 793) exited with code 01] (gdb) quit
Please ignore this, @_@, I made a typo here.
# cat /tmp/passwd passwd
What kind of machine, operating system, and compiler are you using? Since the testsuite passes on the test systems (including x86_64 and
I work on x86_64 and use gcc for compiler.
cross-compile setup for arm and mips), I imagine it's something somewhat unusual.
Regards, /Niels
nettle-bugs mailing list nettle-bugs@lists.lysator.liu.se http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs