A method of operating a medical instrument (100, 200, 400, 500, 600, 700), wherein the medical instrument comprises a medical appliance and a control unit, wherein the medical appliance is battery powered by a first battery, wherein the control unit is battery powered by a second battery, wherein the medical appliance comprises an electronic portion and a subcutaneous portion, wherein the electronic portion comprises a first processor and a first memory, wherein the first memory contains a onetime password, wherein the first memory further comprises an implementation of a password-authenticated key agreement algorithm (212, 800, 901); wherein the control unit comprises a second processor and a second memory, wherein the control unit comprises a data entry interface (140, 221, 504, 604), wherein the second memory contains the implementation of the password-authenticated key agreement algorithm, wherein the medical appliance comprises a first Bluetooth communication module, wherein the control unit further comprises a second Bluetooth communication module, wherein the first Bluetooth communication module and the second Bluetooth communication module are operable for forming a wireless communication channel between the medical appliance and the control unit, wherein the method comprises the steps of: - entering the onetime password into the data entry interface; - generating a Bluetooth encryption key by the medical appliance and the control unit with the onetime password by exchanging data across the wireless communication channel by executing the password-authenticated key agreement algorithm, wherein the control unit initiates execution of the password-authenticated key agreement algorithm; - storing the Bluetooth encryption key in the first memory; - disabling the password-authenticated key agreement algorithm in the first memory after storing the Bluetooth encryption key in the first memory; - storing the Bluetooth encryption key in the second memory; and - establishing an encrypted Bluetooth communication channel using the first Bluetooth communication module and the second Bluetooth communication module, wherein the encrypted Bluetooth communication channel is the wireless communication channel encrypted using the Bluetooth encryption key. wherein the control unit comprises a second processor and a second memory, wherein the control unit comprises a data entry interface (140, 221, 504, 604), wherein the second memory contains the implementation of the password-authenticated key agreement algorithm, wherein the medical appliance comprises a first Bluetooth communication module, wherein the control unit further comprises a second Bluetooth communication module, wherein the first Bluetooth communication module and the second Bluetooth communication module are operable for forming a wireless communication channel between the medical appliance and the control unit, wherein the method comprises the steps of: - entering the onetime password into the data entry interface; - generating a Bluetooth encryption key by the medical appliance and the control unit with the onetime password by exchanging data across the wireless communication channel by executing the password-authenticated key agreement algorithm, wherein the control unit initiates execution of the password-authenticated key agreement algorithm; - storing the Bluetooth encryption key in the first memory; - disabling the password-authenticated key agreement algorithm in the first memory after storing the Bluetooth encryption key in the first memory; - storing the Bluetooth encryption key in the second memory; and - establishing an encrypted Bluetooth communication channel using the first Bluetooth communication module and the second Bluetooth communication module, wherein the encrypted Bluetooth communication channel is the wireless communication channel encrypted using the Bluetooth encryption key. - entering the onetime password into the data entry interface; - generating a Bluetooth encryption key by the medical appliance and the control unit with the onetime password by exchanging data across the wireless communication channel by executing the password-authenticated key agreement algorithm, wherein the control unit initiates execution of the password-authenticated key agreement algorithm; - storing the Bluetooth encryption key in the first memory; - disabling the password-authenticated key agreement algorithm in the first memory after storing the Bluetooth encryption key in the first memory; - storing the Bluetooth encryption key in the second memory; and - establishing an encrypted Bluetooth communication channel using the first Bluetooth communication module and the second Bluetooth communication module, wherein the encrypted Bluetooth communication channel is the wireless communication channel encrypted using the Bluetooth encryption key.