bkcrack: Data Struct Reference

bkcrack 1.8.1 Crack legacy zip encryption with Biham and Kocher's known plaintext attack.

Data Struct Reference

Structure to hold the data needed for an attack. More...

`#include <bkcrack/Data.hpp>`

## Classes
class | Error
| Exception thrown if data cannot be used to carry out an attack. More...

## Public Member Functions
| Data (std::vector< std::uint8_t > ciphertext, std::vector< std::uint8_t > plaintext, int offset, const std::map< int, std::uint8_t > &extraPlaintext)
| Construct data and check it can be used to carry out an attack.

## Public Attributes
std::vector< std::uint8_t > | ciphertext
| ciphertext bytes including encryption header
std::vector< std::uint8_t > | plaintext
| plaintext bytes
std::vector< std::uint8_t > | keystream
| keystream bytes
std::size_t | offset
| plaintext and keystream offset relative to ciphertext with encryption header
std::vector< std::pair< std::size_t, std::uint8_t > > | extraPlaintext
| additional bytes of plaintext with their offset relative to ciphertext with encryption header

## Static Public Attributes
static constexpr std::size_t | encryptionHeaderSize = 12
| Size of the traditional PKWARE encryption header.

## Detailed Description

Structure to hold the data needed for an attack.

## Constructor & Destructor Documentation

## ◆ Data()

Data::Data | ( | std::vector< std::uint8_t > | ciphertext,
|  | std::vector< std::uint8_t > | plaintext,
|  | int | offset,
|  | const std::map< int, std::uint8_t > & | extraPlaintext )

Construct data and check it can be used to carry out an attack.

Parameters

  ciphertext | Ciphertext bytes including encryption header
  plaintext | Plaintext bytes
  offset | Plaintext offset relative to ciphertext without encryption header (may be negative)
  extraPlaintext | Additional bytes of plaintext with their offset relative to ciphertext without encryption header (may be negative)

Exceptions

  Error | if the given data cannot be used to carry out an attack

The documentation for this struct was generated from the following file:

- include/bkcrack/Data.hpp