Package org.bouncycastle.mls.crypto.bc
Class BcMlsSigner
java.lang.Object
org.bouncycastle.mls.crypto.bc.BcMlsSigner
- All Implemented Interfaces:
MlsSigner
-
Field Summary
Fields inherited from interface org.bouncycastle.mls.crypto.MlsSigner
ecdsa_secp256r1_sha256, ecdsa_secp384r1_sha384, ecdsa_secp521r1_sha512, ed25519, ed448
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bouncycastle.crypto.AsymmetricCipherKeyPair
deserializePrivateKey
(byte[] priv) org.bouncycastle.crypto.params.AsymmetricKeyParameter
deserializePublicKey
(byte[] pub) org.bouncycastle.crypto.AsymmetricCipherKeyPair
byte[]
serializePrivateKey
(org.bouncycastle.crypto.params.AsymmetricKeyParameter key) byte[]
serializePublicKey
(org.bouncycastle.crypto.params.AsymmetricKeyParameter key) byte[]
signWithLabel
(byte[] priv, String label, byte[] content) boolean
verifyWithLabel
(byte[] pub, String label, byte[] content, byte[] signature)
-
Constructor Details
-
BcMlsSigner
public BcMlsSigner(int sigID)
-
-
Method Details
-
generateSignatureKeyPair
public org.bouncycastle.crypto.AsymmetricCipherKeyPair generateSignatureKeyPair()- Specified by:
generateSignatureKeyPair
in interfaceMlsSigner
-
serializePublicKey
public byte[] serializePublicKey(org.bouncycastle.crypto.params.AsymmetricKeyParameter key) - Specified by:
serializePublicKey
in interfaceMlsSigner
-
serializePrivateKey
public byte[] serializePrivateKey(org.bouncycastle.crypto.params.AsymmetricKeyParameter key) - Specified by:
serializePrivateKey
in interfaceMlsSigner
-
deserializePublicKey
public org.bouncycastle.crypto.params.AsymmetricKeyParameter deserializePublicKey(byte[] pub) - Specified by:
deserializePublicKey
in interfaceMlsSigner
-
deserializePrivateKey
public org.bouncycastle.crypto.AsymmetricCipherKeyPair deserializePrivateKey(byte[] priv) - Specified by:
deserializePrivateKey
in interfaceMlsSigner
-
signWithLabel
public byte[] signWithLabel(byte[] priv, String label, byte[] content) throws IOException, org.bouncycastle.crypto.CryptoException - Specified by:
signWithLabel
in interfaceMlsSigner
- Throws:
IOException
org.bouncycastle.crypto.CryptoException
-
verifyWithLabel
public boolean verifyWithLabel(byte[] pub, String label, byte[] content, byte[] signature) throws IOException - Specified by:
verifyWithLabel
in interfaceMlsSigner
- Throws:
IOException
-