NAME

Crypt::Passphrase::Scrypt - A scrypt encoder for Crypt::Passphrase

VERSION

version 0.005

DESCRIPTION

This class implements an scrypt encoder for Crypt::Passphrase. If one wants a memory-hard password scheme Argon2 is recommended instead.

Configuration.

It takes the following arguments

  • format

    This module supports formats: passlib ($scrypt$) and libcrypt ($7), with the former being the default.

  • cost

    This is the cost factor that is used to hash passwords, it scales exponentially. It currently defaults to 16, but this may change in any future version. Note that unlike many hash algorithms, increasing the rounds value will increase both the time and memory required to hash a password.

  • block_size

    This defaults to 8.

  • parallelism

    The number of threads used for the hash. This defaults to 1, but this number may change in any future version.

  • output_size

    The size of a hashed value. This defaults to 32 bytes.

  • salt_size

    The size of the salt. This defaults to 16 bytes, which should be more than enough for any use-case.

Note that some defaults are likely to change at some point in the future, as computers get progressively more powerful and cryptoanalysis gets more advanced.

Supported crypt types

This class supports the following crypt types: scrypt and 7, matching the passlib and libcrypt formats.

SYNOPSIS my $passphrase = Crypt::Passphrase->new( encoder => { module => 'Scrypt', format => 'passlib', cost => 16, parallelism => 1, output_size => 32, }, );

AUTHOR

Leon Timmermans <leont@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2021 by Leon Timmermans.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.