JubeatPlus 3.9.11
Loading...
Searching...
No Matches
BFCodecContext Class Reference

A Blowfish key schedule and the block cipher over it. More...

#include <bfcodeccontext.h>

Public Member Functions

 BFCodecContext ()
 Constructs a zeroed key schedule.
 ~BFCodecContext ()=default
 Destroys the schedule.
void clear ()
 Returns the whole schedule to its zero state, so it must be re-keyed before reuse.
void setKey (const uint8_t *pbKey, int nKeyLength)
 Expands a key into the schedule.
void encipherBlock (uint64_t *pqwLeft, uint64_t *pqwRight) const
 Encrypts one 64-bit block in place, as two 32-bit halves.
void decipherBlock (uint64_t *pqwLeft, uint64_t *pqwRight) const
 Decrypts one 64-bit block in place, as two 32-bit halves.

Detailed Description

A Blowfish key schedule and the block cipher over it.

Constructor & Destructor Documentation

◆ BFCodecContext()

BFCodecContext::BFCodecContext ( )
default

Constructs a zeroed key schedule.

The binary's AllocContext is operator new plus a bzero of the whole 0x2090-byte context, which is the compiler's lowering of this zero-initialising constructor.

Ghidra address:
0x93b34
Ghidra address:
0x93b34

◆ ~BFCodecContext()

BFCodecContext::~BFCodecContext ( )
default

Destroys the schedule.

The binary's FreeContext is a null-guarded operator delete with no field cleanup, so the destructor is trivial; the expanded key is left in freed memory exactly as shipped.

Ghidra address:
0x93b64

Member Function Documentation

◆ clear()

void BFCodecContext::clear ( )

Returns the whole schedule to its zero state, so it must be re-keyed before reuse.

Ghidra address:
0x93b70

◆ decipherBlock()

void BFCodecContext::decipherBlock ( uint64_t * pqwLeft,
uint64_t * pqwRight ) const

Decrypts one 64-bit block in place, as two 32-bit halves.

Parameters
pqwLeftThe block's left half.
pqwRightThe block's right half.
Ghidra address:
0x93e28
Ghidra address:
0x93e28

◆ encipherBlock()

void BFCodecContext::encipherBlock ( uint64_t * pqwLeft,
uint64_t * pqwRight ) const

Encrypts one 64-bit block in place, as two 32-bit halves.

Parameters
pqwLeftThe block's left half.
pqwRightThe block's right half.
Ghidra address:
0x93db0
Ghidra address:
0x93db0

◆ setKey()

void BFCodecContext::setKey ( const uint8_t * pbKey,
int nKeyLength )

Expands a key into the schedule.

Parameters
pbKeyThe key material.
nKeyLengthThe key's length in bytes; used as a modulus, so zero divides by zero.
Ghidra address:
0x93b88
Ghidra address:
0x93b88

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