Documentation ¶
Index ¶
Constants ¶
View Source
const ( // p65, 3. Direct Access Block commands (SPC-5 and SBC-4), SCSI Commands Reference Manual, Rev. J TEST_UNIT_READY = 0x00 REQUEST_SENSE = 0x03 INQUIRY = 0x12 MODE_SENSE_6 = 0x1a START_STOP_UNIT = 0x1b MODE_SENSE_10 = 0x5a READ_CAPACITY_10 = 0x25 READ_10 = 0x28 WRITE_10 = 0x2a REPORT_LUNS = 0xa0 // service actions SERVICE_ACTION = 0x9e READ_CAPACITY_16 = 0x10 // 04-349r1 SPC-3 MMC-5 Merge PREVENT ALLOW MEDIUM REMOVAL commands PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1e // p33, 4.10, USB Mass Storage Class – UFI Command Specification Rev. 1.0 READ_FORMAT_CAPACITIES = 0x23 // To speed up FDE it is beneficial to report a larger block size, to // reduce the number of encryption/decryption iterations caused by // per-block IV computation. BLOCK_SIZE_MULTIPLIER = 8 // These parameters control how many blocks are read/written before // being offloaded to DCP for decryption/encryption in a goroutine. // // Values should be tuned for optimum pipeline performance, to minimize // overhead while the DCP works in parallel with the next batch of // uSDHC read/write. READ_PIPELINE_SIZE = 12 WRITE_PIPELINE_SIZE = 20 )
View Source
const ( // exactly 8 bytes required VendorID = "F-Secure" // exactly 16 bytes required ProductID = "USB armory Mk II" // exactly 4 bytes required ProductRevision = "1.00" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Drive ¶
type Drive struct { // Cipher controls whether FDE should be applied Cipher bool // Keyring instance Keyring *crypto.Keyring // Ready represents the logical device status Ready bool // PairingComplete signals pairing completion PairingComplete chan bool // Mult is the block multiplier Mult int // contains filtered or unexported fields }
Drive represents an encrypted drive instance.
func (*Drive) ConfigureUSB ¶
type PairingDisk ¶
type PairingDisk struct {
Data []byte
}
func (*PairingDisk) Detect ¶
func (q *PairingDisk) Detect() error
func (*PairingDisk) Info ¶
func (q *PairingDisk) Info() (info usdhc.CardInfo)
func (*PairingDisk) ReadBlocks ¶
func (q *PairingDisk) ReadBlocks(lba int, buf []byte) (err error)
func (*PairingDisk) WriteBlocks ¶
func (q *PairingDisk) WriteBlocks(lba int, buf []byte) (err error)
Click to show internal directories.
Click to hide internal directories.