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
For the current OIDs (draft-ietf-lamps-pq-composite-sigs, IANA arc 1.3.6.1.5.5.7.6.37-54) the privateKey body is the bare concatenation mldsaSeed || tradSK, with no inner ASN.1 structure. The superseded Entrust/OpenCA OIDs, whose body is a SEQUENCE of OneAsymmetricKey (the newer name for PrivateKeyInfo), are still decoded for compatibility.
generatePrivate in interface AsymmetricKeyInfoConverterkeyInfo - PrivateKeyInfo carrying the composite private key body.java.io.IOExceptionpublic java.security.PublicKey generatePublic(SubjectPublicKeyInfo keyInfo) throws java.io.IOException
For the current OIDs (draft-ietf-lamps-pq-composite-sigs, IANA arc 1.3.6.1.5.5.7.6.37-54) the subjectPublicKey BIT STRING holds the bare concatenation mldsaPK || tradPK, split at the fixed ML-DSA public key length. The superseded encodings - a SEQUENCE of SubjectPublicKeyInfo, or of BIT STRINGs - are still decoded for compatibility, which is why the sequence parse is attempted first and the fixed-length split is reached from its catch branch.
generatePublic in interface AsymmetricKeyInfoConverterkeyInfo - SubjectPublicKeyInfo carrying the composite public key body.java.io.IOException