d3des.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * This is D3DES (V5.09) by Richard Outerbridge with the double and
  3. * triple-length support removed for use in VNC.
  4. *
  5. * These changes are:
  6. * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
  7. *
  8. * This software is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. */
  12. /* d3des.h -
  13. *
  14. * Headers and defines for d3des.c
  15. * Graven Imagery, 1992.
  16. *
  17. * Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge
  18. * (GEnie : OUTER; CIS : [71755,204])
  19. */
  20. #define EN0 0 /* MODE == encrypt */
  21. #define DE1 1 /* MODE == decrypt */
  22. void deskey(unsigned char *, int);
  23. /* hexkey[8] MODE
  24. * Sets the internal key register according to the hexadecimal
  25. * key contained in the 8 bytes of hexkey, according to the DES,
  26. * for encryption or decryption according to MODE.
  27. */
  28. void usekey(unsigned long *);
  29. /* cookedkey[32]
  30. * Loads the internal key register with the data in cookedkey.
  31. */
  32. void cpkey(unsigned long *);
  33. /* cookedkey[32]
  34. * Copies the contents of the internal key register into the storage
  35. * located at &cookedkey[0].
  36. */
  37. void des(unsigned char *, unsigned char *);
  38. /* from[8] to[8]
  39. * Encrypts/Decrypts (according to the key currently loaded in the
  40. * internal key register) one block of eight bytes at address 'from'
  41. * into the block at address 'to'. They can be the same.
  42. */
  43. /* d3des.h V5.09 rwo 9208.04 15:06 Graven Imagery
  44. ********************************************************************/