mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-25 12:27:58 +01:00
Document legacy-status of EdDSA and XDH
This commit is contained in:
parent
846b98e3c0
commit
8e1e90c89a
3 changed files with 18 additions and 0 deletions
|
@ -100,8 +100,18 @@ interface KeyType {
|
||||||
|
|
||||||
@JvmStatic fun ECDSA(curve: EllipticCurve): ECDSA = ECDSA.fromCurve(curve)
|
@JvmStatic fun ECDSA(curve: EllipticCurve): ECDSA = ECDSA.fromCurve(curve)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Legacy EdDSA using Ed25519.
|
||||||
|
* For OpenPGP v4 only.
|
||||||
|
*/
|
||||||
@JvmStatic fun EDDSA(curve: EdDSACurve): EdDSA = EdDSA.fromCurve(curve)
|
@JvmStatic fun EDDSA(curve: EdDSACurve): EdDSA = EdDSA.fromCurve(curve)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Legacy ECDH using Curve25519.
|
||||||
|
* For OpenPGP v4 only.
|
||||||
|
*/
|
||||||
@JvmStatic fun XDH(curve: XDHSpec): XDH = XDH.fromSpec(curve)
|
@JvmStatic fun XDH(curve: XDHSpec): XDH = XDH.fromSpec(curve)
|
||||||
|
|
||||||
|
// TODO: Add crypto-refresh X25519, X448, Ed25519, Ed448
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,10 @@ import org.bouncycastle.jce.spec.ECNamedCurveGenParameterSpec
|
||||||
import org.pgpainless.algorithm.PublicKeyAlgorithm
|
import org.pgpainless.algorithm.PublicKeyAlgorithm
|
||||||
import org.pgpainless.key.generation.type.KeyType
|
import org.pgpainless.key.generation.type.KeyType
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Legacy EdDSA using Ed25519.
|
||||||
|
* For use with OpenPGP v4 only.
|
||||||
|
*/
|
||||||
class EdDSA private constructor(val curve: EdDSACurve) : KeyType {
|
class EdDSA private constructor(val curve: EdDSACurve) : KeyType {
|
||||||
override val name = "EdDSA"
|
override val name = "EdDSA"
|
||||||
override val algorithm = PublicKeyAlgorithm.EDDSA
|
override val algorithm = PublicKeyAlgorithm.EDDSA
|
||||||
|
|
|
@ -8,6 +8,10 @@ import org.bouncycastle.jce.spec.ECNamedCurveGenParameterSpec
|
||||||
import org.pgpainless.algorithm.PublicKeyAlgorithm
|
import org.pgpainless.algorithm.PublicKeyAlgorithm
|
||||||
import org.pgpainless.key.generation.type.KeyType
|
import org.pgpainless.key.generation.type.KeyType
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Legacy ECDH with Curve25519.
|
||||||
|
* For use with OpenPGP v4 only.
|
||||||
|
*/
|
||||||
class XDH private constructor(spec: XDHSpec) : KeyType {
|
class XDH private constructor(spec: XDHSpec) : KeyType {
|
||||||
override val name = "XDH"
|
override val name = "XDH"
|
||||||
override val algorithm = PublicKeyAlgorithm.ECDH
|
override val algorithm = PublicKeyAlgorithm.ECDH
|
||||||
|
|
Loading…
Reference in a new issue