EVP_MDC2(3ossl)

✨ EVP_MDC2 β€” MDC-2 For EVP ✨

okay bestie, this is page EVP_MDC2 from the OpenSSL manual, section 3ossl β€” so like, a library function page. it's short, it's niche, it's giving ✨legacy✨ and we're gonna read it together, no skimming, i promise 🫢


🌸 NAME 🌸

EVP_mdc2 β€” MDC-2 For EVP. that's it. that's the whole name. iconic brevity honestly πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

here's the summoning ritual, copy it exactly, don't freestyle:

#include <openssl/evp.h>

const EVP_MD *EVP_mdc2(void);

πŸ’– DESCRIPTION πŸ’–

so. MDC-2 stands for Modification Detection Code 2, and it also answers to Meyer-Schilling (two names, one queen πŸ‘‘). it's a cryptographic hash function that's built on top of a block cipher β€” like, the hash is the vibe, but a block cipher is the engine underneath, iykyk.

⚠️ big one: this implementation is only available with the legacy provider. not the default one. the legacy one. if you didn't load it, don't come crying to me bestie 😭

EVP_mdc2()

this is the MDC-2DES algorithm β€” that's MDC-2 doing its thing with the DES block cipher underneath. it takes whatever input you throw at it and produces a 128-bit output. one hundred and twenty-eight bits, periodt. πŸ’«


πŸ¦‹ NOTES πŸ¦‹

listen up, devs, this is the part where we talk performance and it's lowkey important:

developers should be aware that calling this function multiple times has negative performance implications β€” like, it's not free, girl. instead, consider using EVP_MD_fetch(3) together with EVP_MD-MDC2(7). that's the move. πŸƒβ€β™€οΈπŸ’¨

for the full tea, go read the "Performance" section in crypto(7). it's all there.


πŸ’… RETURN VALUES πŸ’…

these functions hand you back an EVP_MD structure β€” that's the lil container holding the implementation of the message digest. wanna know what's inside that EVP_MD? check EVP_MD_meth_new(3) for the deets. πŸ“¦βœ¨


🌈 CONFORMING TO 🌈

this one conforms to ISO/IEC 10118-2:2000 Hash-Function 2, with DES as the underlying block cipher. certified, standardized, on the syllabus. πŸ“œ


⭐ SEE ALSO ⭐

go read these next, bestie, they're the friends of this page:


Copyright 2017-2023 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.


and that's the whole page, no cap πŸ§šβ€β™€οΈ this was OpenSSL version 3.5.9, dated 2026-09-29, and it's EVP_MDC2(3ossl) β€” thanks for reading with me, you ate that fr fr πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from