File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
pg/src/main/java/org/bouncycastle/bcpg Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 8
8
* This type is for use with {@link PublicKeyAlgorithmTags#ECDH} or {@link PublicKeyAlgorithmTags#ECDSA}.
9
9
* The specific curve is identified by providing an OID.
10
10
* Regarding X25519, X448, consider the following:
11
+ * ECDH keys using curve448 are unspecified.
12
+ * ECDH secret keys using curve25519 use big-endian MPI encoding, contrary to {@link X25519SecretBCPGKey} which uses
13
+ * native encoding.
11
14
* Modern implementations use dedicated key types {@link X25519SecretBCPGKey}, {@link X448SecretBCPGKey} along with
12
15
* dedicated algorithm tags {@link PublicKeyAlgorithmTags#X25519}, {@link PublicKeyAlgorithmTags#X448}.
13
16
* If you want to be compatible with legacy applications however, you should use this class instead.
17
20
* Crypto-Refresh - Algorithm-Specific Parts for ECDH Keys</a>
18
21
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-algorithm-specific-part-for-ec">
19
22
* Crypto-Refresh - Algorithm-Specific Parts for ECDSA Keys</a>
23
+ * @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-curve25519legacy-ecdh-secre">
24
+ * Crypto-Refresh - Curve25519Legacy ECDH Secret Key Material (deprecated)</a>
20
25
*/
21
26
public class ECSecretBCPGKey
22
27
extends BCPGObject
Original file line number Diff line number Diff line change 8
8
* Note however, that legacy implementations might not understand this key type yet.
9
9
* For a key type compatible with legacy v4 implementations, see {@link ECDHPublicBCPGKey} with
10
10
* {@link PublicKeyAlgorithmTags#ECDH}.
11
+ * Note: Contrary to {@link ECSecretBCPGKey} using {@link PublicKeyAlgorithmTags#ECDH}, which uses big-endian
12
+ * MPI encoding to encode the secret key material, {@link X25519SecretBCPGKey} uses native little-endian encoding.
11
13
*
12
14
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-algorithm-specific-part-for-x">
13
15
* Crypto-Refresh - Algorithm-Specific Part for X25519 Keys</a>
You can’t perform that action at this time.
0 commit comments