[#CRYPTO_nistcts128_decrypt]
= CRYPTO&lowbar;nistcts128&lowbar;decrypt
:mrdocs:

Decrypt NIST CS2&sol;CS3&hyphen;style ciphertext stealing using a CBC decrypt function&period;

== Synopsis

Declared in `&lt;openssl&sol;modes&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
size&lowbar;t
CRYPTO&lowbar;nistcts128&lowbar;decrypt(
    unsigned char const* in,
    unsigned char* out,
    size&lowbar;t len,
    void const* key,
    unsigned char ivec[],
    xref:cbc128_f.adoc[cbc128&lowbar;f] cbc);
----

== Return Value

Number of plaintext bytes written, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *in*
| Input ciphertext of length `len` (must be at least 16)&period;
| *out*
| Output plaintext buffer of length `len&period;`
| *len*
| Number of ciphertext bytes&period;
| *key*
| Cipher&hyphen;specific expanded key for `cbc&period;`
| *ivec*
| 16&hyphen;byte IV updated like CBC&period;
| *cbc*
| CBC&hyphen;mode decrypt function for the underlying cipher&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
