PKCS5_pbe2_set_scrypt

Build a PBES2 AlgorithmIdentifier that derives the key with scrypt.

Synopsis

Declared in <openssl/x509.h>

X509_ALGOR*
PKCS5_pbe2_set_scrypt(
    EVP_CIPHER const* cipher,
    unsigned char const* salt,
    int saltlen,
    unsigned char* aiv,
    uint64_t N,
    uint64_t r,
    uint64_t p);

Return Value

New X509_ALGOR describing the PBES2/scrypt parameters, or NULL on error.

Parameters

NameDescription
cipherContent-encryption cipher wrapped by PBES2.
saltSalt octets for scrypt, or NULL to generate a default-length salt.
saltlenLength of salt in bytes; ignored when salt is NULL.
aivOptional IV octets for cipher, or NULL to generate a suitable IV.
Nscrypt CPU/memory cost parameter.
rscrypt block size parameter.
pscrypt parallelization parameter.