In a method and system for authenticating a smart battery for charging, the smart
battery receives an encrypted random string. The smart battery is operable to provide
power to a device. The encrypted random string is generated by a controller of
the device by generating a random string and encrypting the random string with
an encryption key. The smart battery decrypts the encrypted random string with
the encryption key to recover the random string and transfer the random string
to the device. The device verifies that the random string is unchanged to authenticate
the smart battery for the charging. If the random string has been modified then
the smart battery is disabled from the charging.