I was encrypting some Ansible secrets this morning and noticed that the ciphertexts seemed to have a lot of 3s and 6s in them. I did some frequency counts and found that yes, in fact, about 40% of the digits are 3s, and more than 20% 6s:
$ANSIBLE_VAULT;1.2;AES256;staging-swarm
65313330663061336263663766653361336535316363303035386461656265643262346238313962
3961353035636635663338633338616437353332343735390a346135346166613737343265623239
31343733663762613533306332626263366330313639356239316532643134383035333932316535
3766396161306433640a656638363338323636653933323064343431363530616637363035303938
35373235656264636134623030633430343435306336646330633739323430663763343366333733
33666663323466323463343732353533353833306537383936336662343161333137303763326534
353764373232326263353238623634623565
Frequency count:
3: 207
6: 114
5: 37
2: 35
4: 31
1: 25
0: 23
7: 19
9: 12
8: 11
This seems to hold up for other Ansible secrets, e.g. the ones in this question, combined frequency count:
3: 247
6: 145
2: 54
5: 42
4: 35
1: 26
9: 26
7: 25
0: 22
8: 22
Is this a peculiarity of the bytes of the underlying AES ciphertext, or of the way Ansible/Python represents the binary ciphertext as a digit string?