2
0
mirror of https://github.com/mozilla/cipherscan.git synced 2024-11-22 14:23:41 +01:00

add support for Chacha20 based ciphers

Basically all Google servers support Chacha20 now and it is
not a bad choice, so report it as a regular cipher
This commit is contained in:
Hubert Kario 2014-04-06 14:11:52 +02:00
parent 2b794ebfe0
commit c8abfb53e8

View File

@ -32,6 +32,7 @@ for r,d,flist in os.walk(path):
ciphertypes = 0 ciphertypes = 0
AESGCM = False AESGCM = False
AES = False AES = False
CHACHA20 = False
DES3 = False DES3 = False
CAMELLIA = False CAMELLIA = False
RC4 = False RC4 = False
@ -90,6 +91,10 @@ for r,d,flist in os.walk(path):
if not RC4: if not RC4:
ciphertypes += 1 ciphertypes += 1
RC4 = True RC4 = True
elif 'CHACHA20' in entry['cipher']:
if not CHACHA20:
ciphertypes += 1
CHACHA20 = True
else: else:
ciphertypes += 1 ciphertypes += 1
name = "z:" + entry['cipher'] name = "z:" + entry['cipher']
@ -175,6 +180,10 @@ for r,d,flist in os.walk(path):
if (AES and ciphertypes == 1) or (AESGCM and ciphertypes == 1)\ if (AES and ciphertypes == 1) or (AESGCM and ciphertypes == 1)\
or (AES and AESGCM and ciphertypes == 2): or (AES and AESGCM and ciphertypes == 2):
cipherstats['AES Only'] += 1 cipherstats['AES Only'] += 1
if CHACHA20:
cipherstats['CHACHA20'] += 1
if ciphertypes == 1:
cipherstats['CHACHA20 Only'] += 1
if DES3: if DES3:
cipherstats['3DES'] += 1 cipherstats['3DES'] += 1
if ciphertypes == 1: if ciphertypes == 1: