1. An apparatus comprising: a medical device configured for implantation into a living organism, the medical device comprising processing circuitry and an interface configured for communication with an external monitoring device; wherein the medical device is configured to control access to the medical device by the monitoring device based on a measurement of one or more physiological values of the living organism by the medical device; wherein access comprises an authorization to modify at least one function of the medical device; and wherein the medical device is further configured to receive a first public value from the monitoring device, to generate a second public value and a key from a given physiological value measured by the medical device, to verify the received first public value using the generated second public value, to encrypt information of the medical device using the key responsive to the verification, and to send the second public value and the encrypted information to the monitoring device.