Advertisement
Guest User

skype_rc4.h

a guest
Jul 8th, 2010
478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1.  
  2. /*\
  3. |*|
  4. |*| Skype Library RC4 v1.108 by Sean O'Neil.
  5. |*| All rights reserved.
  6. |*| Not for commercial use.
  7. |*|
  8. |*| We are reverse engineers.
  9. |*| We can prove if you have used this code in your product.
  10. |*| We will find you.
  11. |*| We will prosecute for copyright infringement.
  12. |*| This code is quite unique and is easily identifiable.
  13. |*| Result may match Skype's 100%, but this code is ours.
  14. |*| The computation is significantly different from Skype's.
  15. |*|
  16. |*| For academic research and educational purposes only.
  17. |*| If you require Skype compatibility in your products,
  18. |*| feel free to contact Sean O'Neil on www.enrupt.com
  19. |*|
  20. |*| Last changes: 01.12.2009
  21. |*| Published: 07.07.2010
  22. |*| More will be published at 27C3, December 2010 (http://www.ccc.de/en/calendar)
  23. |*|
  24. \*/
  25.  
  26. #ifndef _skype_rc4_
  27. #define _skype_rc4_
  28.  
  29. #include <stdio.h>
  30. #include <stdlib.h>
  31.  
  32. typedef unsigned char u8;
  33. typedef unsigned long u32;
  34.  
  35. typedef struct _RC4_context
  36. {
  37. u8 i, j, s[256];
  38. } RC4_context;
  39.  
  40. void RC4_crypt (u8 * buffer, u32 bytes, RC4_context * const rc4, const u32 test); // RC4 encrypt/decrypt (test=1 leaves rc4 context unaltered)
  41. void Skype_RC4_Expand_IV (const u32 iv, const void *iv2, RC4_context * const rc4, const u32 flags, const u32 iv2_bytes); // Main RC4 IV expansion function, matching Skype parameters, with optional IV2 for the latest DH-384 based protocol
  42.  
  43. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement