Compute a Password‐Based MAC (PBM) for CRMF POPO using the given parameters, message, and secret.

Synopsis

Declared in <openssl/crmf.h>

int
OSSL_CRMF_pbm_new(
    OSSL_LIB_CTX* libctx,
    char const* propq,
    OSSL_CRMF_PBMPARAMETER const* pbmp,
    unsigned char const* msg,
    size_t msglen,
    unsigned char const* sec,
    size_t seclen,
    unsigned char** mac,
    size_t* maclen);

Return Value

1 on success, or 0 on error.

Parameters

Name

Description

libctx

Library context for algorithm fetching, or NULL for the default.

propq

Property query for the MAC algorithm, or NULL.

pbmp

PBMParameter describing salt, OWF, iteration count, and MAC.

msg

Message octets to authenticate.

msglen

Length of msg in bytes.

sec

Shared secret / password octets.

seclen

Length of sec in bytes.

mac

On success, receives a newly allocated MAC buffer (caller frees with OPENSSL_free()).

maclen

Optional; on success receives the MAC length in bytes when non‐NULL.

Created with MrDocs