diff --git a/crypto/src/bcpg/SymmetricKeyAlgorithmTags.cs b/crypto/src/bcpg/SymmetricKeyAlgorithmTags.cs
index 7633b1dba..e05a48616 100644
--- a/crypto/src/bcpg/SymmetricKeyAlgorithmTags.cs
+++ b/crypto/src/bcpg/SymmetricKeyAlgorithmTags.cs
@@ -5,16 +5,19 @@ namespace Org.BouncyCastle.Bcpg
*/
public enum SymmetricKeyAlgorithmTag
{
- Null = 0, // Plaintext or unencrypted data
- Idea = 1, // IDEA [IDEA]
- TripleDes = 2, // Triple-DES (DES-EDE, as per spec -168 bit key derived from 192)
- Cast5 = 3, // Cast5 (128 bit key, as per RFC 2144)
- Blowfish = 4, // Blowfish (128 bit key, 16 rounds) [Blowfish]
- Safer = 5, // Safer-SK128 (13 rounds) [Safer]
- Des = 6, // Reserved for DES/SK
- Aes128 = 7, // Reserved for AES with 128-bit key
- Aes192 = 8, // Reserved for AES with 192-bit key
- Aes256 = 9, // Reserved for AES with 256-bit key
- Twofish = 10 // Reserved for Twofish
+ Null = 0, // Plaintext or unencrypted data
+ Idea = 1, // IDEA [IDEA]
+ TripleDes = 2, // Triple-DES (DES-EDE, as per spec -168 bit key derived from 192)
+ Cast5 = 3, // Cast5 (128 bit key, as per RFC 2144)
+ Blowfish = 4, // Blowfish (128 bit key, 16 rounds) [Blowfish]
+ Safer = 5, // Safer-SK128 (13 rounds) [Safer]
+ Des = 6, // Reserved for DES/SK
+ Aes128 = 7, // Reserved for AES with 128-bit key
+ Aes192 = 8, // Reserved for AES with 192-bit key
+ Aes256 = 9, // Reserved for AES with 256-bit key
+ Twofish = 10, // Reserved for Twofish
+ Camellia128 = 11, // Reserved for AES with 128-bit key
+ Camellia192 = 12, // Reserved for AES with 192-bit key
+ Camellia256 = 13 // Reserved for AES with 256-bit key
}
}
diff --git a/crypto/src/openpgp/PgpUtilities.cs b/crypto/src/openpgp/PgpUtilities.cs
index 7cd3dfc4f..32e37b819 100644
--- a/crypto/src/openpgp/PgpUtilities.cs
+++ b/crypto/src/openpgp/PgpUtilities.cs
@@ -97,7 +97,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
return GetDigestName(hashAlgorithm) + "with" + encAlg;
}
- public static string GetSymmetricCipherName(
+ public static string GetSymmetricCipherName(
SymmetricKeyAlgorithmTag algorithm)
{
switch (algorithm)
@@ -124,12 +124,18 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
return "AES";
case SymmetricKeyAlgorithmTag.Twofish:
return "Twofish";
+ case SymmetricKeyAlgorithmTag.Camellia128:
+ return "Camellia";
+ case SymmetricKeyAlgorithmTag.Camellia192:
+ return "Camellia";
+ case SymmetricKeyAlgorithmTag.Camellia256:
+ return "Camellia";
default:
throw new PgpException("unknown symmetric algorithm: " + algorithm);
}
}
- public static int GetKeySize(SymmetricKeyAlgorithmTag algorithm)
+ public static int GetKeySize(SymmetricKeyAlgorithmTag algorithm)
{
int keySize;
switch (algorithm)
@@ -142,14 +148,17 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
case SymmetricKeyAlgorithmTag.Blowfish:
case SymmetricKeyAlgorithmTag.Safer:
case SymmetricKeyAlgorithmTag.Aes128:
+ case SymmetricKeyAlgorithmTag.Camellia128:
keySize = 128;
break;
case SymmetricKeyAlgorithmTag.TripleDes:
case SymmetricKeyAlgorithmTag.Aes192:
+ case SymmetricKeyAlgorithmTag.Camellia192:
keySize = 192;
break;
case SymmetricKeyAlgorithmTag.Aes256:
case SymmetricKeyAlgorithmTag.Twofish:
+ case SymmetricKeyAlgorithmTag.Camellia256:
keySize = 256;
break;
default:
|