1 /* 2 * Common code for the SSH format. 3 */ 4 5 #include <string.h> 6 7 #include "formats.h" 8 9 #define N 8192 10 #define FORMAT_TAG "$sshng$" 11 #define FORMAT_TAG_LEN (sizeof(FORMAT_TAG)-1) 12 13 struct custom_salt { 14 unsigned char salt[16]; 15 unsigned char ct[N]; 16 int cipher; 17 int ctl; 18 int sl; 19 int rounds; 20 int ciphertext_begin_offset; 21 }; 22 23 extern int ssh_valid(char *ciphertext, struct fmt_main *self); 24 extern void *ssh_get_salt(char *ciphertext); 25 extern unsigned int ssh_iteration_count(void *salt); 26 extern unsigned int ssh_kdf(void *salt); 27