1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-09-11 19:29:39 +02:00

Add documentation to PublicKeyAlgorithms

This commit is contained in:
Paul Schaub 2020-12-11 22:52:28 +01:00
parent d65646efc6
commit 0194bd5924
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -22,35 +22,67 @@ import org.bouncycastle.bcpg.PublicKeyAlgorithmTags;
public enum PublicKeyAlgorithm { public enum PublicKeyAlgorithm {
/**
* RSA capable of encryption and signatures.
*/
RSA_GENERAL (PublicKeyAlgorithmTags.RSA_GENERAL), RSA_GENERAL (PublicKeyAlgorithmTags.RSA_GENERAL),
/** /**
* RSA with usage encryption.
*
* @deprecated see https://tools.ietf.org/html/rfc4880#section-13.5 * @deprecated see https://tools.ietf.org/html/rfc4880#section-13.5
*/ */
RSA_ENCRYPT (PublicKeyAlgorithmTags.RSA_ENCRYPT), RSA_ENCRYPT (PublicKeyAlgorithmTags.RSA_ENCRYPT),
/** /**
* RSA with usage of creating signatures.
*
* @deprecated see https://tools.ietf.org/html/rfc4880#section-13.5 * @deprecated see https://tools.ietf.org/html/rfc4880#section-13.5
*/ */
RSA_SIGN (PublicKeyAlgorithmTags.RSA_SIGN), RSA_SIGN (PublicKeyAlgorithmTags.RSA_SIGN),
/**
* ElGamal with usage encryption.
*/
ELGAMAL_ENCRYPT (PublicKeyAlgorithmTags.ELGAMAL_ENCRYPT), ELGAMAL_ENCRYPT (PublicKeyAlgorithmTags.ELGAMAL_ENCRYPT),
/**
* Digital Signature Algorithm.
*/
DSA (PublicKeyAlgorithmTags.DSA), DSA (PublicKeyAlgorithmTags.DSA),
/** /**
* EC is deprecated. * EC is deprecated.
* @deprecated use {@link #ECDH} instead. * @deprecated use {@link #ECDH} instead.
*/ */
EC (PublicKeyAlgorithmTags.EC), EC (PublicKeyAlgorithmTags.EC),
/**
* Elliptic Curve Diffie-Hellman.
*/
ECDH (PublicKeyAlgorithmTags.ECDH), ECDH (PublicKeyAlgorithmTags.ECDH),
/**
* Elliptic Curve Digital Signature Algorithm.
*/
ECDSA (PublicKeyAlgorithmTags.ECDSA), ECDSA (PublicKeyAlgorithmTags.ECDSA),
/** /**
* ElGamal General.
*
* @deprecated see https://tools.ietf.org/html/rfc4880#section-13.8 * @deprecated see https://tools.ietf.org/html/rfc4880#section-13.8
*/ */
@Deprecated @Deprecated
ELGAMAL_GENERAL (PublicKeyAlgorithmTags.ELGAMAL_GENERAL), ELGAMAL_GENERAL (PublicKeyAlgorithmTags.ELGAMAL_GENERAL),
/**
* Diffie-Hellman key exchange algorithm.
*/
DIFFIE_HELLMAN (PublicKeyAlgorithmTags.DIFFIE_HELLMAN), DIFFIE_HELLMAN (PublicKeyAlgorithmTags.DIFFIE_HELLMAN),
/**
* Digital Signature Algorithm based on twisted Edwards Curves.
*/
EDDSA (PublicKeyAlgorithmTags.EDDSA), EDDSA (PublicKeyAlgorithmTags.EDDSA),
; ;