Bouncy Castle Cryptography Library 1.87

org.bouncycastle.cms.bc
Class BcKEMRecipientInfoGenerator

java.lang.Object
  extended byorg.bouncycastle.cms.KEMRecipientInfoGenerator
      extended byorg.bouncycastle.cms.bc.BcKEMRecipientInfoGenerator
All Implemented Interfaces:
RecipientInfoGenerator

public class BcKEMRecipientInfoGenerator
extends KEMRecipientInfoGenerator

Generator for an RFC 9629 KEMRecipientInfo using the light-weight API. The recipient's key must be an ML-KEM public key; the content-encryption key is wrapped with the AES key wrap named by the wrap algorithm, under a key-encryption key derived with KDF3/SHA-256 unless setKDF(AlgorithmIdentifier) selects another of the KDFs RFC 9629 allows.


Field Summary
 
Fields inherited from class org.bouncycastle.cms.KEMRecipientInfoGenerator
wrapper
 
Constructor Summary
BcKEMRecipientInfoGenerator(byte[] subjectKeyIdentifier, org.bouncycastle.crypto.params.AsymmetricKeyParameter publicKey, org.bouncycastle.asn1.ASN1ObjectIdentifier symWrapAlgorithm)
           
BcKEMRecipientInfoGenerator(X509CertificateHolder recipientCert, org.bouncycastle.asn1.ASN1ObjectIdentifier symWrapAlgorithm)
           
 
Method Summary
 BcKEMRecipientInfoGenerator setKDF(org.bouncycastle.asn1.x509.AlgorithmIdentifier kdfAlgorithm)
           
 BcKEMRecipientInfoGenerator setSecureRandom(java.security.SecureRandom random)
           
 BcKEMRecipientInfoGenerator setUserKeyingMaterial(byte[] userKeyingMaterial)
           
 
Methods inherited from class org.bouncycastle.cms.KEMRecipientInfoGenerator
generate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BcKEMRecipientInfoGenerator

public BcKEMRecipientInfoGenerator(X509CertificateHolder recipientCert,
                                   org.bouncycastle.asn1.ASN1ObjectIdentifier symWrapAlgorithm)
                            throws java.io.IOException

BcKEMRecipientInfoGenerator

public BcKEMRecipientInfoGenerator(byte[] subjectKeyIdentifier,
                                   org.bouncycastle.crypto.params.AsymmetricKeyParameter publicKey,
                                   org.bouncycastle.asn1.ASN1ObjectIdentifier symWrapAlgorithm)
                            throws java.io.IOException
Method Detail

setSecureRandom

public BcKEMRecipientInfoGenerator setSecureRandom(java.security.SecureRandom random)

setKDF

public BcKEMRecipientInfoGenerator setKDF(org.bouncycastle.asn1.x509.AlgorithmIdentifier kdfAlgorithm)

setUserKeyingMaterial

public BcKEMRecipientInfoGenerator setUserKeyingMaterial(byte[] userKeyingMaterial)

Bouncy Castle Cryptography Library 1.87