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 88 * This type is for use with {@link PublicKeyAlgorithmTags#ECDH} or {@link PublicKeyAlgorithmTags#ECDSA}.
99 * The specific curve is identified by providing an OID.
1010 * 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.
1114 * Modern implementations use dedicated key types {@link X25519SecretBCPGKey}, {@link X448SecretBCPGKey} along with
1215 * dedicated algorithm tags {@link PublicKeyAlgorithmTags#X25519}, {@link PublicKeyAlgorithmTags#X448}.
1316 * If you want to be compatible with legacy applications however, you should use this class instead.
1720 * Crypto-Refresh - Algorithm-Specific Parts for ECDH Keys</a>
1821 * @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-algorithm-specific-part-for-ec">
1922 * 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>
2025 */
2126public class ECSecretBCPGKey
2227 extends BCPGObject
Original file line number Diff line number Diff line change 88 * Note however, that legacy implementations might not understand this key type yet.
99 * For a key type compatible with legacy v4 implementations, see {@link ECDHPublicBCPGKey} with
1010 * {@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.
1113 *
1214 * @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-algorithm-specific-part-for-x">
1315 * Crypto-Refresh - Algorithm-Specific Part for X25519 Keys</a>
You can’t perform that action at this time.
0 commit comments