slitheen.h 939 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _SLITHEEN_H_
  2. #define _SLITHEEN_H_
  3. #include <openssl/ssl.h>
  4. #include "ptwist.h"
  5. # define l2n(l,c) (*((c)++)=(unsigned char)(((l)>>24)&0xff), \
  6. *((c)++)=(unsigned char)(((l)>>16)&0xff), \
  7. *((c)++)=(unsigned char)(((l)>> 8)&0xff), \
  8. *((c)++)=(unsigned char)(((l) )&0xff))
  9. void slitheen_init();
  10. int slitheen_tag_hello(SSL *s);
  11. int slitheen_seed_from_tag(SSL *s, DH *dh);
  12. int slitheen_ec_seed_from_tag(SSL *s, EC_KEY *eckey);
  13. int slitheen_finished_mac(SSL *ssl, unsigned char *finished_mac);
  14. typedef struct tag_pair_st {
  15. byte key[16];
  16. u_char client_random[SSL3_RANDOM_SIZE];
  17. struct tag_pair_st *next;
  18. } tag_pair;
  19. #define SLITHEEN_KEYGEN_CONST "SLITHEEN_KEYGEN"
  20. #define SLITHEEN_KEYGEN_CONST_SIZE 15
  21. #define SLITHEEN_FINISHED_INPUT_CONST "SLITHEEN_FINISH"
  22. #define SLITHEEN_FINISHED_INPUT_CONST_SIZE 15
  23. #endif /* _SLITHEEN_H_ */