public class RainbowKeyFactorySpi extends KeyFactorySpi implements AsymmetricKeyInfoConverter
| Constructor and Description |
|---|
RainbowKeyFactorySpi() |
| Modifier and Type | Method and Description |
|---|---|
PrivateKey |
engineGeneratePrivate(KeySpec keySpec)
Converts, if possible, a key specification into a
BCRainbowPrivateKey. |
PublicKey |
engineGeneratePublic(KeySpec keySpec)
Converts, if possible, a key specification into a
BCRainbowPublicKey. |
KeySpec |
engineGetKeySpec(Key key,
Class keySpec)
Converts a given key into a key specification, if possible.
|
Key |
engineTranslateKey(Key key)
Translates a key into a form known by the FlexiProvider.
|
PrivateKey |
generatePrivate(PrivateKeyInfo keyInfo) |
PublicKey |
generatePublic(SubjectPublicKeyInfo keyInfo) |
public PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException
BCRainbowPrivateKey. Currently, the following key specifications
are supported: RainbowPrivateKeySpec, PKCS8EncodedKeySpec.
The ASN.1 definition of the key structure is
RainbowPrivateKey ::= SEQUENCE {
oid OBJECT IDENTIFIER -- OID identifying the algorithm
A1inv SEQUENCE OF OCTET STRING -- inversed matrix of L1
b1 OCTET STRING -- translation vector of L1
A2inv SEQUENCE OF OCTET STRING -- inversed matrix of L2
b2 OCTET STRING -- translation vector of L2
vi OCTET STRING -- num of elmts in each Set S
layers SEQUENCE OF Layer -- layers of F
}
Layer ::= SEQUENCE OF Poly
Poly ::= SEQUENCE {
alpha SEQUENCE OF OCTET STRING
beta SEQUENCE OF OCTET STRING
gamma OCTET STRING
eta OCTET
}
engineGeneratePrivate in class KeyFactorySpikeySpec - the key specificationInvalidKeySpecException - if the KeySpec is not supported.public PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException
BCRainbowPublicKey. Currently, the following key specifications are
supported:X509EncodedKeySpec.
The ASN.1 definition of a public key's structure is
RainbowPublicKey ::= SEQUENCE {
oid OBJECT IDENTIFIER -- OID identifying the algorithm
docLength Integer -- length of signable msg
coeffquadratic SEQUENCE OF OCTET STRING -- quadratic (mixed) coefficients
coeffsingular SEQUENCE OF OCTET STRING -- singular coefficients
coeffscalar OCTET STRING -- scalar coefficients
}
engineGeneratePublic in class KeyFactorySpikeySpec - the key specificationInvalidKeySpecException - if the KeySpec is not supported.public final KeySpec engineGetKeySpec(Key key, Class keySpec) throws InvalidKeySpecException
engineGetKeySpec in class KeyFactorySpikey - the keykeySpec - the key specificationInvalidKeySpecException - if the key type or key specification is not supported.public final Key engineTranslateKey(Key key) throws InvalidKeyException
engineTranslateKey in class KeyFactorySpikey - the keyInvalidKeyException - if the key is not supported.public PrivateKey generatePrivate(PrivateKeyInfo keyInfo) throws IOException
generatePrivate in interface AsymmetricKeyInfoConverterIOExceptionpublic PublicKey generatePublic(SubjectPublicKeyInfo keyInfo) throws IOException
generatePublic in interface AsymmetricKeyInfoConverterIOExceptionCopyright © 2015–2019 The veraPDF Consortium. All rights reserved.