BPFromHex
Cryptography
Description
Converts a big-endian hexadecimal string into the 528-bit TBPValue working value used by the Brainpool ECDSA suite
The string may hold at most 128 hex digits and accepts upper or lower case; the value is zero-filled on output, so shorter strings load the low limbs of the 33-limb core
Syntax
Delphi
Function BPFromHex(Out V: TBPValue; Const Hex: AnsiString): Boolean;Parameters
| V | Receives the parsed value; always zero-filled before parsing starts |
|---|---|
| Hex | Big-endian hexadecimal digits, 1 to 128 characters |
Return values
| False | The string is empty, longer than 128 digits, or contains a non-hex character; V is left zeroed |
|---|---|
| True | V holds the parsed value |
Remarks
Curve parameters and keys in RFC 5639 are published as hexadecimal, so this helper is the natural way to load them before BPLoadCurve-based arithmetic or BPKeyGen key material conversion