I have a program A which needs to send messages to several instances of program B (B1, B2, etc...). The messages must be encrypted, and also signed. Which means only Bn instances can decode, and they must be sure that the messages come from A.
Also, B1 should not be able to send messages to B2, etc. ...
Theoretically, it should be possible to use a single RSA key pair, with a key for A and a key for Bn. Once decoded by Bn, if the recovered message is validated (such as by a hash function), it must have been sent by A which did not disclose its key to anybody. In that case, both keys are private (which means they have to be exchanged in a secure channel)
Is this recommended or is there a strong argument in favor of having separate encryption and signing steps with independent key pairs?
Practically, in the Crypto++ library, the
PrivateKey
class also contains the public key. Is there a way to load a private key only?