---
name: "libressl-EVP_rc4"
section: "3"
platform: "linux"
package: "libressl"
version: "4.4.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libressl-EVP_rc4"
---

# libressl-EVP\_rc4(3)

EVP RC4 stream cipher

## NAME

**EVP\_rc4**, **EVP\_rc4\_40**, **EVP\_rc4\_hmac\_md5** – EVP RC4 stream cipher

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

**#include \<openssl/evp.h\>**

*const* *EVP\_CIPHER* *\**\

**EVP\_rc4**(*void*);

*const* *EVP\_CIPHER* *\**\

**EVP\_rc4\_40**(*void*);

*const* *EVP\_CIPHER* *\**\

**EVP\_rc4\_hmac\_md5**(*void*);

## DESCRIPTION

These functions provide the RC4 stream cipher in the evp(3) framework. It is a variable key length cipher.

**EVP\_rc4**() uses a default key length of 128 bits.

**EVP\_rc4\_40**() uses a key length of 40 bits instead. This function is deprecated. Use **EVP\_rc4**() and EVP\_CIPHER\_CTX\_set\_key\_length(3) instead.

**EVP\_rc4\_hmac\_md5**() provides authenticated encryption with the RC4 stream cipher with MD5 as HMAC. This function is not intended for usage outside of TLS and requires calling of some undocumented control functions. It does not conform to the EVP AEAD interface.

## RETURN VALUES

These functions return an *EVP\_CIPHER* structure that provides the implementation of the symmetric cipher.

## SEE ALSO

evp(3), EVP\_EncryptInit(3)

## HISTORY

**EVP\_rc4**() first appeared in SSLeay 0.5.1 and **EVP\_rc4\_40**() in OpenSSL 0.9.1. These functions have been available since OpenBSD 2.4.

**EVP\_rc4\_hmac\_md5**() first appeared in OpenSSL 1.0.1 and has been available since OpenBSD 5.3.
