Memristive Hopfield neural network (MHNN) has complex dynamic behavior, which is suitable for encryption applications. In order to ensure the information security of the medical data transmitted in Internet of Things (IoT), we propose three new MHNN models by using a non-ideal flux-controlled memristor model with multi-piecewise nonlinearity. In these models, there are complex dynamical behaviors such as coexisting attractors, multi-scroll attractors and grid multi-scroll attractors. In terms of hardware, the proposed model is implemented using field programmable gate array (FPGA). In addition, we provide a complete set of medical data sharing solution, which are helpful for the referral patients to receive timely medical treatment. The whole solution is successfully verified on Raspberry Pi, the encrypted Computed Tomography (CT) image is transmitted safely under Message Queuing Telemetry Transport (MQTT) protocol, and the CT image is subjected to basic security analysis. The results show that the ciphertext histogram is evenly distributed, the correlation between adjacent pixels is almost 0, the information entropy reaches 7.9977, and the values of number of pixels change rate (NPCR) and unified average change intensity (UACI) are 99.6078% and 33.4875%. The solution not only performs the exchange of medical data, but also protects the privacy of patients.