2
0

RC4_set_key.pod 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. =pod
  2. =head1 NAME
  3. RC4_set_key, RC4 - RC4 encryption
  4. =head1 SYNOPSIS
  5. #include <openssl/rc4.h>
  6. void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data);
  7. void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata,
  8. unsigned char *outdata);
  9. =head1 DESCRIPTION
  10. This library implements the Alleged RC4 cipher, which is described for
  11. example in I<Applied Cryptography>. It is believed to be compatible
  12. with RC4[TM], a proprietary cipher of RSA Security Inc.
  13. RC4 is a stream cipher with variable key length. Typically, 128 bit
  14. (16 byte) keys are used for strong encryption, but shorter insecure
  15. key sizes have been widely used due to export restrictions.
  16. RC4 consists of a key setup phase and the actual encryption or
  17. decryption phase.
  18. RC4_set_key() sets up the B<RC4_KEY> B<key> using the B<len> bytes long
  19. key at B<data>.
  20. RC4() encrypts or decrypts the B<len> bytes of data at B<indata> using
  21. B<key> and places the result at B<outdata>. Repeated RC4() calls with
  22. the same B<key> yield a continuous key stream.
  23. Since RC4 is a stream cipher (the input is XORed with a pseudo-random
  24. key stream to produce the output), decryption uses the same function
  25. calls as encryption.
  26. =head1 RETURN VALUES
  27. RC4_set_key() and RC4() do not return values.
  28. =head1 NOTE
  29. Applications should use the higher level functions
  30. L<EVP_EncryptInit(3)> etc. instead of calling these
  31. functions directly.
  32. It is difficult to securely use stream ciphers. For example, do not perform
  33. multiple encryptions using the same key stream.
  34. =head1 SEE ALSO
  35. L<EVP_EncryptInit(3)>
  36. =head1 COPYRIGHT
  37. Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
  38. Licensed under the OpenSSL license (the "License"). You may not use
  39. this file except in compliance with the License. You can obtain a copy
  40. in the file LICENSE in the source distribution or at
  41. L<https://www.openssl.org/source/license.html>.
  42. =cut