Class ECPrivateKey
-
- All Implemented Interfaces:
-
org.signal.libsignal.internal.NativeHandleGuard.Owner
public final class ECPrivateKey extends NativeHandleGuard.SimpleOwner
-
-
Constructor Summary
Constructors Constructor Description ECPrivateKey(ByteArray privateKey)ECPrivateKey(Long nativeHandle)
-
Method Summary
Modifier and Type Method Description final ByteArrayserialize()final ByteArraycalculateSignature(ByteArray message)final ByteArraycalculateAgreement(ECPublicKey other)final ByteArrayopen(ByteArray ciphertext, ByteArray info, ByteArray associatedData)Opens a ciphertext sealed with PublicKey. final ByteArrayopen(ByteArray ciphertext, String info, ByteArray associatedData)A convenience overload of open(ByteArray,ByteArray,ByteArray), using the UTF-8 bytes of info.final ECPublicKeypublicKey()final static ECPrivateKeygenerate()-
Methods inherited from class org.signal.libsignal.internal.NativeHandleGuard.SimpleOwner
unsafeNativeHandleWithoutGuard -
Methods inherited from class org.signal.libsignal.internal.NativeHandleGuard.Owner
guard, guardedMap, guardedMapChecked, guardedRun, guardedRunChecked -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
calculateSignature
final ByteArray calculateSignature(ByteArray message)
-
calculateAgreement
final ByteArray calculateAgreement(ECPublicKey other)
-
open
final ByteArray open(ByteArray ciphertext, ByteArray info, ByteArray associatedData)
Opens a ciphertext sealed with PublicKey.seal(ByteArray,ByteArray,ByteArray).
Uses HPKE (RFC 9180). The input should include its original type byte indicating the chosen algorithms and ciphertext layout. The
infoandassociatedDatamust match those used during sealing.
-
open
final ByteArray open(ByteArray ciphertext, String info, ByteArray associatedData)
A convenience overload of open(ByteArray,ByteArray,ByteArray), using the UTF-8 bytes of
info.
-
publicKey
final ECPublicKey publicKey()
-
generate
final static ECPrivateKey generate()
-
-
-
-