public class KeyFactorySpi extends BaseKeyFactorySpi implements AsymmetricKeyInfoConverter
CompositeIndex.| Constructor and Description |
|---|
KeyFactorySpi() |
KeyFactorySpi(JcaJceHelper helper) |
| Modifier and Type | Method and 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. |
engineGeneratePrivate, engineGeneratePublic, engineGetKeySpecpublic KeyFactorySpi()
public KeyFactorySpi(JcaJceHelper helper)
protected java.security.Key engineTranslateKey(java.security.Key key)
throws java.security.InvalidKeyException
engineTranslateKey in class java.security.KeyFactorySpijava.security.InvalidKeyExceptionpublic java.security.PrivateKey generatePrivate(PrivateKeyInfo keyInfo) throws java.io.IOException
CompositePrivateKey from its PrivateKeyInfo encoded form. Per
draft-ietf-lamps-pq-composite-kem the private key body is the 64-byte ML-KEM seed concatenated
with the traditional private key encoding; the two components are split and decoded with their
respective component key factories.generatePrivate in interface AsymmetricKeyInfoConverterkeyInfo - PrivateKeyInfo whose key body is the concatenation of the two component keys.java.io.IOException - on a malformed encoding.public java.security.PublicKey generatePublic(SubjectPublicKeyInfo keyInfo) throws java.io.IOException
CompositePublicKey from its SubjectPublicKeyInfo encoded form. Per
draft-ietf-lamps-pq-composite-kem the public key is the concatenation of the two raw component
public keys; it is split at the fixed ML-KEM public key size and each component is decoded with
its key factory.generatePublic in interface AsymmetricKeyInfoConverterkeyInfo - SubjectPublicKeyInfo whose key body is the concatenation of the two component public keys.java.io.IOException - on a malformed encoding.