#![forbid(unsafe_code)]
#![deny(missing_docs)]
#![deny(rust_2018_idioms)]
pub mod aes;
pub mod ake;
pub mod cht;
pub mod content;
pub mod content_certificate;
pub mod crl;
pub mod ec;
pub mod ecdsa;
pub mod error;
pub mod keydb;
pub mod mkb;
pub mod mmc;
pub mod self_check;
pub mod subdiff;
pub mod unit_key;
pub mod volume;
pub mod vuk;
pub use crate::ake::{
aacs_la_pub_point, build_signed_certificate, bus_key_from_point, host_authenticate,
read_verified_volume_id, AkeResult, Certificate, DriveAuthState, HostCredentials,
AACS_LA_PUB_X, AACS_LA_PUB_Y, BUS_KEY_LEN, CERT_TYPE_DRIVE, CERT_TYPE_HOST,
};
pub use crate::cht::{
hash_value_of_unit, ClipDescriptor, ContentHashTable, HASH_UNIT_SIZE, HASH_VALUE_SIZE,
LOGICAL_SECTORS_PER_HASH_UNIT, LOGICAL_SECTOR_SIZE,
};
pub use crate::content::{decrypt_aligned_unit, encrypt_aligned_unit, ALIGNED_UNIT_SIZE};
pub use crate::content_certificate::{
usage_rules_hash, BdFormatSpecificSection, ContentCertificate, ContentCertificateId,
ContentSequenceNumber, CERTIFICATE_TYPE_FIRST_GEN, CONTENT_HASH_TABLE_DIGEST_LEN,
SIGNATURE_DATA_LEN,
};
pub use crate::crl::{
ContentRevocationList, CrlSegment, ManagedCopyServerCertificateId, RecordableMediaRevocation,
RecordableMediaType, RevocationRecord, CRL_HEADER_LEN, LIST_TYPE_FIRST_GEN,
RECORD_TYPE_CONTENT_CERTIFICATE_ID, RECORD_TYPE_MANAGED_COPY_SERVER_ID,
RECORD_TYPE_RMRR_PART_1, RECORD_TYPE_RMRR_PART_2, RECORD_TYPE_RMRR_PART_3,
REVOCATION_RECORD_LEN, SEGMENT_1_SIZE_MAX, SEGMENT_SIGNATURE_LEN,
};
pub use crate::ec::{Fp, Point, U160};
pub use crate::ecdsa::{sign, sign_with_k, verify, Signature};
pub use crate::error::AacsError;
pub use crate::keydb::{
DeviceKeyRecord, DiscRecords, DriveCertRecord, HostCertRecord, KeyDb, KeyDbEntry, ParseReport,
ProcessingKey, SkippedLine,
};
pub use crate::mkb::{
Mkb, MkbType, RevocationEntry, RevocationSignatureBlock, SubsetDifferenceEntry,
};
pub use crate::mmc::{
build_send_disc_structure_write_data_key, build_send_key_host_cert_chal,
build_send_key_host_key, parse_bus_encryption_sector_extents_response,
parse_data_keys_response, parse_media_id_response, parse_media_serial_response,
parse_mkb_pack_response, parse_report_key_agid, parse_report_key_binding_nonce,
parse_report_key_drive_cert, parse_report_key_drive_cert_chal, parse_report_key_drive_key,
parse_send_disc_structure_write_data_key, parse_send_key_host_cert_chal,
parse_send_key_host_key, parse_volume_id_response, AgidResponse, BindingNonceResponse,
BusEncryptionSectorExtent, BusEncryptionSectorExtentsResponse, DataDirection, DataKeysResponse,
DriveCertChallengeResponse, DriveCertResponse, DriveCommand, DriveKeyResponse,
MediaIdentifierResponse, MediaSerialNumberResponse, MkbPackResponse, ReadDiscStructure,
ReportKey, ScsiResponse, SendDiscStructure, SendKey, VolumeIdResponse,
};
#[cfg(any(test, feature = "test-util"))]
pub use crate::mmc::MockDrive;
pub use crate::self_check::{aacs_la_pub_self_check, ake_ecdh_self_check, curve_self_check};
#[cfg(any(test, feature = "test-util"))]
pub use crate::self_check::{ake_full_self_check, all_self_checks};
pub use crate::subdiff::{
aes_g3, applies_to_device, apply_key_conversion_data, derive_processing_key, SubsetDifference,
};
pub use crate::unit_key::{CpsUnitRecord, UnitKeyFile, UnitKeyFileHeader};
pub use crate::volume::{AacsVolume, CpsUnit, DeviceKey, TitleKey};
pub use crate::vuk::{derive_vuk, Vuk};
pub type Result<T> = core::result::Result<T, AacsError>;