1 // Copyright 2007,2008 Segher Boessenkool <segher@kernel.crashing.org>
2 // Licensed under the terms of the GNU GPL, version 2
3 // http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
9 typedef unsigned char u8
;
10 typedef unsigned short u16
;
11 typedef unsigned int u32
;
12 typedef unsigned long long u64
;
19 void bn_exp(u8
*d
, u8
*a
, u8
*N
, u32 n
, u8
*e
, u32 en
);
22 void sha(u8
*data
, u32 len
, u8
*hash
);
23 void get_key(const char *name
, u8
*key
, u32 len
);
24 void aes_cbc_dec(u8
*key
, u8
*iv
, u8
*in
, u32 len
, u8
*out
);
25 void decrypt_title_key(u8
*title_key_crypted
, u8
*title_id
, u8
*title_key
);
26 int check_cert_chain(u8
*data
, u32 data_len
, u8
*cert
, u32 cert_len
);
29 void do_yaz0(u8
*in
, u32 in_size
, u8
*out
, u32 out_size
);
32 void fatal(const char *s
);
35 void print_bytes(u8
*x
, u32 n
);
36 void hexdump(u8
*x
, u32 n
);