Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jean-Baptiste Kempf
libaacs
Commits
0157b519
Commit
0157b519
authored
Feb 15, 2016
by
npzacs
Browse files
Cosmetics
parent
e336b989
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libaacs/aacs.c
View file @
0157b519
...
...
@@ -98,6 +98,10 @@ static const uint8_t empty_key[20] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
static
const
uint8_t
aacs_iv
[
16
]
=
{
0x0b
,
0xa0
,
0xf8
,
0xdd
,
0xfe
,
0xa6
,
0x1f
,
0xb3
,
0xd8
,
0xdf
,
0x9f
,
0x56
,
0x6a
,
0x05
,
0x0f
,
0x78
};
/*
* Validate processing key using media key verification data
*/
static
int
_validate_pk
(
const
uint8_t
*
pk
,
const
uint8_t
*
cvalue
,
const
uint8_t
*
uv
,
const
uint8_t
*
vd
,
uint8_t
*
mk
)
...
...
@@ -133,6 +137,10 @@ static int _validate_pk(const uint8_t *pk,
return
AACS_ERROR_NO_PK
;
}
/*
* Revocation lists
*/
static
int
_rl_verify_signature
(
const
uint8_t
*
rl
,
size_t
size
)
{
int
entries
=
MKINT_BE32
(
rl
+
12
+
8
);
...
...
@@ -194,6 +202,10 @@ static void _update_rl(MKB *mkb)
}
}
/*
* Derive media key using full set of device keys
*/
static
uint32_t
_calc_v_mask
(
uint32_t
uv
)
{
uint32_t
v_mask
=
0xffffffff
;
...
...
@@ -390,6 +402,10 @@ static int _calc_pk_mk(MKB *mkb, dk_list *dkl, uint8_t *mk)
return
AACS_ERROR_NO_DK
;
}
/*
* file access utils
*/
static
AACS_FILE_H
*
_file_open
(
AACS
*
aacs
,
const
char
*
file
)
{
AACS_FILE_H
*
fp
;
...
...
@@ -469,6 +485,10 @@ static MKB *_mkb_open(AACS *aacs)
return
mkb
;
}
/*
* Calculate media key using a set of processing keys
*/
static
int
_calc_mk
(
AACS
*
aacs
,
uint8_t
*
mk
,
pk_list
*
pkl
,
dk_list
*
dkl
)
{
int
a
,
num_uvs
=
0
;
...
...
@@ -545,6 +565,10 @@ static int _calc_mk(AACS *aacs, uint8_t *mk, pk_list *pkl, dk_list *dkl)
return
AACS_ERROR_CORRUPTED_DISC
;
}
/*
* MMC device access
*/
static
int
_mmc_read_auth
(
AACS
*
aacs
,
cert_list
*
hcl
,
int
type
,
uint8_t
*
p1
,
uint8_t
*
p2
)
{
MMC
*
mmc
=
NULL
;
...
...
@@ -630,6 +654,10 @@ static int _read_pmsn(AACS *aacs, cert_list *hcl)
return
error_code
;
}
/*
* Unit key calculation
*/
static
int
_calc_vuk
(
AACS
*
aacs
,
uint8_t
*
mk
,
uint8_t
*
vuk
,
config_file
*
cf
)
{
int
error_code
;
...
...
@@ -952,6 +980,10 @@ static int _calc_uks(AACS *aacs, config_file *cf)
return
AACS_ERROR_CORRUPTED_DISC
;
}
/*
*
*/
static
int
_calc_title_hash
(
AACS
*
aacs
)
{
void
*
data
;
...
...
@@ -1035,6 +1067,10 @@ static int _get_bus_encryption_capable(const char *path)
return
bec
;
}
/*
* Stream decryption
*/
static
int
_verify_ts
(
uint8_t
*
buf
)
{
int
i
;
...
...
@@ -1098,6 +1134,10 @@ static void _decrypt_bus(AACS *aacs, uint8_t *buf)
gcry_cipher_close
(
gcry_h
);
}
/*
* libaacs API
*/
void
aacs_get_version
(
int
*
major
,
int
*
minor
,
int
*
micro
)
{
*
major
=
AACS_VERSION_MAJOR
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment