de.flexiprovider.pqc.hbc.gmss
Class GMSSKeyFactory
java.lang.Object
|
+--java.security.KeyFactorySpi
|
+--de.flexiprovider.api.keys.KeyFactory
|
+--de.flexiprovider.pqc.hbc.gmss.GMSSKeyFactory
- public class GMSSKeyFactory
- extends KeyFactory
This class transforms GMSS keys and GMSS key specifications into a form that
can be used with the FlexiPQCProvider.
- Author:
- Sebastian Blume, Michael Schneider
- See Also:
GMSSPrivateKey,
GMSSPrivateKeySpec,
GMSSPublicKey,
GMSSPublicKeySpec
|
Field Summary |
static java.lang.String |
OID
The GMSS OID. |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OID
public static final java.lang.String OID
- The GMSS OID.
GMSSKeyFactory
public GMSSKeyFactory()
generatePublic
public PublicKey generatePublic(KeySpec keySpec)
throws InvalidKeySpecException
- Converts, if possible, a key specification into a GMSSPublicKey.
Currently the following key specs are supported: GMSSPublicKeySpec,
X509EncodedKeySpec.
- Overrides:
generatePublic in class KeyFactory
- Parameters:
keySpec - the key specification- Returns:
- A GMSS public key
- Throws:
InvalidKeySpecException - if the KeySpec is not supported
generatePrivate
public PrivateKey generatePrivate(KeySpec keySpec)
throws InvalidKeySpecException
- Converts, if possible, a key specification into a GMSSPrivateKey.
Currently the following key specs are supported: GMSSPrivateKeySpec.
- Overrides:
generatePrivate in class KeyFactory
- Parameters:
keySpec - the key specification- Returns:
- The GMSS private key
- Throws:
InvalidKeySpecException - if the KeySpec is not supported- See Also:
GMSSPrivateKey,
GMSSPrivateKeySpec
getKeySpec
public KeySpec getKeySpec(Key key,
java.lang.Class spec)
throws InvalidKeySpecException
- Converts a given key into a key specification, if possible. Currently the
following specs are supported:
- for GMSSPublicKey: X509EncodedKeySpec, GMSSPublicKeySpec
- for GMSSPrivateKey: PKCS8EncodedKeySpec, GMSSPrivateKeySpec
- Overrides:
getKeySpec in class KeyFactory
- Parameters:
key - the keyspec - the class of which type the returned class should be- Returns:
- The specification of the GMSS key
- Throws:
InvalidKeySpecException - if the specification is not supported- See Also:
GMSSPrivateKey,
GMSSPrivateKeySpec,
GMSSPublicKey,
GMSSPublicKeySpec
translateKey
public Key translateKey(Key key)
throws InvalidKeyException
- Translates a key into a form known by the FlexiProvider. Currently the
following key types are supported: GMSSPrivateKey, GMSSPublicKey.
- Overrides:
translateKey in class KeyFactory
- Parameters:
key - the key- Returns:
- A key of a known key type
- Throws:
InvalidKeyException - if the key is not supported