As far as I have learned so far, asymmetric encryption is too costly for long data. Additionally, from a technical perspective, it's not even possible to encrypt arbitrarily large portions of data (the size of the data is limited by the size of the key being used).
As far as I know the usual workaround is to create a (random) key, use that key to encrypt the data symmetrically, and then only encrypt this key using an asymmetric algorithm.
Now I have two questions:
- Is the approach I described so far correct?
- What do I do with the encrypted key? Of course, I store or send the encrypted data somewhere, but what about the key? If I understand it correctly, I need to store this key as well, right?