Class KeyFactorySpi
java.lang.Object
java.security.KeyFactorySpi
org.bouncycastle.jcajce.provider.asymmetric.util.BaseKeyFactorySpi
org.bouncycastle.jcajce.provider.asymmetric.compositesignatures.KeyFactorySpi
- All Implemented Interfaces:
AsymmetricKeyInfoConverter
KeyFactory for composite signatures. List of supported combinations is in CompositeSignaturesConstants
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Key
engineTranslateKey
(Key key) generatePrivate
(PrivateKeyInfo keyInfo) Creates a CompositePrivateKey from its PrivateKeyInfo encoded form.generatePublic
(SubjectPublicKeyInfo keyInfo) Creates a CompositePublicKey from its SubjectPublicKeyInfo encoded form.Methods inherited from class org.bouncycastle.jcajce.provider.asymmetric.util.BaseKeyFactorySpi
engineGeneratePrivate, engineGeneratePublic, engineGetKeySpec
-
Constructor Details
-
KeyFactorySpi
public KeyFactorySpi()
-
-
Method Details
-
engineTranslateKey
- Specified by:
engineTranslateKey
in classKeyFactorySpi
- Throws:
InvalidKeyException
-
generatePrivate
Creates a CompositePrivateKey from its PrivateKeyInfo encoded form. It is compliant with https://www.ietf.org/archive/id/draft-ounsworth-pq-composite-sigs-13.html where CompositeSignaturePrivateKey is a sequence of two OneAsymmetricKey which a newer name for PrivateKeyInfo.- Parameters:
keyInfo
- PrivateKeyInfo containing a sequence of PrivateKeyInfos corresponding to each component.- Returns:
- A CompositePrivateKey created from all components in the sequence.
- Throws:
IOException
-
generatePublic
Creates a CompositePublicKey from its SubjectPublicKeyInfo encoded form. It is compliant with https://www.ietf.org/archive/id/draft-ounsworth-pq-composite-sigs-13.html where CompositeSignaturePublicKey is a sequence of two BIT STRINGs which contain the encoded component public keys. In BC implementation - CompositePublicKey is encoded into a BIT STRING in the form of SubjectPublicKeyInfo.- Parameters:
keyInfo
- SubjectPublicKeyInfo containing a sequence of BIT STRINGs corresponding to each component.- Returns:
- Throws:
IOException
-