APIdia Launch Partner
Top Inners Fields Constructors Methods
com.sun.crypto.provider

public final Class ML_KEM_Impls

extends Object
Class Inheritance
Imports
sun.security.jca.JCAUtil, sun.security.pkcs.NamedPKCS8Key, sun.security.provider.NamedKEM, .NamedKeyFactory, .NamedKeyPairGenerator, sun.security.util.KeyChoices, sun.security.x509.NamedX509Key, java.security.*, java.util.Arrays, javax.crypto.DecapsulateException

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class

Field Summary

Modifier and TypeField and Description
private static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static NamedX509Key
public static byte[]
seedToExpanded(String pname, byte[] seed)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

SEED_LENback to summary
private static final int SEED_LEN

Constructor Detail

ML_KEM_Implsback to summary
public ML_KEM_Impls()

Method Detail

privKeyToPubKeyback to summary
public static NamedX509Key privKeyToPubKey(NamedPKCS8Key npk)
seedToExpandedback to summary
public static byte[] seedToExpanded(String pname, byte[] seed)
com.sun.crypto.provider back to summary

public sealed Class ML_KEM_Impls.K

extends NamedKEM
permits K2, K3, K5
Class Inheritance
Known Direct Subclasses
com.sun.crypto.provider.ML_KEM_Impls.K2, com.sun.crypto.provider.ML_KEM_Impls.K3, com.sun.crypto.provider.ML_KEM_Impls.K5

Field Summary

Modifier and TypeField and Description
private static final int

Constructor Summary

AccessConstructor and Description
public
K()

public
K(String pname)

Method Summary

Modifier and TypeMethod and Description
protected Object
implCheckPrivateKey(String pname, byte[] sk)

Overrides sun.security.provider.NamedKEM.implCheckPrivateKey.

User-defined function to validate a private key.

protected Object
implCheckPublicKey(String pname, byte[] pk)

Overrides sun.security.provider.NamedKEM.implCheckPublicKey.

User-defined function to validate a public key.

protected byte[]
implDecapsulate(String pname, byte[] decapsulationKey, Object dk, byte[] cipherText)

Implements abstract sun.security.provider.NamedKEM.implDecapsulate.

User-defined decap function.

protected byte[][]
implEncapsulate(String pname, byte[] encapsulationKey, Object ek, SecureRandom secureRandom)

Implements abstract sun.security.provider.NamedKEM.implEncapsulate.

User-defined encap function.

protected int
implEncapsulationSize(String pname)

Implements abstract sun.security.provider.NamedKEM.implEncapsulationSize.

User-defined function returning key encapsulation message length.

protected int
implSecretSize(String pname)

Implements abstract sun.security.provider.NamedKEM.implSecretSize.

User-defined function returning shared secret key length.

Inherited from sun.security.provider.NamedKEM:
engineNewDecapsulatorengineNewEncapsulator

Field Detail

SEED_SIZEback to summary
private static final int SEED_SIZE

Constructor Detail

Kback to summary
public K()
Kback to summary
public K(String pname)

Method Detail

implCheckPrivateKeyback to summary
protected Object implCheckPrivateKey(String pname, byte[] sk) throws InvalidKeyException

Overrides sun.security.provider.NamedKEM.implCheckPrivateKey.

Doc from sun.security.provider.NamedKEM.implCheckPrivateKey.

User-defined function to validate a private key.

This method will be called in newDecapsulator. This gives the provider a chance to reject the key so an InvalidKeyException can be thrown earlier. An implementation can optionally return a "parsed key" as an Object value. This object will be passed into the implDecapsulate method along with the raw key.

The default implementation returns null.

Annotations
@Override
Exceptions
InvalidKeyException:
if the key is invalid
implCheckPublicKeyback to summary
protected Object implCheckPublicKey(String pname, byte[] pk) throws InvalidKeyException

Overrides sun.security.provider.NamedKEM.implCheckPublicKey.

Doc from sun.security.provider.NamedKEM.implCheckPublicKey.

User-defined function to validate a public key.

This method will be called in newEncapsulator. This gives the provider a chance to reject the key so an InvalidKeyException can be thrown earlier. An implementation can optionally return a "parsed key" as an Object value. This object will be passed into the implEncapsulate method along with the raw key.

The default implementation returns null.

Annotations
@Override
Exceptions
InvalidKeyException:
if the key is invalid
implDecapsulateback to summary
protected byte[] implDecapsulate(String pname, byte[] decapsulationKey, Object dk, byte[] cipherText) throws DecapsulateException

Implements abstract sun.security.provider.NamedKEM.implDecapsulate.

Doc from sun.security.provider.NamedKEM.implDecapsulate.

User-defined decap function.

Annotations
@Override
Exceptions
DecapsulateException:
if there is another error
implEncapsulateback to summary
protected byte[][] implEncapsulate(String pname, byte[] encapsulationKey, Object ek, SecureRandom secureRandom)

Implements abstract sun.security.provider.NamedKEM.implEncapsulate.

Doc from sun.security.provider.NamedKEM.implEncapsulate.

User-defined encap function.

Annotations
@Override
implEncapsulationSizeback to summary
protected int implEncapsulationSize(String pname)

Implements abstract sun.security.provider.NamedKEM.implEncapsulationSize.

Doc from sun.security.provider.NamedKEM.implEncapsulationSize.

User-defined function returning key encapsulation message length.

Annotations
@Override
implSecretSizeback to summary
protected int implSecretSize(String pname)

Implements abstract sun.security.provider.NamedKEM.implSecretSize.

Doc from sun.security.provider.NamedKEM.implSecretSize.

User-defined function returning shared secret key length.

Annotations
@Override
com.sun.crypto.provider back to summary

public final Class ML_KEM_Impls.K2

extends K
Class Inheritance

Constructor Summary

AccessConstructor and Description
public
K2()

Method Summary

Inherited from com.sun.crypto.provider.ML_KEM_Impls.K:
implCheckPrivateKeyimplCheckPublicKeyimplDecapsulateimplEncapsulateimplEncapsulationSizeimplSecretSize

Constructor Detail

K2back to summary
public K2()
com.sun.crypto.provider back to summary

public final Class ML_KEM_Impls.K3

extends K
Class Inheritance

Constructor Summary

AccessConstructor and Description
public
K3()

Method Summary

Inherited from com.sun.crypto.provider.ML_KEM_Impls.K:
implCheckPrivateKeyimplCheckPublicKeyimplDecapsulateimplEncapsulateimplEncapsulationSizeimplSecretSize

Constructor Detail

K3back to summary
public K3()
com.sun.crypto.provider back to summary

public final Class ML_KEM_Impls.K5

extends K
Class Inheritance

Constructor Summary

AccessConstructor and Description
public
K5()

Method Summary

Inherited from com.sun.crypto.provider.ML_KEM_Impls.K:
implCheckPrivateKeyimplCheckPublicKeyimplDecapsulateimplEncapsulateimplEncapsulationSizeimplSecretSize

Constructor Detail

K5back to summary
public K5()
com.sun.crypto.provider back to summary

public sealed Class ML_KEM_Impls.KF

extends NamedKeyFactory
permits KF2, KF3, KF5
Class Inheritance
Known Direct Subclasses
com.sun.crypto.provider.ML_KEM_Impls.KF2, com.sun.crypto.provider.ML_KEM_Impls.KF3, com.sun.crypto.provider.ML_KEM_Impls.KF5

Constructor Summary

AccessConstructor and Description
public
KF()

public
KF(String pname)

Method Summary

Modifier and TypeMethod and Description
protected Key
engineTranslateKey(Key key)

Overrides sun.security.provider.NamedKeyFactory.engineTranslateKey.

Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.

protected byte[]
implExpand(String pname, byte[] input)

Implements abstract sun.security.provider.NamedKeyFactory.implExpand.

User-defined function to generate the expanded format of a NamedPKCS8Key from its encoding format.

Inherited from sun.security.provider.NamedKeyFactory:
engineGeneratePrivateengineGeneratePublicengineGetKeySpectoNamedKey

Constructor Detail

KFback to summary
public KF()
KFback to summary
public KF(String pname)

Method Detail

engineTranslateKeyback to summary
protected Key engineTranslateKey(Key key) throws InvalidKeyException

Overrides sun.security.provider.NamedKeyFactory.engineTranslateKey.

Doc from java.security.KeyFactorySpi.engineTranslateKey.

Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.

Annotations
@Override
Exceptions
InvalidKeyException:
if the given key cannot be processed by this key factory.
implExpandback to summary
protected byte[] implExpand(String pname, byte[] input) throws InvalidKeyException

Implements abstract sun.security.provider.NamedKeyFactory.implExpand.

Doc from sun.security.provider.NamedKeyFactory.implExpand.

User-defined function to generate the expanded format of a NamedPKCS8Key from its encoding format.

This method is called when the key factory is constructing a private key. The ownership of the result is fully granted to the caller.

Annotations
@Override
Exceptions
InvalidKeyException:
if input is invalid
com.sun.crypto.provider back to summary

public final Class ML_KEM_Impls.KF2

extends KF
Class Inheritance

Constructor Summary

AccessConstructor and Description
public
KF2()

Method Summary

Inherited from com.sun.crypto.provider.ML_KEM_Impls.KF:
engineTranslateKeyimplExpand

Constructor Detail

KF2back to summary
public KF2()
com.sun.crypto.provider back to summary

public final Class ML_KEM_Impls.KF3

extends KF
Class Inheritance

Constructor Summary

AccessConstructor and Description
public
KF3()

Method Summary

Inherited from com.sun.crypto.provider.ML_KEM_Impls.KF:
engineTranslateKeyimplExpand

Constructor Detail

KF3back to summary
public KF3()
com.sun.crypto.provider back to summary

public final Class ML_KEM_Impls.KF5

extends KF
Class Inheritance

Constructor Summary

AccessConstructor and Description
public
KF5()

Method Summary

Inherited from com.sun.crypto.provider.ML_KEM_Impls.KF:
engineTranslateKeyimplExpand

Constructor Detail

KF5back to summary
public KF5()
com.sun.crypto.provider back to summary

public sealed Class ML_KEM_Impls.KPG

extends NamedKeyPairGenerator
permits KPG2, KPG3, KPG5
Class Inheritance
Known Direct Subclasses
com.sun.crypto.provider.ML_KEM_Impls.KPG2, com.sun.crypto.provider.ML_KEM_Impls.KPG3, com.sun.crypto.provider.ML_KEM_Impls.KPG5

Field Summary

Inherited from sun.security.provider.NamedKeyPairGenerator:
pname

Constructor Summary

AccessConstructor and Description
public
KPG()

protected
KPG(String pname)

Method Summary

Modifier and TypeMethod and Description
protected byte[][]
implGenerateKeyPair(String pname, SecureRandom random)

Implements abstract sun.security.provider.NamedKeyPairGenerator.implGenerateKeyPair.

User-defined key pair generator.

Inherited from sun.security.provider.NamedKeyPairGenerator:
generateKeyPairinitializeinitialize

Constructor Detail

KPGback to summary
public KPG()
KPGback to summary
protected KPG(String pname)

Method Detail

implGenerateKeyPairback to summary
protected byte[][] implGenerateKeyPair(String pname, SecureRandom random)

Implements abstract sun.security.provider.NamedKeyPairGenerator.implGenerateKeyPair.

Doc from sun.security.provider.NamedKeyPairGenerator.implGenerateKeyPair.

User-defined key pair generator.

Annotations
@Override
com.sun.crypto.provider back to summary

public final Class ML_KEM_Impls.KPG2

extends KPG
Class Inheritance

Constructor Summary

AccessConstructor and Description
public
KPG2()

Method Summary

Inherited from com.sun.crypto.provider.ML_KEM_Impls.KPG:
implGenerateKeyPair

Constructor Detail

KPG2back to summary
public KPG2()
com.sun.crypto.provider back to summary

public final Class ML_KEM_Impls.KPG3

extends KPG
Class Inheritance

Constructor Summary

AccessConstructor and Description
public
KPG3()

Method Summary

Inherited from com.sun.crypto.provider.ML_KEM_Impls.KPG:
implGenerateKeyPair

Constructor Detail

KPG3back to summary
public KPG3()
com.sun.crypto.provider back to summary

public final Class ML_KEM_Impls.KPG5

extends KPG
Class Inheritance

Constructor Summary

AccessConstructor and Description
public
KPG5()

Method Summary

Inherited from com.sun.crypto.provider.ML_KEM_Impls.KPG:
implGenerateKeyPair

Constructor Detail

KPG5back to summary
public KPG5()