Commit acc4f7d9 authored by npzacs's avatar npzacs
Browse files

Do not export internal symbols from library

parent d664eeb5
......@@ -20,13 +20,15 @@
#ifndef CRYPTO_H_
#define CRYPTO_H_
#include <util/attributes.h>
#include <stdint.h>
int crypto_init();
void crypto_aesg3(const uint8_t *D, uint8_t *lsubk, uint8_t* rsubk,
uint8_t *pk); // returns left, centre, right keys
void crypto_aacs_sign(const uint8_t *c, const uint8_t *privk, uint8_t *sig,
uint8_t *n, const uint8_t *dhp);
void crypto_aacs_title_hash(const uint8_t *ukf, uint64_t len, uint8_t *hash);
AACS_PRIVATE int crypto_init(void);
AACS_PRIVATE void crypto_aesg3(const uint8_t *D, uint8_t *lsubk, uint8_t* rsubk,
uint8_t *pk); // returns left, centre, right keys
AACS_PRIVATE void crypto_aacs_sign(const uint8_t *c, const uint8_t *privk, uint8_t *sig,
uint8_t *n, const uint8_t *dhp);
AACS_PRIVATE void crypto_aacs_title_hash(const uint8_t *ukf, uint64_t len, uint8_t *hash);
#endif /* CRYPTO_H_ */
......@@ -20,32 +20,34 @@
#ifndef MKB_H_
#define MKB_H_
#include <util/attributes.h>
#include <stdlib.h>
#include <stdint.h>
typedef struct mkb MKB;
MKB *mkb_open(const char *path); // init MKB
void mkb_close(MKB *mkb); // free MKB
AACS_PRIVATE MKB *mkb_open(const char *path); // init MKB
AACS_PRIVATE void mkb_close(MKB *mkb); // free MKB
// returns type
uint8_t mkb_type(MKB *mkb);
AACS_PRIVATE uint8_t mkb_type(MKB *mkb));
// returns version
uint32_t mkb_version(MKB *mkb);
AACS_PRIVATE uint32_t mkb_version(MKB *mkb);
// returns list of revoked host entries
uint8_t *mkb_host_revokation_entries(MKB *mkb, size_t *len);
AACS_PRIVATE uint8_t *mkb_host_revokation_entries(MKB *mkb, size_t *len);
// returns list of revoked drive entries
uint8_t *mkb_drive_revokation_entries(MKB *mkb, size_t *len);
AACS_PRIVATE uint8_t *mkb_drive_revokation_entries(MKB *mkb, size_t *len);
// returns subset-diff records
uint8_t *mkb_subdiff_records(MKB *mkb, size_t *len);
AACS_PRIVATE uint8_t *mkb_subdiff_records(MKB *mkb, size_t *len);
// returns list of subset-diff offsets
uint8_t *mkb_subdiff_offsets(MKB *mkb, size_t *len);
AACS_PRIVATE uint8_t *mkb_subdiff_offsets(MKB *mkb, size_t *len);
// returns list of cvalues
uint8_t *mkb_cvalues(MKB *mkb, size_t *len);
AACS_PRIVATE uint8_t *mkb_cvalues(MKB *mkb, size_t *len);
// media key verification data return in param (always 16 bytes)
uint8_t *mkb_mk_dv(MKB *mkb);
AACS_PRIVATE uint8_t *mkb_mk_dv(MKB *mkb);
// returns MKB signature
uint8_t *mkb_signature(MKB *mkb, size_t *len);
AACS_PRIVATE uint8_t *mkb_signature(MKB *mkb, size_t *len);
/* The Media Key block is of variable size but must be a multiple of 4
* MKB Structure:
......
......@@ -20,14 +20,16 @@
#ifndef MMC_H_
#define MMC_H_
#include <util/attributes.h>
#include <stdint.h>
typedef struct mmc MMC;
MMC *mmc_open(const char *path, const uint8_t *host_priv_key,
const uint8_t *host_cert, const uint8_t *host_nonce,
const uint8_t *host_key_point);
void mmc_close(MMC *drive);
int mmc_read_vid(MMC *mmc, uint8_t *vid);
AACS_PRIVATE MMC *mmc_open(const char *path, const uint8_t *host_priv_key,
const uint8_t *host_cert, const uint8_t *host_nonce,
const uint8_t *host_key_point);
AACS_PRIVATE void mmc_close(MMC *drive);
AACS_PRIVATE int mmc_read_vid(MMC *mmc, uint8_t *vid);
#endif /* MMC_H_ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment