Go to main content

man pages section 7: Standards, Environments, Macros, Character Sets, and Miscellany

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

crypt_sha256(7)

Name

crypt_sha256 - password hashing module using SHA–256 message hash algorithm

Synopsis

/usr/lib/security/$ISA/crypt_sha256.so

Description

The crypt_sha256 module is a one-way password hashing module for use with crypt(3C) that uses the SHA–256 message hash algorithm. The algorithm identifier for crypt.conf(5) and policy.conf(5) is 5.

This module is designed to make it difficult to crack passwords using brute force attacks based on high speed SHA–256 implementations that use code inlining, unrolled loops, and table lookup.

The maximum password length for crypt_sha256 is 255 characters.

The following options can be passed to the module by means of crypt.conf(5):

rounds=positive_number

Specifies the number of rounds of SHA-256 to use in generation of the salt; the default number of rounds is 5000. Negative values have no effect and are ignored. The minimum number of rounds cannot be below 1000.

The number of additional rounds is stored in the salt string returned by crypt_gensalt(3C). For example:

$5,rounds=6000$nlxmTTpz$

When crypt_gensalt(3C) is being used to generate a new salt, if the number of additional rounds configured in crypt.conf(5) is greater than that in the old salt, the value from crypt.conf(5) is used instead. This allows for migration to stronger (but more time-consuming) salts on password change.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/library
Interface Stability
Committed

See Also

passwd(1), crypt(3C), crypt_genhash_impl(3C), crypt_gensalt(3C), crypt_gensalt_impl(3C), getpassphrase(3C), crypt.conf(5), passwd(5), policy.conf(5), attributes(7)

History

The crypt_sha256 module was added to Solaris in Solaris 10 8/08 (Update 6). It became the CRYPT_DEFAULT setting in the default policy.conf file in Oracle Solaris 11.0.0.