
However, when the private key would have to be used, it would first be loaded and decrypted in the RAM of the host machine, and that machine would then use its CPU to generate the signature. Thus, if you used it for a CA private key, then it would have to be along these lines: the RSA private key would be stored encrypted, and the symmetric key stored in the YubiHSM. YubiHSM does not do RSA or DSA or any other algorithm relevant to asymmetric cryptography. At best he will be able to use the HSM to generate arbitrary signatures, but if the HSM is physically recovered then the attacker can know longer use the private key. Up to the tamper-resistance of the HSM and how bug-free its firmware is, this ensures that even if the host machine is fully hijacked by an attacker and/or the attacker has physical access to the CA machine, then the attacker will not obtain a copy of the private key.

Usually, when using a HSM for a CA, we mean: the CA private key (usually RSA) is generated, stored and used within the HSM, and the HSM will commit honourable suicide rather than letting that key ever exit its entrails.

Technically no, although it depends on what you mean by "secure".
