# Fast encryption for Medical System?

For part of my bachelor thesis (which will be involved in a commercial product), I need to build a cryptosystem that will be used to encrypt and decrypt continuous medical data that is transmitted from a patient to their doctor. The data must be encrypted and decrypted very fast in case of emergency.

Which encryption algorithm should I use? I think I should use AES. Should I involve a public key encryption to exchange shared keys? But I am afraid it may slow down the system and compromise the consistency of data transfer.

Update: The data will be sent from wearable devices on a patient to their doctor so the computing power might be limited. My thesis will not touch on the hardware and networking aspects directly. However, they should be included in the discussion and analysis of my report.

• Unless you have severely constrained devices (e.g. smartcards) any encryption is fast. An RSA operation will cost perhaps 10ms on a desktop computer. – CodesInChaos Aug 5 '16 at 7:00
• This is just a practice project and will never be used in production, right? – CodesInChaos Aug 5 '16 at 7:02
• @CodesInChaos This is part of my bachelor thesis, and I was informed that my thesis will be involved in a commercial product. The data is mostly sent from wearable medical devices and I don't know how constrained they are. – Khoi Tran Aug 5 '16 at 10:48
• Updated the question accordingly (as there is a big difference between a school project and a bachelor thesis with commercial implementation). As for the consistency of data transfer, I would look at the potential hardware first and ensure there aren’t any network issues you may have to cope with first (eg: working around potential network outages caused by walls between patient/sender and doc/receiver, etc.)… in the end, an instable network (resulting in inconsistent data) can’t be made stable via cryptography. – e-sushi Aug 5 '16 at 13:04
• @KhoiTran How about using an existing TLS implementation targeting embedded systems? – CodesInChaos Aug 5 '16 at 14:28

The data must be encrypted and decrypted very fast in case of emergency.

Which encryption algorithm should I use? I think I should use AES.

Indeed, symmetric cryptography (such as AES) is a good choice for performances. But a significant factor that you did not mentioned is the platform on which the algorithms will run. Does it contains cryptographic hardware accelerators? If yes, for which kind of algorithms (ECC, AES, RSA, ...)?

That will determine which algorithm will be the most relevant.

For example, if you have hardware accelerators for ECC or RSA, involving asymmetric cryptography to exchange the secret keys used for encryption should not slow down the system that much. In the other case, it can be very challenging to implement it in software with good performances on an embedded device.

This is also the same compromise for the choice of the symmetric algorithm. If you have a hardware accelerator for AES, then you should probably use it. In the other case, AES will not be the fastest algorithm. For efficient software implementations on embedded devices, you can take a look at lightweight ciphers.

• Thanks for your input. The project will be software implementation on wearable medical devices. I have no knowledge of hardware accelerators. – Khoi Tran Aug 5 '16 at 12:14
• @KhoiTran If your protocol should be implemented in software on wearable devices, then asymmetric cryptography could introduce a significant overhead.But once again, it depends on the platform. – Raoul722 Aug 5 '16 at 12:21
• Just a note related to power: If you don't have a hardware accelerator, SPECK is a good choice for power in software. Even in hardware, the cost of AES is about 80 times the power of raw data (this is a per Joule calculation that seems to be ballpark when you actually test ICs). @KhoiTran I would suggest sending the least amount of data as possible because data transfer is actually your greatest power consumer. – b degnan Aug 5 '16 at 13:01