Skip to content

Commit 4bd7012

Browse files
committed
Document PacketTags
1 parent 303d59f commit 4bd7012

File tree

1 file changed

+174
-1
lines changed

1 file changed

+174
-1
lines changed

pg/src/main/java/org/bouncycastle/bcpg/PacketTags.java

+174-1
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,199 @@
66
public interface PacketTags
77
{
88
int RESERVED = 0 ; // Reserved - a packet tag must not have this value
9+
10+
/**
11+
* Public-Key (Persistent-Key) Encrypted Session-Key Packet.
12+
* Packet class: {@link PublicKeyEncSessionPacket}
13+
* Business logic: {@link org.bouncycastle.openpgp.PGPPublicKeyEncryptedData}
14+
*
15+
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-public-key-encrypted-sessio">
16+
* Public-Key Encrypted Session Key Packet</a>
17+
*/
918
int PUBLIC_KEY_ENC_SESSION = 1; // Public-Key Encrypted Session Key Packet
19+
20+
/**
21+
* Signature Packet.
22+
* Packet class: {@link SignaturePacket}
23+
* Business logic: {@link org.bouncycastle.openpgp.PGPSignature}
24+
*
25+
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-signature-packet-type-id-2">
26+
* Signature Packet</a>
27+
*/
1028
int SIGNATURE = 2; // Signature Packet
29+
30+
/**
31+
* Symmetric Key (String-to-Key) Encrypted Session-Key Packet.
32+
* Packet class: {@link SymmetricKeyEncSessionPacket}
33+
* Business logic: {@link org.bouncycastle.openpgp.PGPSymmetricKeyEncryptedData}
34+
*
35+
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-symmetric-key-encrypted-ses">
36+
* Symmetric-Key Encrypted Session-Key Packet</a>
37+
*/
1138
int SYMMETRIC_KEY_ENC_SESSION = 3; // Symmetric-Key Encrypted Session Key Packet
39+
40+
/**
41+
* One-Pass-Signature Packet.
42+
* Packet class: {@link OnePassSignaturePacket}
43+
* Business logic: {@link org.bouncycastle.openpgp.PGPOnePassSignature},
44+
* {@link org.bouncycastle.openpgp.PGPOnePassSignatureList}
45+
*
46+
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-one-pass-signature-packet-t">
47+
* One-Pass-Signature Packet</a>
48+
*/
1249
int ONE_PASS_SIGNATURE = 4 ; // One-Pass Signature Packet
50+
51+
/**
52+
* (Primary) Secret-Key Packet.
53+
* Packet class: {@link SecretKeyPacket}
54+
* Business logic: {@link org.bouncycastle.openpgp.PGPSecretKey}
55+
*
56+
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-secret-key-packet-type-id-5">
57+
* Secret-Key Packet</a>
58+
*/
1359
int SECRET_KEY = 5; // Secret Key Packet
60+
61+
/**
62+
* (Primary) Public-Key Packet.
63+
* Packet class: {@link PublicKeyPacket}
64+
* Business logic: {@link org.bouncycastle.openpgp.PGPPublicKey}
65+
*
66+
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-public-key-packet-type-id-6">
67+
* Public-Key Packet</a>
68+
*/
1469
int PUBLIC_KEY = 6 ; // Public Key Packet
70+
71+
/**
72+
* Secret-Subkey Packet.
73+
* Packet class: {@link SecretSubkeyPacket}
74+
* Business logic: {@link org.bouncycastle.openpgp.PGPSecretKey}
75+
*
76+
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-secret-subkey-packet-type-i">
77+
* Secret-Subkey Packet</a>
78+
*/
1579
int SECRET_SUBKEY = 7; // Secret Subkey Packet
80+
81+
/**
82+
* Compressed-Data Packet.
83+
* Packet class: {@link CompressedDataPacket}
84+
* Business logic: {@link org.bouncycastle.openpgp.PGPCompressedData}
85+
*
86+
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-compressed-data-packet-type">
87+
* Compressed Data Packet</a>
88+
*/
1689
int COMPRESSED_DATA = 8; // Compressed Data Packet
90+
91+
/**
92+
* Symmetrically Encrypted Data Packet.
93+
* Packet class: {@link SymmetricEncDataPacket}
94+
* Business logic: {@link org.bouncycastle.openpgp.PGPSymmetricKeyEncryptedData}
95+
* Note: This encrypted data packet in favor of {@link #SYM_ENC_INTEGRITY_PRO}.
96+
*
97+
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-symmetrically-encrypted-dat">
98+
* Symmetrically Encrypted Data Packet</a>
99+
*/
17100
int SYMMETRIC_KEY_ENC = 9; // Symmetrically Encrypted Data Packet
101+
102+
/**
103+
* Marker Packet.
104+
* Packet class: {@link MarkerPacket}
105+
* Business logic: {@link org.bouncycastle.openpgp.PGPMarker}
106+
* This packet is deprecated and MUST be ignored.
107+
*
108+
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-marker-packet-type-id-10">
109+
* Marker Packet</a>
110+
*/
18111
int MARKER = 10; // Marker Packet
112+
113+
/**
114+
* Literal Data Packet.
115+
* Packet class: {@link LiteralDataPacket}
116+
* Business logic: {@link org.bouncycastle.openpgp.PGPLiteralData}
117+
*
118+
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-literal-data-packet-type-id">
119+
* Literal Data Packet</a>
120+
*/
19121
int LITERAL_DATA = 11; // Literal Data Packet
122+
123+
/**
124+
* Trust Packet.
125+
* Packet class: {@link TrustPacket}
126+
* This class has no dedicated business logic implementation.
127+
*
128+
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-trust-packet-type-id-12">
129+
* Trust Packet</a>
130+
*/
20131
int TRUST = 12; // Trust Packet
132+
133+
/**
134+
* User ID Packet.
135+
* Packet class: {@link UserIDPacket}
136+
*
137+
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-user-id-packet-type-id-13">
138+
* User ID Packet</a>
139+
*/
21140
int USER_ID = 13; // User ID Packet
141+
142+
/**
143+
* Public-Subkey Packet.
144+
* Packet class: {@link PublicSubkeyPacket}
145+
* Business logic: {@link org.bouncycastle.openpgp.PGPPublicKey}
146+
*
147+
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-public-subkey-packet-type-i">
148+
* Public-Subkey Packet</a>
149+
*/
22150
int PUBLIC_SUBKEY = 14; // Public Subkey Packet
151+
152+
/**
153+
* User Attribute Packet.
154+
* Packet class: {@link UserAttributePacket}
155+
* Business logic: {@link org.bouncycastle.openpgp.PGPUserAttributeSubpacketVector}
156+
*
157+
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-user-attribute-packet-type-">
158+
* User Attribute Packet</a>
159+
*/
23160
int USER_ATTRIBUTE = 17; // User attribute
161+
162+
/**
163+
* Symmetrically Encrypted, Integrity-Protected Data Packet.
164+
* Packet class: {@link SymmetricEncIntegrityPacket}
165+
* Business logic: {@link org.bouncycastle.openpgp.PGPSymmetricKeyEncryptedData}
166+
*
167+
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-symmetrically-encrypted-int">
168+
* Symmetrically Encrypted Integrity Protected Data Packet</a>
169+
*/
24170
int SYM_ENC_INTEGRITY_PRO = 18; // Symmetric encrypted, integrity protected
171+
172+
/**
173+
* Modification Detection Code Packet.
174+
* This is no longer a stand-alone packet and has been integrated into the {@link #SYM_ENC_INTEGRITY_PRO}.
175+
*
176+
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-terminology-changes">
177+
* Terminology Changes</a>
178+
*/
25179
int MOD_DETECTION_CODE = 19; // Modification detection code
180+
181+
/**
182+
* OCB Encrypted Data Packet (LibrePGP only).
183+
* This packet is not used by the official OpenPGP standard.
184+
* Packet class: {@link AEADEncDataPacket}
185+
* Business logic: {@link org.bouncycastle.openpgp.PGPEncryptedData}
186+
*
187+
* @see <a href="https://www.ietf.org/archive/id/draft-koch-librepgp-01.html#name-ocb-encrypted-data-packet-t">
188+
* OCB Encrypted Data Packet</a>
189+
*/
26190
int AEAD_ENC_DATA = 20; // AEAD Encrypted Data (seems deprecated)
191+
192+
/**
193+
* Padding Packet.
194+
* Packet class: {@link PaddingPacket}
195+
* Business logic: {@link org.bouncycastle.openpgp.PGPPadding}
196+
*
197+
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-padding-packet-type-id-21">
198+
* Padding Packet</a>
199+
*/
27200
int PADDING = 21; // Padding Packet
28-
201+
29202
int EXPERIMENTAL_1 = 60; // Private or Experimental Values
30203
int EXPERIMENTAL_2 = 61;
31204
int EXPERIMENTAL_3 = 62;

0 commit comments

Comments
 (0)