SPMU383 April 2026 BQ27Z846
The device uses SHA-256 for authentication, implementing HMAC-SHA256 (Hash-based Message Authentication Code with SHA-256) to verify the authenticity of the battery pack. This cryptographic method ensures that only genuine battery packs with the correct secret key can be authenticated by the host system.
HMAC (Hash-based Message Authentication Code) is a mechanism for calculating a message authentication code using a cryptographic hash function (SHA-256) in combination with a secret key. The authentication process uses:
The host computes the same HMAC using the shared secret key and compares it with the response from the gauge. A match confirms the battery pack is authentic.
The HMAC-SHA256 challenge size is configurable via the HMAC-SHA2 Challenge Size parameter in data flash. By default (value = 1), the device accepts any challenge size from 8 to 32 bytes. The random number should be generated from the host processor system using a cryptographically secure random number generator.
The challenge is written to the gauge as a block (up to 32 bytes) to addresses 0x40–0x5F via AltManufacturerAccess().
Configuration Options:
See HMAC-SHA2 Challenge Size parameter documentation for detailed configuration information.
Detailed information about the SHA-256 algorithm can be found here:
The authentication status can be monitored using the [AUTH] bit (Bit 18) in OperationStatus():
The host should wait for [AUTH] to clear (or wait approximately 200 ms) after sending the challenge before reading the response.