diff options
author | Adam Vartanian <flooey@google.com> | 2017-03-13 15:52:14 +0000 |
---|---|---|
committer | Adam Vartanian <flooey@google.com> | 2017-03-14 09:46:50 +0000 |
commit | 3a1143bac98ee7d83e001b56f3d127afd4b24181 (patch) | |
tree | 344c6d0ac7cd8e50b1429b9cdc329c0d13d99fec /tools | |
parent | 78dd2c8e7a66197615fa8172105f0d6f352dbcdb (diff) |
Add support for more categories to crypto doc update tools.
This update includes all categories except Cipher and Signature, both of
which are complicated and have lots of weird entries. Those will be
added in another change.
Bug: 35793879
Test: Ran run_update_crypto_support.sh
Change-Id: I6e320486b5cfb2b4f6cba5575733bea959988f9b
Diffstat (limited to 'tools')
-rw-r--r-- | tools/docs/crypto/data/crypto_support.json | 537 | ||||
-rwxr-xr-x | tools/docs/crypto/update_crypto_support.py | 29 |
2 files changed, 563 insertions, 3 deletions
diff --git a/tools/docs/crypto/data/crypto_support.json b/tools/docs/crypto/data/crypto_support.json index 0343135498..4e3c72e115 100644 --- a/tools/docs/crypto/data/crypto_support.json +++ b/tools/docs/crypto/data/crypto_support.json @@ -5,6 +5,328 @@ "algorithms": [ { "deprecated": "true", + "name": "AES", + "supported_api_levels": "1-8" + }, + { + "deprecated": "true", + "name": "DES", + "supported_api_levels": "1-8" + }, + { + "deprecated": "true", + "name": "DESEDE", + "supported_api_levels": "1-8" + }, + { + "name": "DH", + "supported_api_levels": "1+" + }, + { + "name": "DSA", + "supported_api_levels": "1+" + } + ], + "name": "AlgorithmParameterGenerator" + }, + { + "algorithms": [ + { + "name": "AES", + "supported_api_levels": "1+" + }, + { + "name": "BLOWFISH", + "supported_api_levels": "10+" + }, + { + "name": "DES", + "supported_api_levels": "1+" + }, + { + "name": "DESEDE", + "supported_api_levels": "1+" + }, + { + "name": "DH", + "supported_api_levels": "1+" + }, + { + "name": "DSA", + "supported_api_levels": "1+" + }, + { + "name": "EC", + "supported_api_levels": "26+" + }, + { + "name": "GCM", + "supported_api_levels": "22+" + }, + { + "deprecated": "true", + "name": "IES", + "supported_api_levels": "1-8" + }, + { + "name": "OAEP", + "supported_api_levels": "1+" + }, + { + "name": "PBEWITHHMACSHA1ANDAES_128", + "supported_api_levels": "26+" + }, + { + "name": "PBEWITHHMACSHA1ANDAES_256", + "supported_api_levels": "26+" + }, + { + "name": "PBEWITHHMACSHA224ANDAES_128", + "supported_api_levels": "26+" + }, + { + "name": "PBEWITHHMACSHA224ANDAES_256", + "supported_api_levels": "26+" + }, + { + "name": "PBEWITHHMACSHA256ANDAES_128", + "supported_api_levels": "26+" + }, + { + "name": "PBEWITHHMACSHA256ANDAES_256", + "supported_api_levels": "26+" + }, + { + "name": "PBEWITHHMACSHA384ANDAES_128", + "supported_api_levels": "26+" + }, + { + "name": "PBEWITHHMACSHA384ANDAES_256", + "supported_api_levels": "26+" + }, + { + "name": "PBEWITHHMACSHA512ANDAES_128", + "supported_api_levels": "26+" + }, + { + "name": "PBEWITHHMACSHA512ANDAES_256", + "supported_api_levels": "26+" + }, + { + "name": "PKCS12PBE", + "supported_api_levels": "1+" + }, + { + "name": "PSS", + "supported_api_levels": "1-8,24+" + } + ], + "name": "AlgorithmParameters" + }, + { + "algorithms": [ + { + "name": "PKIX", + "supported_api_levels": "1+" + } + ], + "name": "CertPathBuilder" + }, + { + "algorithms": [ + { + "name": "PKIX", + "supported_api_levels": "1+" + } + ], + "name": "CertPathValidator" + }, + { + "algorithms": [ + { + "name": "COLLECTION", + "supported_api_levels": "1+" + } + ], + "name": "CertStore" + }, + { + "algorithms": [ + { + "name": "X.509", + "supported_api_levels": "1+" + } + ], + "name": "CertificateFactory" + }, + { + "algorithms": [ + { + "name": "DH", + "supported_api_levels": "1+" + }, + { + "name": "ECDH", + "supported_api_levels": "11+" + } + ], + "name": "KeyAgreement" + }, + { + "algorithms": [ + { + "name": "DH", + "supported_api_levels": "1+" + }, + { + "name": "DSA", + "supported_api_levels": "1+" + }, + { + "name": "EC", + "supported_api_levels": "11+" + }, + { + "name": "RSA", + "supported_api_levels": "1+" + }, + { + "deprecated": "true", + "name": "X.509", + "supported_api_levels": "1-8" + } + ], + "name": "KeyFactory" + }, + { + "algorithms": [ + { + "name": "AES", + "supported_api_levels": "1+" + }, + { + "deprecated": "true", + "name": "AESWRAP", + "supported_api_levels": "1-8" + }, + { + "name": "ARC4", + "supported_api_levels": "14+" + }, + { + "name": "BLOWFISH", + "supported_api_levels": "10+" + }, + { + "name": "DES", + "supported_api_levels": "1+" + }, + { + "name": "DESEDE", + "supported_api_levels": "1+" + }, + { + "deprecated": "true", + "name": "DESEDEWRAP", + "supported_api_levels": "1-8" + }, + { + "name": "HMACMD5", + "supported_api_levels": "1+" + }, + { + "name": "HMACSHA1", + "supported_api_levels": "11+" + }, + { + "name": "HMACSHA224", + "supported_api_levels": "1-8,22+" + }, + { + "name": "HMACSHA256", + "supported_api_levels": "1+" + }, + { + "name": "HMACSHA384", + "supported_api_levels": "1+" + }, + { + "name": "HMACSHA512", + "supported_api_levels": "1+" + }, + { + "deprecated": "true", + "name": "RC4", + "supported_api_levels": "10-13" + } + ], + "name": "KeyGenerator" + }, + { + "algorithms": [ + { + "name": "PKIX", + "supported_api_levels": "1+" + } + ], + "name": "KeyManagerFactory" + }, + { + "algorithms": [ + { + "name": "DH", + "supported_api_levels": "1+" + }, + { + "name": "DSA", + "supported_api_levels": "1+" + }, + { + "name": "EC", + "supported_api_levels": "11+" + }, + { + "name": "RSA", + "supported_api_levels": "1+" + } + ], + "name": "KeyPairGenerator" + }, + { + "algorithms": [ + { + "name": "ANDROIDCASTORE", + "supported_api_levels": "14+" + }, + { + "deprecated": "true", + "name": "BCPKCS12", + "supported_api_levels": "1-8" + }, + { + "name": "BKS", + "supported_api_levels": "1+" + }, + { + "name": "BOUNCYCASTLE", + "supported_api_levels": "1+" + }, + { + "name": "PKCS12", + "supported_api_levels": "1+" + }, + { + "deprecated": "true", + "name": "PKCS12-DEF", + "supported_api_levels": "1-8" + } + ], + "name": "KeyStore" + }, + { + "algorithms": [ + { + "deprecated": "true", "name": "DESEDEMAC", "supported_api_levels": "1-8" }, @@ -117,7 +439,220 @@ } ], "name": "MessageDigest" + }, + { + "algorithms": [ + { + "name": "DEFAULT", + "supported_api_levels": "10+" + }, + { + "name": "SSL", + "supported_api_levels": "10+" + }, + { + "deprecated": "true", + "name": "SSLV3", + "supported_api_levels": "10-25" + }, + { + "name": "TLS", + "supported_api_levels": "1+" + }, + { + "name": "TLSV1", + "supported_api_levels": "10+" + }, + { + "name": "TLSV1.1", + "supported_api_levels": "16+" + }, + { + "name": "TLSV1.2", + "supported_api_levels": "16+" + } + ], + "name": "SSLContext" + }, + { + "algorithms": [ + { + "name": "DES", + "supported_api_levels": "1+" + }, + { + "name": "DESEDE", + "supported_api_levels": "1+" + }, + { + "name": "PBEWITHHMACSHA1", + "supported_api_levels": "1+" + }, + { + "name": "PBEWITHHMACSHA1ANDAES_128", + "supported_api_levels": "26+" + }, + { + "name": "PBEWITHHMACSHA1ANDAES_256", + "supported_api_levels": "26+" + }, + { + "name": "PBEWITHHMACSHA224ANDAES_128", + "supported_api_levels": "26+" + }, + { + "name": "PBEWITHHMACSHA224ANDAES_256", + "supported_api_levels": "26+" + }, + { + "name": "PBEWITHHMACSHA256ANDAES_128", + "supported_api_levels": "26+" + }, + { + "name": "PBEWITHHMACSHA256ANDAES_256", + "supported_api_levels": "26+" + }, + { + "name": "PBEWITHHMACSHA384ANDAES_128", + "supported_api_levels": "26+" + }, + { + "name": "PBEWITHHMACSHA384ANDAES_256", + "supported_api_levels": "26+" + }, + { + "name": "PBEWITHHMACSHA512ANDAES_128", + "supported_api_levels": "26+" + }, + { + "name": "PBEWITHHMACSHA512ANDAES_256", + "supported_api_levels": "26+" + }, + { + "name": "PBEWITHMD5AND128BITAES-CBC-OPENSSL", + "supported_api_levels": "1+" + }, + { + "name": "PBEWITHMD5AND192BITAES-CBC-OPENSSL", + "supported_api_levels": "1+" + }, + { + "name": "PBEWITHMD5AND256BITAES-CBC-OPENSSL", + "supported_api_levels": "1+" + }, + { + "name": "PBEWITHMD5ANDDES", + "supported_api_levels": "1+" + }, + { + "name": "PBEWITHMD5ANDRC2", + "supported_api_levels": "1+" + }, + { + "name": "PBEWITHSHA1ANDDES", + "supported_api_levels": "1+" + }, + { + "name": "PBEWITHSHA1ANDRC2", + "supported_api_levels": "1+" + }, + { + "name": "PBEWITHSHA256AND128BITAES-CBC-BC", + "supported_api_levels": "1+" + }, + { + "name": "PBEWITHSHA256AND192BITAES-CBC-BC", + "supported_api_levels": "1+" + }, + { + "name": "PBEWITHSHA256AND256BITAES-CBC-BC", + "supported_api_levels": "1+" + }, + { + "name": "PBEWITHSHAAND128BITAES-CBC-BC", + "supported_api_levels": "1+" + }, + { + "name": "PBEWITHSHAAND128BITRC2-CBC", + "supported_api_levels": "10+" + }, + { + "name": "PBEWITHSHAAND128BITRC4", + "supported_api_levels": "10+" + }, + { + "name": "PBEWITHSHAAND192BITAES-CBC-BC", + "supported_api_levels": "1+" + }, + { + "name": "PBEWITHSHAAND2-KEYTRIPLEDES-CBC", + "supported_api_levels": "1+" + }, + { + "name": "PBEWITHSHAAND256BITAES-CBC-BC", + "supported_api_levels": "1+" + }, + { + "name": "PBEWITHSHAAND3-KEYTRIPLEDES-CBC", + "supported_api_levels": "1+" + }, + { + "name": "PBEWITHSHAAND40BITRC2-CBC", + "supported_api_levels": "1+" + }, + { + "name": "PBEWITHSHAAND40BITRC4", + "supported_api_levels": "10+" + }, + { + "name": "PBEWITHSHAANDTWOFISH-CBC", + "supported_api_levels": "10+" + }, + { + "name": "PBKDF2WITHHMACSHA1", + "supported_api_levels": "10+" + }, + { + "name": "PBKDF2WITHHMACSHA1AND8BIT", + "supported_api_levels": "19+" + }, + { + "name": "PBKDF2WITHHMACSHA224", + "supported_api_levels": "26+" + }, + { + "name": "PBKDF2WITHHMACSHA256", + "supported_api_levels": "26+" + }, + { + "name": "PBKDF2WITHHMACSHA384", + "supported_api_levels": "26+" + }, + { + "name": "PBKDF2WITHHMACSHA512", + "supported_api_levels": "26+" + } + ], + "name": "SecretKeyFactory" + }, + { + "algorithms": [ + { + "name": "SHA1PRNG", + "supported_api_levels": "1+" + } + ], + "name": "SecureRandom" + }, + { + "algorithms": [ + { + "name": "PKIX", + "supported_api_levels": "1+" + } + ], + "name": "TrustManagerFactory" } ], - "last_updated": "2017-03-08 16:37:36 UTC" + "last_updated": "2017-03-14 09:45:32 UTC" }
\ No newline at end of file diff --git a/tools/docs/crypto/update_crypto_support.py b/tools/docs/crypto/update_crypto_support.py index 8e6ec061e4..051a99cb44 100755 --- a/tools/docs/crypto/update_crypto_support.py +++ b/tools/docs/crypto/update_crypto_support.py @@ -31,8 +31,24 @@ import sys # TODO(b/35793879): Support more categories SUPPORTED_CATEGORIES = [ + 'AlgorithmParameterGenerator', + 'AlgorithmParameters', + 'CertificateFactory', + 'CertPathBuilder', + 'CertPathValidator', + 'CertStore', + 'KeyAgreement', + 'KeyFactory', + 'KeyGenerator', + 'KeyManagerFactory', + 'KeyPairGenerator', + 'KeyStore', 'Mac', 'MessageDigest', + 'SecretKeyFactory', + 'SecureRandom', + 'SSLContext', + 'TrustManagerFactory', ] @@ -49,6 +65,15 @@ def sort_by_name(seq): return sorted(seq, key=lambda x: x['name']) +def normalize_name(name): + """Returns a normalized version of the given algorithm name.""" + name = name.upper() + # BouncyCastle uses X.509 with an alias of X509, Conscrypt does the + # reverse. X.509 is the official name of the standard, so use that. + if name == "X509": + name = "X.509" + return name + def get_current_data(f): """Returns a map of the algorithms in the given input. @@ -58,7 +83,7 @@ def get_current_data(f): input can supply arbitrary values outside of the BEGIN and END lines, it will be ignored. - The returned algorithms will have their names normalized to all-uppercase. + The returned algorithms will have their names normalized. Raises: EOFError: If either the BEGIN or END sentinel lines are not present. @@ -81,7 +106,7 @@ def get_current_data(f): category, algorithm = line.split() if category not in SUPPORTED_CATEGORIES: continue - current_data[category].append(algorithm.upper()) + current_data[category].append(normalize_name(algorithm)) if not saw_begin: raise EOFError( |