bkcrack: Keys Class Reference

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

Keys Class Reference

Keys defining the cipher state. More...

`#include <bkcrack/Keys.hpp>`

## Public Member Functions
| Keys ()=default
| Construct default state.
| Keys (std::uint32_t x, std::uint32_t y, std::uint32_t z)
| Construct keys from given components.
| Keys (const std::string &password)
| Construct keys associated to the given password.
void | update (std::uint8_t p)
| Update the state with a plaintext byte.
void | update (const std::vector< std::uint8_t > &ciphertext, std::size_t current, std::size_t target)
| Update the state forward to a target offset.
void | updateBackward (std::uint8_t c)
| Update the state backward with a ciphertext byte.
void | updateBackwardPlaintext (std::uint8_t p)
| Update the state backward with a plaintext byte.
void | updateBackward (const std::vector< std::uint8_t > &ciphertext, std::size_t current, std::size_t target)
| Update the state backward to a target offset.
auto | getX () const -> std::uint32_t
auto | getY () const -> std::uint32_t
auto | getZ () const -> std::uint32_t
auto | getK () const -> std::uint8_t

## Related Symbols
(Note that these are not member symbols.)
auto | operator<< (std::ostream &os, const Keys &keys) -> std::ostream &
| Insert a representation of keys into the stream os.

## Detailed Description

Keys defining the cipher state.

## Member Function Documentation

## ◆ getK()

auto Keys::getK | ( |  | ) | const -> std::uint8_t
| inline

Returns
  the keystream byte derived from the keys

## ◆ getX()

auto Keys::getX | ( |  | ) | const -> std::uint32_t
| inline

Returns
  X value

## ◆ getY()

auto Keys::getY | ( |  | ) | const -> std::uint32_t
| inline

Returns
  Y value

## ◆ getZ()

auto Keys::getZ | ( |  | ) | const -> std::uint32_t
| inline

Returns
  Z value

The documentation for this class was generated from the following files:

- include/bkcrack/Keys.hpp
- include/bkcrack/log.hpp