Package com.nimbusds.jose.crypto.impl
Class ECDH
java.lang.Object
com.nimbusds.jose.crypto.impl.ECDH
Elliptic Curve Diffie-Hellman key agreement functions and utilities.
- Version:
- 2018-12-12
- Author:
- Vladimir Dzhuvinov
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of the Elliptic Curve Diffie-Hellman Ephemeral Static algorithm modes. -
Method Summary
Modifier and TypeMethodDescriptionstatic SecretKeyderiveSharedKey(JWEHeader header, SecretKey Z, ConcatKDF concatKDF) Derives a shared key (via concat KDF).static SecretKeyderiveSharedSecret(OctetKeyPair publicKey, OctetKeyPair privateKey) Derives a shared secret (also called 'Z') from the specified ECDH key agreement.static SecretKeyderiveSharedSecret(ECPublicKey publicKey, PrivateKey privateKey, Provider provider) Derives a shared secret (also called 'Z') from the specified ECDH key agreement.static ECDH.AlgorithmModeResolves the ECDH algorithm mode.static intsharedKeyLength(JWEAlgorithm alg, EncryptionMethod enc) Returns the bit length of the shared key (derived via concat KDF) for the specified JWE ECDH algorithm.
-
Method Details
-
resolveAlgorithmMode
Resolves the ECDH algorithm mode.- Parameters:
alg- The JWE algorithm. Must be supported and notnull.- Returns:
- The algorithm mode.
- Throws:
JOSEException- If the JWE algorithm is not supported.
-