We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 61ae167 + 54e82fd commit 70930d7Copy full SHA for 70930d7
openpgp/packet/aead_config.go
@@ -37,7 +37,7 @@ func (conf *AEADConfig) Mode() AEADMode {
37
38
// ChunkSizeByte returns the byte indicating the chunk size. The effective
39
// chunk size is computed with the formula uint64(1) << (chunkSizeByte + 6)
40
-// limit to 16 = 4 MiB
+// limit chunkSizeByte to 16 which equals to 2^22 = 4 MiB
41
// https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#section-5.13.2
42
func (conf *AEADConfig) ChunkSizeByte() byte {
43
if conf == nil || conf.ChunkSize == 0 {
@@ -49,8 +49,8 @@ func (conf *AEADConfig) ChunkSizeByte() byte {
49
switch {
50
case exponent < 6:
51
exponent = 6
52
- case exponent > 16:
53
- exponent = 16
+ case exponent > 22:
+ exponent = 22
54
}
55
56
return byte(exponent - 6)
0 commit comments