GitXplorerGitXplorer
t

militarygrade

public
3 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
e3afd127849e4a20f4e8cfd633b0eb036ca9dda1

pimp my readme

ttiran committed 8 years ago
Unverified
536cbade36e47953a2ba8e53885145f5c48ff1c4

Add AES-GCM demo

ttiran committed 8 years ago
Unverified
568cb88868024a5ccc73d5d96d2388f0124e6a73

Initial commit

ttiran committed 8 years ago
Unverified
e958d5cb178c24208370c00902fdd1e1ab6b8e8e

Initial commit

ttiran committed 8 years ago

README

The README file for this repository.

Military grade bad crypto demos

ECB mode

ECB mode

CTR and GCM mode with IV reuse (nonce misuse)

The start value / IV for streaming modes like AES-CTR and AES-GCM must be a nonce (number only used once). When the combination of encryption key and IV is ever used twice, then the encryption can be reversed by simply applying XOR. The image shows encrypted_image1 XOR encrypted_image2. The output of encrypted_image1 XOR encrypted_image2 XOR original_image1 is original_image2.

CTR mode

Original images

AES encryption added and removed here

tux

Note

Some examples are double-plus bad because they also utilize PyCrypto. Friends don't let friends use PyCrypto. Please use https://github.com/pyca/cryptography