1
0
Fork
You've already forked librecrypt
0
Offline-hardenable password hashing
  • C 84%
  • Roff 13.6%
  • Makefile 2.4%
Find a file
2026年07月01日 21:37:09 +02:00
argon2 Add support for the reference implementation of Argon2 2026年07月01日 21:37:09 +02:00
libtest Add support for the reference implementation of Argon2 2026年07月01日 21:37:09 +02:00
mk First commit 2026年04月26日 22:36:47 +02:00
.gitignore Misc 2026年05月15日 20:53:25 +02:00
algorithms.h Misc 2026年05月08日 22:29:35 +02:00
common.h Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
config-coverage-gcc.mk Work on test code 2026年05月12日 21:22:54 +02:00
config-fuzz-clang.mk m 2026年05月16日 11:59:07 +02:00
config.mk Fix some minor issues 2026年05月15日 01:22:19 +02:00
DEPENDENCIES Add support for the reference implementation of Argon2 2026年07月01日 21:37:09 +02:00
librecrypt.7 Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt.h Add more tests and fix a bug and and typo 2026年05月21日 19:53:27 +02:00
librecrypt_add_algorithm.3 Add (so far untested and undocument) support for pepper 2026年05月20日 23:04:11 +02:00
librecrypt_add_algorithm.c Add support for the reference implementation of Argon2 2026年07月01日 21:37:09 +02:00
librecrypt_algorithms_.c Prepare for supporting custom algorithms 2026年05月20日 20:33:29 +02:00
librecrypt_chain_length.3 First commit 2026年04月26日 22:36:47 +02:00
librecrypt_chain_length.c Fix fuzzing code 2026年05月16日 10:47:00 +02:00
librecrypt_common_rfc4848s4_decoding_lut_.c Misc 2026年05月08日 22:29:35 +02:00
librecrypt_common_rfc4848s4_encoding_lut_.c Misc 2026年05月08日 22:29:35 +02:00
librecrypt_create_context.3 Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt_create_context.c Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt_crypt.3 Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt_crypt.c Add support for the reference implementation of Argon2 2026年07月01日 21:37:09 +02:00
librecrypt_decode.3 First commit 2026年04月26日 22:36:47 +02:00
librecrypt_decode.c Add WITH_LIBAR2SIMPLIFIED=false + work on fuzzing code 2026年05月16日 02:11:29 +02:00
librecrypt_decompose_chain.3 First commit 2026年04月26日 22:36:47 +02:00
librecrypt_decompose_chain.c Misc 2026年05月15日 20:53:25 +02:00
librecrypt_decompose_chain1.3 First commit 2026年04月26日 22:36:47 +02:00
librecrypt_decompose_chain1.c Misc 2026年05月15日 20:53:25 +02:00
librecrypt_encode.3 Misc 2026年05月15日 20:53:25 +02:00
librecrypt_encode.c Add WITH_LIBAR2SIMPLIFIED=false + work on fuzzing code 2026年05月16日 02:11:29 +02:00
librecrypt_equal.3 Add librecrypt_verify 2026年05月19日 20:09:27 +02:00
librecrypt_equal.c Misc 2026年05月08日 22:29:35 +02:00
librecrypt_equal_binary.3 Add librecrypt_verify 2026年05月19日 20:09:27 +02:00
librecrypt_equal_binary.c Misc 2026年05月08日 22:29:35 +02:00
librecrypt_fill_with_random_.c Fix minor errors in the test and check that we are not writing out of bounds 2026年05月14日 22:20:02 +02:00
librecrypt_find_first_algorithm_.c Add support for the reference implementation of Argon2 2026年07月01日 21:37:09 +02:00
librecrypt_free_context.3 Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt_free_context.c Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt_get_encoding.3 Add (so far untested and undocument) support for pepper 2026年05月20日 23:04:11 +02:00
librecrypt_get_encoding.c Add support for the reference implementation of Argon2 2026年07月01日 21:37:09 +02:00
librecrypt_get_pepper_.c Add support for the reference implementation of Argon2 2026年07月01日 21:37:09 +02:00
librecrypt_get_user_data.3 Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt_get_user_data.c Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt_hash.3 Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt_hash.c Add support for the reference implementation of Argon2 2026年07月01日 21:37:09 +02:00
librecrypt_hash_.c Add support for the reference implementation of Argon2 2026年07月01日 21:37:09 +02:00
librecrypt_hash_algorithm_end.3 Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt_hash_algorithm_end.c Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt_hash_binary.3 Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt_hash_binary.c Add support for the reference implementation of Argon2 2026年07月01日 21:37:09 +02:00
librecrypt_is_enabled.3 Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt_is_enabled.c Add support for the reference implementation of Argon2 2026年07月01日 21:37:09 +02:00
librecrypt_make_settings.3 Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt_make_settings.c Add support for the reference implementation of Argon2 2026年07月01日 21:37:09 +02:00
librecrypt_next_algorithm.3 First commit 2026年04月26日 22:36:47 +02:00
librecrypt_next_algorithm.c Fix fuzzing code 2026年05月16日 10:47:00 +02:00
librecrypt_realise_salts.3 Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt_realise_salts.c Add support for the reference implementation of Argon2 2026年07月01日 21:37:09 +02:00
librecrypt_rng_.c Fix minor errors in the test and check that we are not writing out of bounds 2026年05月14日 22:20:02 +02:00
librecrypt_scan_settings.3 Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt_scan_settings.c Add support for the reference implementation of Argon2 2026年07月01日 21:37:09 +02:00
librecrypt_set_custom_algorithms.3 Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt_set_custom_algorithms.c Add more tests and fix a bug and and typo 2026年05月21日 19:53:27 +02:00
librecrypt_set_pepper.3 Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt_set_pepper.c Add support for the reference implementation of Argon2 2026年07月01日 21:37:09 +02:00
librecrypt_set_user_data.3 Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt_set_user_data.c Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt_settings_prefix.3 Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
librecrypt_settings_prefix.c Add support for the reference implementation of Argon2 2026年07月01日 21:37:09 +02:00
librecrypt_test_supported.3 Add (so far untested and undocument) support for pepper 2026年05月20日 23:04:11 +02:00
librecrypt_test_supported.c Add support for the reference implementation of Argon2 2026年07月01日 21:37:09 +02:00
librecrypt_verify.3 Add (so far untested and undocument) support for pepper 2026年05月20日 23:04:11 +02:00
librecrypt_verify.c Add support for the reference implementation of Argon2 2026年07月01日 21:37:09 +02:00
librecrypt_wipe.3 First commit 2026年04月26日 22:36:47 +02:00
librecrypt_wipe.c Misc 2026年05月08日 22:29:35 +02:00
librecrypt_wipe_str.3 First commit 2026年04月26日 22:36:47 +02:00
librecrypt_wipe_str.c Misc 2026年05月08日 22:29:35 +02:00
LICENSE First commit 2026年04月26日 22:36:47 +02:00
Makefile Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
README Add support for custom hash functions 2026年05月21日 17:12:20 +02:00
TODO Add support for custom hash functions 2026年05月21日 17:12:20 +02:00

NAME
	librecrypt - Offline-hardenable password hashing
SYNOPSIS
	#include <librecrypt.h>
	Link with -lrecrypt. Static linking may require additional
	flags depending on enabled hash algorithms.
DESCRIPTION
	The librecrypt library provides a unified interface for
	several password hash functions and the ability to chain
	password hash functions so that a weaking hashed password
	can be hardend, without knowing the plain-text password,
	by hashing the hash with a stronger function.
	librecrypt extends crypt(3)'s password hash string syntax
	by introducing the '>' character to specifying chaining.
	The left-most hash function is used on the plain-text
	password, and the next to the right, is used on the binary
	hash result, and so on, and only the final hash is stored
	in the string: as part of the last '>'-delimited section.
	It also supports specifying a password hashing configuration
	without specifying actual salt values, but instead how many
	bytes of salt to generate. This done using asterisk-encoding:
	an ASCII asterisk character ('*') followed by the number of
	bytes encoded as a non-negative decimal number in ASCII.
	The librecrypt library implements the following functions:
 Password hashing functions:
	librecrypt_crypt(3)
		Compute password hash encoded in ASCII with settings
		prefix.
	librecrypt_hash(3)
		Compute password hash encoded in ASCII without
		settings prefix.
	librecrypt_hash_binary(3)
		Compute password hash in raw binary form.
	librecrypt_verify(3)
		Validate password against known password hash.
	librecrypt_add_algorithm(3)
		Append an algorithm chain to a password hash string.
 Password hashing configuration functions:
	librecrypt_test_supported(3)
		Check whether an algorithm chain is supported.
	librecrypt_make_settings(3)
		Generate a password hash settings string.
	librecrypt_realise_salts(3)
		Realise asterisk-encoded random salts in a settings
		string.
 Application helper functions:
	librecrypt_equal(3)
		Compare strings in constant time.
	librecrypt_equal_binary(3)
		Compare memory segments in constant time.
	librecrypt_wipe(3)
		Securely erase a memory buffer.
	librecrypt_wipe_str(3)
		Securely erase a string.
	librecrypt_scan_settings(3) (ADVANCED)
		Parse and validate a password hash string.
 Password hash string decomposition functions (ADVANCED):
	librecrypt_settings_prefix(3)
		Get length of settings prefix in a password hash
		string.
	librecrypt_chain_length(3)
		Get number of algorithms in a chained password hash
		string.
	librecrypt_decompose_chain(3)
		Split a chained password hash string into algorithm
		components.
	librecrypt_decompose_chain1(3)
		Replace algorithm link delimiters with null bytes.
	librecrypt_next_algorithm(3)
		Iterate over algorithms in a chained password hash
		string.
 Binary value encoding functions (ADVANCED):
	librecrypt_encode(3)
		Encode binary salt or hash result into ASCII.
	librecrypt_decode(3)
		Decode ASCII encoding of a salt or hash result into
		binary.
	librecrypt_get_encoding(3)
		Get encoding alphabet for the last algorithm in a
		chain.
 Library introspection (ADVANCED):
	librecrypt_is_enabled(3)
		Check whenther the library is compiled with support
		for a specific hash algorithm.
	librecrypt_hash_algorithm_end(3)
		Number of hash algorithms the linked library knows
		about.
 Library tweaking functions (ADVANCED):
	librecrypt_create_context(3)
		Create a library configuration object.
	librecrypt_free_context(3)
		Deallocate a library configuration object.
	librecrypt_set_pepper(3)
		Set the pepper to use for a hash algorithm.
	librecrypt_set_custom_algorithms(3)
		Set application-provided hash algorithms.
	librecrypt_set_user_data(3)
		Set application-defined data.
	librecrypt_get_user_data(3)
		Retrieve application-defined data.
NOTES
	Using librecrypt_add_algorithm(3) to hash existing password
	hashes should be used as a transitional mitigation strategy
	when replaing an old password hash function. Once the password
	is available in clear text, it should be hashed anew using
	only the new password hash function: this will both increase
	security and reducing login it, allowing for stronger hash
	function configurations. This is especially important if the
	password is actually a key and longer than the old hash. It
	is also a good idea to force password reset, and lock any
	account that hasn't reset its password, because it is
	possibly that the old password hashes has been leaked and it
	will force a fresh hashing even one counts that seldom log in.
SEE ALSO
	crypt(3), crypt(5)