Some time ago, I proposed making the site more educational by teaching correct cryptographic programming. The proposal had had somewhat good reception, but was met with cold ice as there had been little new questions on this topic.
Therefore today I'd like to ask a question centralize the idea behind the correct programmatic usage of the signcrypt (Sign and Encrypt) primitive.
The goal of signcrypt in its simple form can be stated as: to ensure the confidentiality of a non-repudiatable, authentic, integral message for its intended recipiant (correct me if I've mis-stated it). From this, I have the following questions at hand:
Per this recent question, should we a) query the signing oracle on the encrypted message, or b) query the encryption oracle on the signed message?
What is the interface of signcryption? What functions does the tuple consist of?
As it deserves a topic of its own, in short summary how does signcryption fit into the big picture of instant messaging protocol like the Double Ratchet Algorithm?