Package org.bouncycastle.mls.crypto
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[]static 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 short -
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
-
ALL_SUPPORTED_SUITES
public static final short[] ALL_SUPPORTED_SUITES
-
-
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
-