A Blowfish key schedule and the block cipher over it.
More...
#include <bfcodeccontext.h>
|
| | 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.
|
A Blowfish key schedule and the block cipher over it.
◆ 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
◆ 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
-
| pqwLeft | The block's left half. |
| pqwRight | The 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
-
| pqwLeft | The block's left half. |
| pqwRight | The 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
-
| pbKey | The key material. |
| nKeyLength | The 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: