Skip to content

Instantly share code, notes, and snippets.

@TummanapallyAnuraag
Created September 13, 2022 06:31
Show Gist options
  • Save TummanapallyAnuraag/f5bc3b5b49ad9ba1994fc72b4aa30bbc to your computer and use it in GitHub Desktop.
Save TummanapallyAnuraag/f5bc3b5b49ad9ba1994fc72b4aa30bbc to your computer and use it in GitHub Desktop.
help:
@# Green
@tput setaf 2
@echo "Usage: make [ all | clean ]"
@echo "This script will encrypt 128 bit 0's plain text with 256 bit 0's key, "
@echo "Using AES 256 ECB encryption scheme"
@# color reset
@tput sgr0
all:
dd if=/dev/zero of=zeros_16B_128b.bin bs=16 count=1
@# Yellow
@tput setaf 3
@echo "H = AES-256-ECB(0^128, K)"
@echo "K: 256 bit 0's = 0^256"
@# color reset
@tput sgr0
openssl aes-256-ecb -e -K 00 -nopad -in zeros_16B_128b.bin -out enc_zeros_16B_128b.bin -iter 10000
@# Yellow
@tput setaf 3
xxd enc_zeros_16B_128b.bin
@# color reset
@tput sgr0
clean:
rm *.bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment