Package org.bouncycastle.mls.crypto
Class MlsCipherSuite
java.lang.Object
org.bouncycastle.mls.crypto.MlsCipherSuite
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final short[]
static final MlsCipherSuite
static final MlsCipherSuite
static final MlsCipherSuite
static final MlsCipherSuite
static final MlsCipherSuite
static final MlsCipherSuite
static final MlsCipherSuite
static final short
static final short
static final short
static final short
static final short
static final short
static 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.AsymmetricCipherKeyPair
deserializeSignaturePrivateKey
(byte[] priv) byte[][]
encryptWithLabel
(byte[] pub, String label, byte[] context, byte[] plaintext) org.bouncycastle.crypto.AsymmetricCipherKeyPair
getAEAD()
org.bouncycastle.crypto.hpke.HPKE
getHPKE()
getKDF()
static MlsCipherSuite
getSuite
(short id) short
byte[]
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) boolean
verifyWithLabel
(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:
IOException
org.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:
IOException
org.bouncycastle.crypto.InvalidCipherTextException
-
encryptWithLabel
public byte[][] encryptWithLabel(byte[] pub, String label, byte[] context, byte[] plaintext) throws IOException, org.bouncycastle.crypto.InvalidCipherTextException - Throws:
IOException
org.bouncycastle.crypto.InvalidCipherTextException
-
getHPKE
public org.bouncycastle.crypto.hpke.HPKE getHPKE() -
getKDF
-
getAEAD
-