improved handling of battery recognition tasks in an electronic device such as a cell phone , smart phone , computer system , recording device or others is facilitated . recognition of a battery so as to enable exchange of power between the device and the battery is determined by a match between one of a plurality of number strings stored in the device and the decrypted response to an encrypted challenge derived from the one of stored number string .