Class MlsCipherSuite
java.lang.Object
org.bouncycastle.mls.crypto.MlsCipherSuite
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final short[]The RFC 9420 cipher suites; these are the suites a defaultCapabilitiesadvertises.static final MlsCipherSuitestatic final MlsCipherSuitestatic final MlsCipherSuitestatic final MlsCipherSuitestatic final MlsCipherSuitestatic final MlsCipherSuitestatic final MlsCipherSuitestatic final MlsCipherSuitestatic final MlsCipherSuitestatic final MlsCipherSuitestatic final MlsCipherSuitestatic final MlsCipherSuitestatic final MlsCipherSuitestatic final MlsCipherSuitestatic final MlsCipherSuitestatic final MlsCipherSuitestatic final MlsCipherSuitestatic final MlsCipherSuitestatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final short[]The post-quantum cipher suites of draft-ietf-mls-pq-ciphersuites, under placeholder code points (see the note on the constants). -
Constructor Summary
ConstructorsConstructorDescriptionMlsCipherSuite(short id, MlsSigner signer, MlsKdf kdf, MlsAead aead, org.bouncycastle.crypto.hpke.HPKE hpke) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]decryptWithLabel(byte[] priv, String label, byte[] context, byte[] kem_output, byte[] ciphertext) org.bouncycastle.crypto.AsymmetricCipherKeyPairdeserializeSignaturePrivateKey(byte[] priv) byte[][]encryptWithLabel(byte[] pub, String label, byte[] context, byte[] plaintext) org.bouncycastle.crypto.AsymmetricCipherKeyPairgetAEAD()org.bouncycastle.crypto.hpke.HPKEgetHPKE()getKDF()static MlsCipherSuitegetSuite(short id) shortbyte[]hash(byte[] value) byte[]byte[]serializeSignaturePrivateKey(org.bouncycastle.crypto.params.AsymmetricKeyParameter key) byte[]serializeSignaturePublicKey(org.bouncycastle.crypto.params.AsymmetricKeyParameter key) byte[]signWithLabel(byte[] priv, String label, byte[] content) booleanverifyWithLabel(byte[] pub, String label, byte[] content, byte[] signature)
-
Field Details
-
MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519
public static final short MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519- See Also:
-
MLS_128_DHKEMP256_AES128GCM_SHA256_P256
public static final short MLS_128_DHKEMP256_AES128GCM_SHA256_P256- See Also:
-
MLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519
public static final short MLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519- See Also:
-
MLS_256_DHKEMX448_AES256GCM_SHA512_Ed448
public static final short MLS_256_DHKEMX448_AES256GCM_SHA512_Ed448- See Also:
-
MLS_256_DHKEMP521_AES256GCM_SHA512_P521
public static final short MLS_256_DHKEMP521_AES256GCM_SHA512_P521- See Also:
-
MLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448
public static final short MLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448- See Also:
-
MLS_256_DHKEMP384_AES256GCM_SHA384_P384
public static final short MLS_256_DHKEMP384_AES256GCM_SHA384_P384- See Also:
-
BCMLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519
-
BCMLS_128_DHKEMP256_AES128GCM_SHA256_P256
-
BCMLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519
-
BCMLS_256_DHKEMX448_AES256GCM_SHA512_Ed448
-
BCMLS_256_DHKEMP521_AES256GCM_SHA512_P521
-
BCMLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448
-
BCMLS_256_DHKEMP384_AES256GCM_SHA384_P384
-
MLS_128_MLKEM768X25519_AES128GCM_SHA256_Ed25519
public static final short MLS_128_MLKEM768X25519_AES128GCM_SHA256_Ed25519- See Also:
-
MLS_128_MLKEM768X25519_AES256GCM_SHA384_Ed25519
public static final short MLS_128_MLKEM768X25519_AES256GCM_SHA384_Ed25519- See Also:
-
MLS_128_MLKEM768P256_AES128GCM_SHA256_P256
public static final short MLS_128_MLKEM768P256_AES128GCM_SHA256_P256- See Also:
-
MLS_128_MLKEM768P256_AES256GCM_SHA384_P256
public static final short MLS_128_MLKEM768P256_AES256GCM_SHA384_P256- See Also:
-
MLS_192_MLKEM1024P384_AES256GCM_SHA384_P384
public static final short MLS_192_MLKEM1024P384_AES256GCM_SHA384_P384- See Also:
-
MLS_128_MLKEM768_AES256GCM_SHA384_Ed25519
public static final short MLS_128_MLKEM768_AES256GCM_SHA384_Ed25519- See Also:
-
MLS_128_MLKEM768_AES256GCM_SHA384_P256
public static final short MLS_128_MLKEM768_AES256GCM_SHA384_P256- See Also:
-
MLS_192_MLKEM1024_AES256GCM_SHA384_P384
public static final short MLS_192_MLKEM1024_AES256GCM_SHA384_P384- See Also:
-
MLS_128_MLKEM768X25519_CHACHA20POLY1305_SHA384_MLDSA44
public static final short MLS_128_MLKEM768X25519_CHACHA20POLY1305_SHA384_MLDSA44- See Also:
-
MLS_192_MLKEM768_AES256GCM_SHA384_MLDSA65
public static final short MLS_192_MLKEM768_AES256GCM_SHA384_MLDSA65- See Also:
-
MLS_256_MLKEM1024_AES256GCM_SHA384_MLDSA87
public static final short MLS_256_MLKEM1024_AES256GCM_SHA384_MLDSA87- See Also:
-
BCMLS_128_MLKEM768X25519_AES128GCM_SHA256_Ed25519
-
BCMLS_128_MLKEM768X25519_AES256GCM_SHA384_Ed25519
-
BCMLS_128_MLKEM768P256_AES128GCM_SHA256_P256
-
BCMLS_128_MLKEM768P256_AES256GCM_SHA384_P256
-
BCMLS_192_MLKEM1024P384_AES256GCM_SHA384_P384
-
BCMLS_128_MLKEM768_AES256GCM_SHA384_Ed25519
-
BCMLS_128_MLKEM768_AES256GCM_SHA384_P256
-
BCMLS_192_MLKEM1024_AES256GCM_SHA384_P384
-
BCMLS_128_MLKEM768X25519_CHACHA20POLY1305_SHA384_MLDSA44
-
BCMLS_192_MLKEM768_AES256GCM_SHA384_MLDSA65
-
BCMLS_256_MLKEM1024_AES256GCM_SHA384_MLDSA87
-
ALL_SUPPORTED_SUITES
public static final short[] ALL_SUPPORTED_SUITESThe RFC 9420 cipher suites; these are the suites a defaultCapabilitiesadvertises. -
PQ_SUITES
public static final short[] PQ_SUITESThe post-quantum cipher suites of draft-ietf-mls-pq-ciphersuites, under placeholder code points (see the note on the constants). They are not inALL_SUPPORTED_SUITES, so a client that wants to offer them adds them to itsCapabilitiesexplicitly.
-
-
Constructor Details
-
MlsCipherSuite
-
-
Method Details
-
getSuite
- Throws:
Exception
-
getSuiteID
public short getSuiteID() -
generateSignatureKeyPair
public org.bouncycastle.crypto.AsymmetricCipherKeyPair generateSignatureKeyPair() -
serializeSignaturePublicKey
public byte[] serializeSignaturePublicKey(org.bouncycastle.crypto.params.AsymmetricKeyParameter key) -
serializeSignaturePrivateKey
public byte[] serializeSignaturePrivateKey(org.bouncycastle.crypto.params.AsymmetricKeyParameter key) -
deserializeSignaturePrivateKey
public org.bouncycastle.crypto.AsymmetricCipherKeyPair deserializeSignaturePrivateKey(byte[] priv) -
signWithLabel
public byte[] signWithLabel(byte[] priv, String label, byte[] content) throws IOException, org.bouncycastle.crypto.CryptoException - Throws:
IOExceptionorg.bouncycastle.crypto.CryptoException
-
verifyWithLabel
public boolean verifyWithLabel(byte[] pub, String label, byte[] content, byte[] signature) throws IOException - Throws:
IOException
-
refHash
- Throws:
IOException
-
hash
- Throws:
IOException
-
decryptWithLabel
public byte[] decryptWithLabel(byte[] priv, String label, byte[] context, byte[] kem_output, byte[] ciphertext) throws IOException, org.bouncycastle.crypto.InvalidCipherTextException - Throws:
IOExceptionorg.bouncycastle.crypto.InvalidCipherTextException
-
encryptWithLabel
public byte[][] encryptWithLabel(byte[] pub, String label, byte[] context, byte[] plaintext) throws IOException, org.bouncycastle.crypto.InvalidCipherTextException - Throws:
IOExceptionorg.bouncycastle.crypto.InvalidCipherTextException
-
getHPKE
public org.bouncycastle.crypto.hpke.HPKE getHPKE() -
getKDF
-
getAEAD
-