Sign then Encrypt

Just as a heads up this is wacky as shit because of some weird merging and rebasing…I'm still looking at it but if you see anything odd please let me know.
@Renelvon - that would suck a bit and seem like an unnecessary exposure. 

The code you highlight exposes an ephemeral public key rather than a long term key and so is not quite as bad and it also looks like that is the recipients public key but still don't see any reason to concatenate it with the ciphertext, it should be encrypted.