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
public class KeyFactorySpi extends BaseKeyFactorySpi
KeyFactory for composite signatures. List of supported combinations is in CompositeSignaturesConstants
-
-
Constructor Summary
Constructors Constructor Description KeyFactorySpi()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.security.Key
engineTranslateKey(java.security.Key key)
java.security.PrivateKey
generatePrivate(PrivateKeyInfo keyInfo)
Creates a CompositePrivateKey from its PrivateKeyInfo encoded form.java.security.PublicKey
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
-
-
-
-
Method Detail
-
engineTranslateKey
protected java.security.Key engineTranslateKey(java.security.Key key) throws java.security.InvalidKeyException
- Specified by:
engineTranslateKey
in classjava.security.KeyFactorySpi
- Throws:
java.security.InvalidKeyException
-
generatePrivate
public java.security.PrivateKey generatePrivate(PrivateKeyInfo keyInfo) throws java.io.IOException
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:
java.io.IOException
-
generatePublic
public java.security.PublicKey generatePublic(SubjectPublicKeyInfo keyInfo) throws java.io.IOException
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:
java.io.IOException
-
-