EVP_MDC2(3SSL)

✨ NAME ✨

EVP_mdc2 β€” MDC-2, but for EVP πŸ’– (yes bestie, we're doing hash functions today)


🌸 SYNOPSIS 🌸

#include <openssl/evp.h>

const EVP_MD *EVP_mdc2(void);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so. MDC-2 β€” that's Modification Detection Code 2, also known as Meyer-Schilling β€” is a cryptographic hash function that's built on top of a block cipher. iconic behaviour honestly. πŸŽ€

⚠️ real talk though: this implementation is only available with the legacy provider. Like, it does not come out to play unless you've got that provider loaded. periodt.

πŸ’… EVP_mdc2()

This one is the MDC-2DES algorithm β€” that's MDC-2 used together with the DES block cipher as the underlying cipher. ✨ The way it works is it takes a given input and produces a 128-bit output from it. slay.


πŸ‘‘ NOTES πŸ‘‘

bestie, listen. there's a performance thing here and I need you to know about it. πŸ‘€

Calling this function a bunch of times has negative performance implications β€” like, lowkey it's giving expensive. So developers should consider using EVP_MD_fetch(3) with EVP_MD-MDC2(7) instead. 🫢

For the full tea, go read "Performance" in crypto(7). iykyk.


πŸ’œ RETURN VALUES πŸ’œ

These functions hand you back an EVP_MD structure, and that structure contains the implementation of the message digest. so that's your answer, that's the vibe. 🌈


⭐ CONFORMING TO ⭐

ISO/IEC 10118-2:2000 Hash-Function 2, with DES as the underlying block cipher. no cap, it's standard-compliant. πŸ’―


🌸 SEE ALSO 🌸


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>.


okay that's the whole page, you ate that 🫢 this was written against version 4.0.3, dated 2026-09-29, and it lives in the OpenSSL manual as EVP_MDC2(3SSL). go forth and hash responsibly bestie πŸ’…βœ¨

πŸ“¦ where this page comes from