diff options
Diffstat (limited to 'src/lib/libcrypto/man/RC4.3')
| -rw-r--r-- | src/lib/libcrypto/man/RC4.3 | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/RC4.3 b/src/lib/libcrypto/man/RC4.3 new file mode 100644 index 0000000000..2c631c36be --- /dev/null +++ b/src/lib/libcrypto/man/RC4.3 | |||
| @@ -0,0 +1,79 @@ | |||
| 1 | .Dd $Mdocdate: November 5 2016 $ | ||
| 2 | .Dt RC4 3 | ||
| 3 | .Os | ||
| 4 | .Sh NAME | ||
| 5 | .Nm RC4_set_key , | ||
| 6 | .Nm RC4 | ||
| 7 | .Nd RC4 encryption | ||
| 8 | .Sh SYNOPSIS | ||
| 9 | .In openssl/rc4.h | ||
| 10 | .Ft void | ||
| 11 | .Fo RC4_set_key | ||
| 12 | .Fa "RC4_KEY *key" | ||
| 13 | .Fa "int len" | ||
| 14 | .Fa "const unsigned char *data" | ||
| 15 | .Fc | ||
| 16 | .Ft void | ||
| 17 | .Fo RC4 | ||
| 18 | .Fa "RC4_KEY *key" | ||
| 19 | .Fa "unsigned long len" | ||
| 20 | .Fa "const unsigned char *indata" | ||
| 21 | .Fa "unsigned char *outdata" | ||
| 22 | .Fc | ||
| 23 | .Sh DESCRIPTION | ||
| 24 | This library implements the alleged RC4 cipher, which is described for | ||
| 25 | example in | ||
| 26 | .%B Applied Cryptography . | ||
| 27 | It is believed to be compatible with RC4[TM], a proprietary cipher of | ||
| 28 | RSA Security Inc. | ||
| 29 | .Pp | ||
| 30 | RC4 is a stream cipher with variable key length. | ||
| 31 | Typically, 128 bit (16 byte) keys are used for strong encryption, but | ||
| 32 | shorter insecure key sizes have been widely used due to export | ||
| 33 | restrictions. | ||
| 34 | .Pp | ||
| 35 | RC4 consists of a key setup phase and the actual encryption or | ||
| 36 | decryption phase. | ||
| 37 | .Pp | ||
| 38 | .Fn RC4_set_key | ||
| 39 | sets up the | ||
| 40 | .Vt RC4_KEY | ||
| 41 | .Fa key | ||
| 42 | using the | ||
| 43 | .Fa len | ||
| 44 | bytes long key at | ||
| 45 | .Fa data . | ||
| 46 | .Pp | ||
| 47 | .Fn RC4 | ||
| 48 | encrypts or decrypts the | ||
| 49 | .Fa len | ||
| 50 | bytes of data at | ||
| 51 | .Fa indata | ||
| 52 | using | ||
| 53 | .Fa key | ||
| 54 | and places the result at | ||
| 55 | .Fa outdata . | ||
| 56 | Repeated | ||
| 57 | .Fn RC4 | ||
| 58 | calls with the same | ||
| 59 | .Fa key | ||
| 60 | yield a continuous key stream. | ||
| 61 | .Pp | ||
| 62 | Since RC4 is a stream cipher (the input is XOR'ed with a pseudo-random | ||
| 63 | key stream to produce the output), decryption uses the same function | ||
| 64 | calls as encryption. | ||
| 65 | .Sh RETURN VALUES | ||
| 66 | .Fn RC4_set_key | ||
| 67 | and | ||
| 68 | .Fn RC4 | ||
| 69 | do not return values. | ||
| 70 | .Sh SEE ALSO | ||
| 71 | .Xr blowfish 3 , | ||
| 72 | .Xr EVP_EncryptInit 3 | ||
| 73 | .Sh HISTORY | ||
| 74 | .Fn RC4_set_key | ||
| 75 | and | ||
| 76 | .Fn RC4 | ||
| 77 | are available in all versions of SSLeay and OpenSSL. | ||
| 78 | .Sh BUGS | ||
| 79 | This cipher is broken and should no longer be used. | ||
