diff --git a/DVD/CSS.cs b/DVD/CSS.cs index d631377..ce9cade 100644 --- a/DVD/CSS.cs +++ b/DVD/CSS.cs @@ -371,9 +371,8 @@ namespace Aaru.Decryption.DVD }; /// - /// The disc key returned by the logical unit is encoded with the bus key - /// to prevent man-in-the-middle attacks. This method returns a structure - /// with the decoded key included. + /// The disc key returned by the logical unit is encoded with the bus key to prevent man-in-the-middle attacks. + /// This method returns a structure with the decoded key included. /// /// The encoded key from the logical unit. /// The bus key from the logical unit. @@ -399,9 +398,8 @@ namespace Aaru.Decryption.DVD } /// - /// The title key returned by the logical unit is encoded with the bus key - /// to prevent man-in-the-middle attacks. This method returns a structure - /// with the decoded key included. + /// The title key returned by the logical unit is encoded with the bus key to prevent man-in-the-middle attacks. + /// This method returns a structure with the decoded key included. /// /// The encoded key from the logical unit. /// The bus key from the logical unit. @@ -429,9 +427,7 @@ namespace Aaru.Decryption.DVD }; } - /// - /// Takes a challenge and a variant and encrypts it according to the key type. - /// + /// Takes a challenge and a variant and encrypts it according to the key type. /// The type of key to encrypt. /// /// The challenge sent to the logical unit. @@ -547,9 +543,7 @@ namespace Aaru.Decryption.DVD } } - /// - /// Takes an encrypted key and its crypto and returns the key decrypted. - /// + /// Takes an encrypted key and its crypto and returns the key decrypted. /// /// The key used to encrypt the data. /// The encrypted data. @@ -600,9 +594,7 @@ namespace Aaru.Decryption.DVD DecryptTitleKey(byte invert, byte[] cryptoKey, byte[] encryptedKey, out byte[] decryptedKey) => DecryptKey(invert, cryptoKey, encryptedKey, out decryptedKey); - /// - /// Takes an bytearray of encrypted keys, decrypts them and returns the correctly decrypted key. - /// + /// Takes an bytearray of encrypted keys, decrypts them and returns the correctly decrypted key. /// Encrypted keys to try to decrypt. /// The decrypted key if found. public static void DecryptDiscKey(byte[] encryptedKeys, out byte[]? decryptedKey) @@ -634,9 +626,7 @@ namespace Aaru.Decryption.DVD decryptedKey = null; } - /// - /// Takes a sector and a decrypted title key and returns the decrypted sector. - /// + /// Takes a sector and a decrypted title key and returns the decrypted sector. /// Encrypted sector data. /// The Copyright Management Information. /// The encryption keys. @@ -702,9 +692,7 @@ namespace Aaru.Decryption.DVD return decryptedBuffer; } - /// - /// Takes an RPC state from the drive and a CMI from a disc and checks if the regions are compatible. - /// + /// Takes an RPC state from the drive and a CMI from a disc and checks if the regions are compatible. /// The RegionalPlaybackControlState from drive. /// The LeadInCopyright from disc. /// true if the regions are compatible, else false @@ -725,4 +713,4 @@ namespace Aaru.Decryption.DVD ((rpc.RegionMask & 0x80) == (cmi.RegionInformation & 0x80) && (rpc.RegionMask & 0x80) != 0x80); } } -} +} \ No newline at end of file diff --git a/DVD/Dump.cs b/DVD/Dump.cs index 331bbcb..08af6ab 100644 --- a/DVD/Dump.cs +++ b/DVD/Dump.cs @@ -47,8 +47,6 @@ namespace Aaru.Decryption.DVD const byte _keySize = 5; const byte _challengeSize = 2 * _keySize; readonly Device _dev; - public byte Agid { get; private set; } - public byte[] BusKey { get; private set; } public Dump(Device dev) { @@ -57,9 +55,10 @@ namespace Aaru.Decryption.DVD Agid = 0; } - /// - /// Returns the Authentication Success Flag of the logical unit. - /// + public byte Agid { get; private set; } + public byte[] BusKey { get; private set; } + + /// Returns the Authentication Success Flag of the logical unit. /// true if the command failed and contains the sense buffer. /// Buffer where the Authentication Success Flag will be stored. /// Sense buffer. @@ -89,9 +88,7 @@ namespace Aaru.Decryption.DVD return sense; } - /// - /// Returns the Regional Playback Control State of the logical unit. - /// + /// Returns the Regional Playback Control State of the logical unit. /// true if the command failed and contains the sense buffer. /// Buffer where the Regional Playback Control State will be stored. /// Sense buffer. @@ -121,9 +118,7 @@ namespace Aaru.Decryption.DVD return sense; } - /// - /// Invalidates an Authentication Grant ID. - /// + /// Invalidates an Authentication Grant ID. /// Buffer where the Regional Playback Control State will be stored. /// Sense buffer. /// Key class. @@ -153,9 +148,7 @@ namespace Aaru.Decryption.DVD return sense; } - /// - /// Returns a valid Authentication Grant ID for CSS/CPPM. - /// + /// Returns a valid Authentication Grant ID for CSS/CPPM. /// Buffer where the Regional Playback Control State will be stored. /// Sense buffer. /// Key class. @@ -185,9 +178,7 @@ namespace Aaru.Decryption.DVD return sense; } - /// - /// Returns KEY1 from the logical unit. - /// + /// Returns KEY1 from the logical unit. /// Buffer where the Regional Playback Control State will be stored. /// Sense buffer. /// Key class. @@ -217,9 +208,7 @@ namespace Aaru.Decryption.DVD return sense; } - /// - /// Returns the challenge from the logical unit. - /// + /// Returns the challenge from the logical unit. /// Buffer where the Regional Playback Control State will be stored. /// Sense buffer. /// Key class. @@ -249,9 +238,7 @@ namespace Aaru.Decryption.DVD return sense; } - /// - /// Send a challenge to the logical unit. - /// + /// Send a challenge to the logical unit. /// Buffer where the Regional Playback Control State will be stored. /// Sense buffer. /// Key class. @@ -294,9 +281,7 @@ namespace Aaru.Decryption.DVD return sense; } - /// - /// Send KEY2 to the logical unit. - /// + /// Send KEY2 to the logical unit. /// Buffer where the Regional Playback Control State will be stored. /// Sense buffer. /// Key class. @@ -334,9 +319,7 @@ namespace Aaru.Decryption.DVD return sense; } - /// - /// Returns the encrypted disc key of the MMC logical unit - /// + /// Returns the encrypted disc key of the MMC logical unit /// true if the command failed and contains the sense buffer. /// Buffer where the bus key will be stored /// Sense buffer. @@ -359,12 +342,10 @@ namespace Aaru.Decryption.DVD _dev.SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout, ScsiDirection.In, out duration, out bool sense); - return (sense); + return sense; } - /// - /// Returns the bus key of the MMC logical unit - /// + /// Returns the bus key of the MMC logical unit /// true if the command failed and contains the sense buffer. /// Buffer where the bus key will be stored /// Sense buffer. @@ -485,9 +466,7 @@ namespace Aaru.Decryption.DVD return false; } - /// - /// Reads a title key for a sector on the disc. - /// + /// Reads a title key for a sector on the disc. /// Buffer where the bus key will be stored /// Sense buffer. /// Key class. @@ -526,4 +505,4 @@ namespace Aaru.Decryption.DVD return sense; } } -} +} \ No newline at end of file