Top Inners Fields Constructors Methods
org.bouncycastle.mls.crypto

public Class MlsCipherSuite

extends Object
Class Inheritance
Imports
java.io.IOException, java.nio.charset.StandardCharsets, org.bouncycastle.crypto.AsymmetricCipherKeyPair, .CryptoException, .Digest, .InvalidCipherTextException, org.bouncycastle.crypto.digests.SHA256Digest, .SHA384Digest, .SHA512Digest, org.bouncycastle.crypto.hpke.HPKE, org.bouncycastle.crypto.params.AsymmetricKeyParameter, org.bouncycastle.mls.codec.MLSOutputStream, org.bouncycastle.mls.crypto.bc.BcMlsAead, .BcMlsKdf, .BcMlsSigner

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class

Field Summary

Modifier and TypeField and Description
private final MlsAead
public static final short[]
public static final MlsCipherSuite
public static final MlsCipherSuite
public static final MlsCipherSuite
public static final MlsCipherSuite
public static final MlsCipherSuite
public static final MlsCipherSuite
public static final MlsCipherSuite
private final Digest
private final HPKE
private final MlsKdf
public static final short
public static final short
public static final short
public static final short
public static final short
public static final short
public static final short
private final MlsSigner
private final short

Constructor Summary

AccessConstructor and Description
public
MlsCipherSuite(short id, MlsSigner signer, MlsKdf kdf, MlsAead aead, HPKE hpke)

Method Summary

Modifier and TypeMethod and Description
public byte[]
decryptWithLabel(byte[] priv, String label, byte[] context, byte[] kem_output, byte[] ciphertext)

public AsymmetricCipherKeyPair
public byte[][]
encryptWithLabel(byte[] pub, String label, byte[] context, byte[] plaintext)

public AsymmetricCipherKeyPair
public MlsAead
public HPKE
public MlsKdf
public static MlsCipherSuite
getSuite(short id)

public short
public byte[]
hash(byte[] value)

public byte[]
refHash(byte[] value, String label)

public byte[]
public byte[]
public byte[]
signWithLabel(byte[] priv, String label, byte[] content)

public boolean
verifyWithLabel(byte[] pub, String label, byte[] content, byte[] signature)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aeadback to summary
private final MlsAead aead
ALL_SUPPORTED_SUITESback to summary
public static final short[] ALL_SUPPORTED_SUITES
BCMLS_128_DHKEMP256_AES128GCM_SHA256_P256back to summary
public static final MlsCipherSuite BCMLS_128_DHKEMP256_AES128GCM_SHA256_P256
BCMLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519back to summary
public static final MlsCipherSuite BCMLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519
BCMLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519back to summary
public static final MlsCipherSuite BCMLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519
BCMLS_256_DHKEMP384_AES256GCM_SHA384_P384back to summary
public static final MlsCipherSuite BCMLS_256_DHKEMP384_AES256GCM_SHA384_P384
BCMLS_256_DHKEMP521_AES256GCM_SHA512_P521back to summary
public static final MlsCipherSuite BCMLS_256_DHKEMP521_AES256GCM_SHA512_P521
BCMLS_256_DHKEMX448_AES256GCM_SHA512_Ed448back to summary
public static final MlsCipherSuite BCMLS_256_DHKEMX448_AES256GCM_SHA512_Ed448
BCMLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448back to summary
public static final MlsCipherSuite BCMLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448
digestback to summary
private final Digest digest
hpkeback to summary
private final HPKE hpke
kdfback to summary
private final MlsKdf kdf
MLS_128_DHKEMP256_AES128GCM_SHA256_P256back to summary
public static final short MLS_128_DHKEMP256_AES128GCM_SHA256_P256
MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519back to summary
public static final short MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519
MLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519back to summary
public static final short MLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519
MLS_256_DHKEMP384_AES256GCM_SHA384_P384back to summary
public static final short MLS_256_DHKEMP384_AES256GCM_SHA384_P384
MLS_256_DHKEMP521_AES256GCM_SHA512_P521back to summary
public static final short MLS_256_DHKEMP521_AES256GCM_SHA512_P521
MLS_256_DHKEMX448_AES256GCM_SHA512_Ed448back to summary
public static final short MLS_256_DHKEMX448_AES256GCM_SHA512_Ed448
MLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448back to summary
public static final short MLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448
signerback to summary
private final MlsSigner signer
suiteIDback to summary
private final short suiteID

Constructor Detail

MlsCipherSuiteback to summary
public MlsCipherSuite(short id, MlsSigner signer, MlsKdf kdf, MlsAead aead, HPKE hpke)

Method Detail

decryptWithLabelback to summary
public byte[] decryptWithLabel(byte[] priv, String label, byte[] context, byte[] kem_output, byte[] ciphertext) throws IOException, InvalidCipherTextException
deserializeSignaturePrivateKeyback to summary
public AsymmetricCipherKeyPair deserializeSignaturePrivateKey(byte[] priv)
encryptWithLabelback to summary
public byte[][] encryptWithLabel(byte[] pub, String label, byte[] context, byte[] plaintext) throws IOException, InvalidCipherTextException
generateSignatureKeyPairback to summary
public AsymmetricCipherKeyPair generateSignatureKeyPair()
getAEADback to summary
public MlsAead getAEAD()
getHPKEback to summary
public HPKE getHPKE()
getKDFback to summary
public MlsKdf getKDF()
getSuiteback to summary
public static MlsCipherSuite getSuite(short id) throws Exception
getSuiteIDback to summary
public short getSuiteID()
hashback to summary
public byte[] hash(byte[] value) throws IOException
refHashback to summary
public byte[] refHash(byte[] value, String label) throws IOException
serializeSignaturePrivateKeyback to summary
public byte[] serializeSignaturePrivateKey(AsymmetricKeyParameter key)
serializeSignaturePublicKeyback to summary
public byte[] serializeSignaturePublicKey(AsymmetricKeyParameter key)
signWithLabelback to summary
public byte[] signWithLabel(byte[] priv, String label, byte[] content) throws IOException, CryptoException
verifyWithLabelback to summary
public boolean verifyWithLabel(byte[] pub, String label, byte[] content, byte[] signature) throws IOException
org.bouncycastle.mls.crypto back to summary

public Class MlsCipherSuite.GenericContent

extends Object
implements Writable
Class Inheritance
All Implemented Interfaces
org.bouncycastle.mls.codec.MLSOutputStream.Writable

Field Summary

Modifier and TypeField and Description
private byte[]
private byte[]

Constructor Summary

AccessConstructor and Description
public
GenericContent(String label, byte[] content)

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contentback to summary
private byte[] content
labelback to summary
private byte[] label

Constructor Detail

GenericContentback to summary
public GenericContent(String label, byte[] content)

Method Detail

writeToback to summary
public void writeTo(MLSOutputStream stream) throws IOException

Implements org.bouncycastle.mls.codec.MLSOutputStream.Writable.writeTo.

Annotations
@Override
org.bouncycastle.mls.crypto back to summary

public Class MlsCipherSuite.RefHash

extends Object
implements Writable
Class Inheritance
All Implemented Interfaces
org.bouncycastle.mls.codec.MLSOutputStream.Writable

Field Summary

Modifier and TypeField and Description
public byte[]
public byte[]

Constructor Summary

AccessConstructor and Description
public
RefHash(byte[] label, byte[] value)

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

labelback to summary
public byte[] label
valueback to summary
public byte[] value

Constructor Detail

RefHashback to summary
public RefHash(byte[] label, byte[] value)

Method Detail

writeToback to summary
public void writeTo(MLSOutputStream stream) throws IOException

Implements org.bouncycastle.mls.codec.MLSOutputStream.Writable.writeTo.

Annotations
@Override