Skip to content

Commit 3a7b8b2

Browse files
committed
Merge branch 'documentAEADTags' of https://github.com/pgpainless/bc-java into pgpainless-documentAEADTags
2 parents 9770ace + a610c98 commit 3a7b8b2

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed
Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,31 @@
11
package org.bouncycastle.bcpg;
22

3+
/**
4+
* AEAD Algorithm IDs.
5+
* Crypto-Refresh (OpenPGP) defines IDs 1 through 3, while LibrePGP only defines 1 and 2.
6+
* Further, the use of AEAD differs between C-R and LibrePGP.
7+
*
8+
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-aead-algorithms">
9+
* Crypto-Refresh: AEAD Algorithms</a>
10+
* @see <a href="https://www.ietf.org/archive/id/draft-koch-librepgp-00.html#name-encryption-modes">
11+
* LibrePGP - Encryption Modes</a>
12+
*/
313
public interface AEADAlgorithmTags
414
{
5-
int EAX = 1; // EAX (IV len: 16 octets, Tag len: 16 octets)
6-
int OCB = 2; // OCB (IV len: 15 octets, Tag len: 16 octets)
7-
int GCM = 3; // GCM (IV len: 12 octets, Tag len: 16 octets)
15+
/**
16+
* EAX with 16-bit nonce/IV and 16-bit auth tag length.
17+
*/
18+
int EAX = 1;
19+
/**
20+
* OCB with 15-bit nonce/IV and 16-bit auth tag length.
21+
* C-R compliant implementations MUST implement OCB.
22+
*/
23+
int OCB = 2;
24+
/**
25+
* GCM with 12-bit nonce/IV and 16-bit auth tag length.
26+
* OpenPGP only.
27+
*/
28+
int GCM = 3;
29+
30+
// 100 to 110: Experimental algorithms
831
}

0 commit comments

Comments
 (0)