Current Path : /usr/opt/openssl11/share/doc/openssl/html/man3/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/opt/openssl11/share/doc/openssl/html/man3/RC4_set_key.html |
<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>RC4_set_key</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rev="made" href="mailto:root@hsxx.drive.ne.jp" /> </head> <body style="background-color: white"> <!-- INDEX BEGIN --> <div name="index"> <p><a name="__index__"></a></p> <ul> <li><a href="#name">NAME</a></li> <li><a href="#synopsis">SYNOPSIS</a></li> <li><a href="#description">DESCRIPTION</a></li> <li><a href="#return_values">RETURN VALUES</a></li> <li><a href="#note">NOTE</a></li> <li><a href="#see_also">SEE ALSO</a></li> <li><a href="#copyright">COPYRIGHT</a></li> </ul> <hr name="index" /> </div> <!-- INDEX END --> <p> </p> <hr /> <h1><a name="name">NAME</a></h1> <p>RC4_set_key, RC4 - RC4 encryption</p> <p> </p> <hr /> <h1><a name="synopsis">SYNOPSIS</a></h1> <pre> #include <openssl/rc4.h></pre> <pre> void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data);</pre> <pre> void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata, unsigned char *outdata);</pre> <p> </p> <hr /> <h1><a name="description">DESCRIPTION</a></h1> <p>This library implements the Alleged RC4 cipher, which is described for example in <em>Applied Cryptography</em>. It is believed to be compatible with RC4[TM], a proprietary cipher of RSA Security Inc.</p> <p>RC4 is a stream cipher with variable key length. Typically, 128 bit (16 byte) keys are used for strong encryption, but shorter insecure key sizes have been widely used due to export restrictions.</p> <p>RC4 consists of a key setup phase and the actual encryption or decryption phase.</p> <p>RC4_set_key() sets up the <strong>RC4_KEY</strong> <strong>key</strong> using the <strong>len</strong> bytes long key at <strong>data</strong>.</p> <p>RC4() encrypts or decrypts the <strong>len</strong> bytes of data at <strong>indata</strong> using <strong>key</strong> and places the result at <strong>outdata</strong>. Repeated RC4() calls with the same <strong>key</strong> yield a continuous key stream.</p> <p>Since RC4 is a stream cipher (the input is XORed with a pseudo-random key stream to produce the output), decryption uses the same function calls as encryption.</p> <p> </p> <hr /> <h1><a name="return_values">RETURN VALUES</a></h1> <p>RC4_set_key() and RC4() do not return values.</p> <p> </p> <hr /> <h1><a name="note">NOTE</a></h1> <p>Applications should use the higher level functions <em>EVP_EncryptInit(3)</em> etc. instead of calling these functions directly.</p> <p>It is difficult to securely use stream ciphers. For example, do not perform multiple encryptions using the same key stream.</p> <p> </p> <hr /> <h1><a name="see_also">SEE ALSO</a></h1> <p><em>EVP_EncryptInit(3)</em></p> <p> </p> <hr /> <h1><a name="copyright">COPYRIGHT</a></h1> <p>Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.</p> <p>Licensed under the OpenSSL license (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 <a href="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</a>.</p> </body> </html>